This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix MinGW compilation warnings due to environ.h


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b9c6833008dfb3c45354f4e810e631a77f3c9cb3

commit b9c6833008dfb3c45354f4e810e631a77f3c9cb3
Author: Eli Zaretskii <eliz@gnu.org>
Date:   Wed May 31 09:35:07 2017 +0300

    Fix MinGW compilation warnings due to environ.h
    
    include/ChangeLog:
    
    2017-05-31  Eli Zaretskii <eliz@gnu.org>
    
    	* environ.h: Add #ifndef guard.

Diff:
---
 include/ChangeLog | 4 ++++
 include/environ.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/include/ChangeLog b/include/ChangeLog
index 1ec91cd..c1fdb8e 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-31  Eli Zaretskii <eliz@gnu.org>
+
+	* environ.h: Add #ifndef guard.
+
 2017-05-30  Anton Kolesov  <anton.kolesov@synopsys.com>
 
 	* elf/arc-cpu.def: New file.
diff --git a/include/environ.h b/include/environ.h
index 326a278..32bb0b1 100644
--- a/include/environ.h
+++ b/include/environ.h
@@ -27,7 +27,9 @@ Boston, MA 02110-1301, USA.  */
 #     include <crt_externs.h>
 #     define environ (*_NSGetEnviron ())
 #  else
+#    ifndef environ
 extern char **environ;
+#    endif
 #  endif
 #  define HAVE_ENVIRON_DECL
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]