Minor fixups to port to Solaris 10 with Sun C 5.8.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Feb 2007 07:54:16 +0000 (07:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Feb 2007 07:54:16 +0000 (07:54 +0000)
* 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.

ChangeLog
lib/getcwd.c
lib/putenv.c
modules/getcwd

index 0262173..f7aa738 100644 (file)
--- 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.
index dea0ebc..f8567bd 100644 (file)
@@ -19,6 +19,7 @@
 #if !_LIBC
 # include <config.h>
 # include <unistd.h>
+# include "dirfd.h"
 #endif
 
 #include <errno.h>
index d904016..5fa576a 100644 (file)
 
 #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
 # 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
index 5d85b4d..f32453e 100644 (file)
@@ -10,6 +10,7 @@ m4/getcwd.m4
 Depends-on:
 mempcpy
 d-ino
+dirfd
 extensions
 stdbool
 unistd