* tsystem.h: Define HAVE_DECL_GETOPT.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 2 Jan 2001 15:51:11 +0000 (15:51 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 2 Jan 2001 15:51:11 +0000 (15:51 +0000)
From-SVN: r38623

gcc/ChangeLog
gcc/tsystem.h

index 54428c3fd53d495214a7840b10c668a24de4c022..f219ae007d8e4e82e0fcae7b64f74c44ba024c65 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * tsystem.h: Define HAVE_DECL_GETOPT.
+
 2001-01-02  Philip Blundell  <pb@futuretv.com>
 
        * config/arm/linux-gas.h (CLEAR_INSN_CACHE): Avoid illegal clobber 
index 244e5c06c2abd65dba2b5e9f78afea6d5b45c983..a20dbe746b63472fb7e01f6c69b6be11f67d7423 100644 (file)
@@ -1,6 +1,6 @@
 /* Get common system includes and various definitions and declarations
    based on target macros.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -22,6 +22,17 @@ Boston, MA 02111-1307, USA.  */
 #ifndef __GCC_TSYSTEM_H__
 #define __GCC_TSYSTEM_H__
 
+/* System headers (e.g. stdio.h, stdlib.h, unistd.h) sometimes
+   indirectly include getopt.h.  Our -I flags will cause gcc's gnu
+   getopt.h to be included, not the platform's copy.  In the default
+   case, gnu getopt.h will provide us with a no-argument prototype
+   which will generate -Wstrict-prototypes warnings.  None of the
+   target files actually use getopt, so it is safe to tell gnu
+   getopt.h we never need this prototype.  */
+#ifndef HAVE_DECL_GETOPT
+#define HAVE_DECL_GETOPT 1
+#endif
+
 /* GCC supplies this header. */
 #include <stddef.h>