Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> 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 _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib