From: Eric Blake Date: Thu, 28 Jan 2010 13:46:05 +0000 (-0700) Subject: regex: fix build failure X-Git-Tag: v0.1~4652 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=e296359d39962cfd1f8b15877ada83d95878fdd7;p=gnulib.git regex: fix build failure * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc platforms. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index c3cb30046..384307830 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-28 Eric Blake + + regex: fix build failure + * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc + platforms. + 2010-01-28 Jim Meyering regex: do not ignore memory allocation failure diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 704d1cc9d..e1b4c61b3 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -851,6 +851,15 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) } #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__ \