summaryrefslogtreecommitdiff
path: root/gcc/tsystem.h
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-02 15:51:11 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-02 15:51:11 +0000
commit9acd1352b18ccf6cb7d5d64845fcf54985db7267 (patch)
tree09acf4a2490462e9d2f635d718f2660e4e39eb3b /gcc/tsystem.h
parentf29def9dd34c4419d16f1344efd2d7cebf6820d1 (diff)
downloadgcc-9acd1352b18ccf6cb7d5d64845fcf54985db7267.tar.gz
* tsystem.h: Define HAVE_DECL_GETOPT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tsystem.h')
-rw-r--r--gcc/tsystem.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tsystem.h b/gcc/tsystem.h
index 244e5c06c2a..a20dbe746b6 100644
--- a/gcc/tsystem.h
+++ b/gcc/tsystem.h
@@ -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>