posix/getopt.h __GNUC_PREREQ typo fix

Paul Eggert eggert@CS.UCLA.EDU
Fri Mar 19 00:13:00 GMT 2004


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)



More information about the Libc-alpha mailing list