bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib features.h?


From: Paul Eggert
Subject: Re: gnulib features.h?
Date: Thu, 15 Sep 2005 16:15:15 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Derek Price <address@hidden> writes:

> I've attached hte following for review since I took the liberty of
> replacing two #if __GNUC__ >= constructs in regex_internal.h with
> __GNUC_PREREQ calls.

Let's avoid that, since we want to minimize the differences from glibc.
Other than that, it looks good.  As I understand it, you want the
following change from a day ago.  This is pretty simple.

--- regex_internal.h.~1.14~     2005-09-15 16:10:09.000000000 -0700
+++ regex_internal.h    2005-09-15 16:13:16.000000000 -0700
@@ -84,11 +84,25 @@
 # define RE_ENABLE_I18N
 #endif
 
+#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,1)
+# define always_inline
+#endif
+
 #if __GNUC__ >= 3
 # define BE(expr, val) __builtin_expect (expr, val)
 #else
 # define BE(expr, val) (expr)
 # define inline
+# define pure
 #endif
 
 /* Number of single byte character.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]