This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

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)


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