libiberty/setenv.c: Do not declare environ if defined as a macro.
authorJoel Brobecker <brobecker@adacore.com>
Wed, 22 Apr 2015 19:35:54 +0000 (12:35 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Wed, 22 Apr 2015 19:37:52 +0000 (12:37 -0700)
Otherwise, it causes a build warning on some platforms such as MinGW.

libiberty/ChangeLog (Eli Zaretskii  <eliz@gnu.org>):

        * setenv.c <environ>: Declare only if not a macro.

libiberty/ChangeLog
libiberty/setenv.c

index 22e3f8504b3aedd6663b460c50d31f98366d0f43..50098071d39b276743fb313d4aa1cde34dd22756 100644 (file)
@@ -1,3 +1,7 @@
+2015-04-22  Eli Zaretskii  <eliz@gnu.org>
+
+       * setenv.c <environ>: Declare only if not a macro.
+
 2015-01-19  Eli Zaretskii  <eliz@gnu.org>
 
        * strerror.c <sys_nerr, sys_errlist>: Declare only if they aren't
index 96917d5769f484e8f923de5ec75278b4319be6fe..714ca0a407687e9be46c3da4427f974186a2b9f1 100644 (file)
@@ -63,8 +63,10 @@ extern int errno;
 
 #define __environ      environ
 #ifndef HAVE_ENVIRON_DECL
+#ifndef environ
 extern char **environ;
 #endif
+#endif
 
 #undef setenv
 #undef unsetenv
This page took 0.029462 seconds and 4 git commands to generate.