[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] stat and lstat should define their replacements
From: |
Derek Price |
Subject: |
Re: [bug-gnulib] stat and lstat should define their replacements |
Date: |
Fri, 27 May 2005 15:09:56 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Paul Eggert wrote:
>Derek Price <address@hidden> writes:
>
>
>
>>+/* Get the system versions when something else was defined by config.h. */
>>+#undef lstat
>>+#undef stat
>>
>>
>
>A big worry here is hosts that use something like "#define stat
>stat64" when compiled in large-file mode. On such hosts, you can't
>#undef 'stat' and 'lstat' as you'll then get the small-file functions.
>This may help to explain the infelicity in this area of gnulib.
>
Actually, you can, as specified by my patch, since #undef lstat and
#undef stat occur just after inclusion of <config.h> but before the
inclusion of <sys/stat.h>. I think the problem is my #define stat and
#define lstat in config.h. From a file other than the lib/stat.c file
which performs the #undefs you cited, then a host like Solaris which
later does a #define stat stat64 in <sys/stat.h> can cause the host to
issue redefinition warnings.
Of course, this should be harmless, since all the references in other
files should want the rpl_stat and rpl_lstat functions, and the #undefs
in lib/stat.c will allow it to get the correct versions there. And, as
you mention, the GCC 3.4 fix will even silence the warnings.
Cheers,
Derek
- Re: [bug-gnulib] stat and lstat should define their replacements, (continued)
- Re: [bug-gnulib] stat and lstat should define their replacements, Paul Eggert, 2005/05/25
- Re: [bug-gnulib] Re: [bug-gnulib] stat and lstat should define their replacements, Bruno Haible, 2005/05/25
- Re: [bug-gnulib] Re: [bug-gnulib] stat and lstat should define their replacements, Derek Price, 2005/05/25
- [bug-gnulib] Re: stat and lstat should define their replacements, Jim Meyering, 2005/05/26
- [bug-gnulib] Re: stat and lstat should define their replacements, Paul Eggert, 2005/05/27
- [bug-gnulib] Re: stat and lstat should define their replacements, Bruno Haible, 2005/05/27
- [bug-gnulib] Re: stat and lstat should define their replacements, Derek Price, 2005/05/27
- [bug-gnulib] Re: stat and lstat should define their replacements, Paul Eggert, 2005/05/27
- [bug-gnulib] Re: stat and lstat should define their replacements, Jim Meyering, 2005/05/28
- [bug-gnulib] Re: stat and lstat should define their replacements, Bruno Haible, 2005/05/30
Re: [bug-gnulib] stat and lstat should define their replacements,
Derek Price <=