OSDN Git Service

* java/util/Hashtable.java (Enumerator): Ensure that if
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / gnu-regex.c
index 4b71a4d..c4a8244 100644 (file)
 # include <config.h>
 #endif
 
+/* GCC LOCAL: we don't need NLS here.  */
+#undef ENABLE_NLS
+/* GCC LOCAL: to handle defining alloca.  */
+#include "libiberty.h"
+
 /* Do not use a C alloca, we will leak memory and crash.  */
 #ifdef C_ALLOCA
 # define REGEX_MALLOC
 # define gettext_noop(String) String
 #endif
 
-/* The `emacs' switch turns on certain matching commands
-   that make sense only in Emacs. */
-#ifdef emacs
-
-# include "lisp.h"
-# include "buffer.h"
-# include "syntax.h"
-
-#else  /* not emacs */
-
-# include "auto-host.h"
-
 # if !defined(volatile) && !defined(HAVE_VOLATILE)
 #  define volatile
 # endif
@@ -191,8 +184,6 @@ init_syntax_once ()
 # endif /* not SYNTAX_TABLE */
 
 # define SYNTAX(c) re_syntax_table[c]
-
-#endif /* not emacs */
 \f
 /* Get the interface, including the syntax bits.  */
 /* GCC LOCAL: call it gnu-regex.h, not regex.h, to avoid name conflicts */
@@ -922,7 +913,7 @@ printchar (c)
    syntax, so it can be changed between regex compilations.  */
 /* This has no initializer because initialized variables in Emacs
    become read-only after dumping.  */
-static reg_syntax_t re_syntax_options;
+reg_syntax_t re_syntax_options;
 
 
 /* Specify the precise syntax of regexps for compilation.  This provides
@@ -956,7 +947,7 @@ weak_alias (__re_set_syntax, re_set_syntax)
    POSIX doesn't require that we do anything for REG_NOERROR,
    but why not be nice?  */
 
-static const char *re_error_msgid[] =
+static const char *const re_error_msgid[] =
   {
     gettext_noop ("Success"),  /* REG_NOERROR */
     gettext_noop ("No match"), /* REG_NOMATCH */
@@ -5710,6 +5701,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
 {
   const char *msg;
   size_t msg_size;
+  (void)preg;
 
   if (errcode < 0
       || errcode >= (int) (sizeof (re_error_msgid)