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]

[PATCH] Add alloca cruft to regex.c


Now alloca is used even if !_LIBC, so the standard cruft is needed.

Paolo
Index: regex.c
===================================================================
RCS file: /cvs/glibc/libc/posix/regex.c,v
retrieving revision 1.124
diff -u -r1.124 regex.c
--- regex.c	16 Nov 2003 07:03:23 -0000	1.124
+++ regex.c	7 Jan 2004 14:00:09 -0000
@@ -18,6 +18,34 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(_AIX)
+#pragma alloca
+#else
+# if !defined(alloca)           /* predefined by HP cc +Olibcalls */
+#  ifdef __GNUC__
+#   define alloca(size) __builtin_alloca(size)
+#  else
+#   if HAVE_ALLOCA_H
+#    include <alloca.h>
+#   else
+#    if defined(__hpux)
+        void *alloca ();
+#    else
+#     if !defined(__OS2__) && !defined(WIN32)
+        char *alloca ();
+#     else
+#      include <malloc.h>       /* OS/2 defines alloca in here */
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
 #ifdef _LIBC
 /* We have to keep the namespace clean.  */
 # define regfree(preg) __regfree (preg)
Index: regex_internal.h
===================================================================
RCS file: /cvs/glibc/libc/posix/regex_internal.h,v
retrieving revision 1.43
diff -u -r1.43 regex_internal.h
--- regex_internal.h	6 Jan 2004 21:59:50 -0000	1.43
+++ regex_internal.h	7 Jan 2004 14:00:10 -0000
@@ -21,10 +21,6 @@
 #ifndef _REGEX_INTERNAL_H
 #define _REGEX_INTERNAL_H 1
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <ctype.h>
 #include <limits.h>

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