From: Paul Eggert Date: Wed, 21 Feb 2007 07:54:16 +0000 (+0000) Subject: Minor fixups to port to Solaris 10 with Sun C 5.8. X-Git-Tag: cvs-readonly~1004 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=d691dc95255e598552049fa9d121a6f84cf36568;p=gnulib.git Minor fixups to port to Solaris 10 with Sun C 5.8. * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd. * modules/getcwd (Depends-on): Add dirfd. * lib/putenv.c (putenv): #undef it. (rpl_putenv): New decl. (malloc, free): Include rather than prototyping separately. --- diff --git a/ChangeLog b/ChangeLog index 026217331..f7aa7381e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-02-20 Paul Eggert + + Minor fixups to port to Solaris 10 with Sun C 5.8. + * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd. + * modules/getcwd (Depends-on): Add dirfd. + * lib/putenv.c (putenv): #undef it. + (rpl_putenv): New decl. + (malloc, free): Include rather than prototyping separately. + 2007-02-20 Bruno Haible * modules/stdio-tests: New file. diff --git a/lib/getcwd.c b/lib/getcwd.c index dea0ebcac..f8567bd73 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -19,6 +19,7 @@ #if !_LIBC # include # include +# include "dirfd.h" #endif #include diff --git a/lib/putenv.c b/lib/putenv.c index d90401618..5fa576a81 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -20,6 +20,12 @@ #include +/* undef putenv here, because some (e.g., Solaris 10) declare putenv in + with a non-const argument. That would conflict with the declaration of + rpl_putenv below (due to the #define putenv rpl_putenv from config.h). */ +#undef putenv +int rpl_putenv (char const *); + #include /* Include errno.h *after* sys/types.h to work around header problems @@ -29,15 +35,8 @@ # define __set_errno(ev) ((errno) = (ev)) #endif -/* Don't include stdlib.h because some (e.g., Solaris 7) declare putenv - with a non-const argument. That would conflict with the declaration of - rpl_putenv below (due to the #define putenv rpl_putenv from config.h). */ - -void *malloc (); -void free (); - +#include #include - #include #if HAVE_GNU_LD diff --git a/modules/getcwd b/modules/getcwd index 5d85b4d58..f32453e37 100644 --- a/modules/getcwd +++ b/modules/getcwd @@ -10,6 +10,7 @@ m4/getcwd.m4 Depends-on: mempcpy d-ino +dirfd extensions stdbool unistd