Mercurial > hg > octave-shane > gnulib-hg
changeset 8214:822e9380142e
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 <stdlib.h> rather than prototyping separately.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 21 Feb 2007 07:54:16 +0000 |
parents | 66f6fc4edebf |
children | c3429d032540 |
files | ChangeLog lib/getcwd.c lib/putenv.c modules/getcwd |
diffstat | 4 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-02-20 Paul Eggert <eggert@cs.ucla.edu> + + 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 <stdlib.h> rather than prototyping separately. + 2007-02-20 Bruno Haible <bruno@clisp.org> * modules/stdio-tests: New file.
--- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -19,6 +19,7 @@ #if !_LIBC # include <config.h> # include <unistd.h> +# include "dirfd.h" #endif #include <errno.h>
--- a/lib/putenv.c +++ b/lib/putenv.c @@ -20,6 +20,12 @@ #include <config.h> +/* 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 <stddef.h> /* 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 <stdlib.h> #include <string.h> - #include <unistd.h> #if HAVE_GNU_LD