changeset 12835:7217c0b5595d

regex: fix build failure * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc platforms. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Thu, 28 Jan 2010 06:46:05 -0700
parents baafee3ff85b
children 39251fa967fc
files ChangeLog lib/regex_internal.h
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-28  Eric Blake  <ebb9@byu.net>
+
+	regex: fix build failure
+	* lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc
+	platforms.
+
 2010-01-28  Jim Meyering  <meyering@redhat.com>
 
 	regex: do not ignore memory allocation failure
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -851,6 +851,15 @@
 }
 #endif /* RE_ENABLE_I18N */
 
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+#  define __GNUC_PREREQ(maj, min) \
+         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+#  define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
 #if __GNUC_PREREQ (3,4)
 # undef __attribute_warn_unused_result__
 # define __attribute_warn_unused_result__ \