# 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
# 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 */
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
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 */
{
const char *msg;
size_t msg_size;
+ (void)preg;
if (errcode < 0
|| errcode >= (int) (sizeof (re_error_msgid)