This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
posix/getopt.h __GNUC_PREREQ typo fix
- From: Paul Eggert <eggert at CS dot UCLA dot EDU>
- To: libc-alpha at sources dot redhat dot com
- Date: 18 Mar 2004 16:13:00 -0800
- Subject: posix/getopt.h __GNUC_PREREQ typo fix
Here's a patch for an obvious minor typo in the March 9 change to
posix/getopt.h. The bug prevents compilation by GCC on a non-glibc
platform: in that case the code uses __GNUC_PREREQ without defining
it. I observed this on Solaris 8 with GCC 3.3.3.
2004-03-18 Paul Eggert <eggert@cs.ucla.edu>
* posix/getopt.h (__GNUC_PREREQ) [!defined __THROW]: Define
if not defined, fixing a typo (it used to be defined if
__GNUC__ was not defined).
Index: posix/getopt.h
===================================================================
RCS file: /cvs/glibc/libc/posix/getopt.h,v
retrieving revision 1.20
diff -p -u -r1.20 getopt.h
--- posix/getopt.h 9 Mar 2004 10:33:29 -0000 1.20
+++ posix/getopt.h 19 Mar 2004 00:02:33 -0000
@@ -36,7 +36,7 @@
#endif
#ifndef __THROW
-# ifndef __GNUC__
+# ifndef __GNUC_PREREQ
# define __GNUC_PREREQ(maj, min) (0)
# endif
# if defined __cplusplus && __GNUC_PREREQ (2,8)