Pádraig Brady wrote:
Jim Meyering wrote:
Hmm... I guess you could be thinking about
warnings from non-gcc compilers. Yes, that's another way in which
(void)i is better.
Right.
BTW, I'm annoyed that one can't always do: (void) function();
but I presume gcc must have a _very_ good reason
On Solaris/x86, with SunPRO C 5.9, the test-func test fails. The reason
is that
sizeof __func__
evaluates to 0. The compiler warns about it:
test-func.c, line 40: warning: null dimension: sizeof()
What to do? m4/func.m4 could defined __func__ to a dummy. But that's too
much damage IMO.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Davide Libenzi on 8/25/2009 3:53 PM:
Another solution is for the application to sanitize all newly-created
fds: GNU coreutils provides a wrapper open_safer, which does nothing
extra in the common case that open() returned 3 or larger,
On 08/27/2009 06:54 AM, Eric Blake wrote:
I hope that my example shows why doing it in the kernel is desirable -
there is no safe way to keep the pre-O_CLOEXEC efficiency using just the
library, but there IS a way to do it with kernel support:
You're describing a very special case where the
* Eric Blake:
int open_safer (const char *name, int flags, int mode)
{
int fd = open (name, flags | O_CLOEXEC, mode);
if (0 = fd fd = 2)
{
int dup = fcntl (fd, ((flags O_CLOEXEC)
? F_DUPFD_CLOEXEC : F_DUPFD), 3);
int saved_errno = errno;
Bruno Haible br...@clisp.org writes:
On Solaris/x86, with SunPRO C 5.9, the test-func test fails. The reason
is that
sizeof __func__
evaluates to 0. The compiler warns about it:
test-func.c, line 40: warning: null dimension: sizeof()
What to do? m4/func.m4 could defined __func__ to a
Alan Hourihane al...@fairlite.co.uk ha escrit:
As the subject line says, and I end up with an unresolved symbol.
Please try this patch:
diff --git a/lib/exclude.c b/lib/exclude.c
index 32f2a0a..00f3891 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -31,6 +31,7 @@
#include stdio.h
#include
On Thu, 27 Aug 2009, Eric Blake wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Davide Libenzi on 8/25/2009 3:53 PM:
Another solution is for the application to sanitize all newly-created
fds: GNU coreutils provides a wrapper open_safer, which does nothing
extra in the