blob: fa46f635f03b6d776e32a47a040fc732563517a7 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/* Extended regular expression matching and search library.
2 Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
20
21#include <features.h>
22
23#ifdef __UCLIBC__
24# define _REGEX_RE_COMP
25# define HAVE_LANGINFO
26# define HAVE_LANGINFO_CODESET
27# include <stdbool.h>
28# include <stdint.h>
29# include <string.h>
30# include <stdlib.h>
31# ifdef __UCLIBC_HAS_WCHAR__
32# define RE_ENABLE_I18N
33# include <wchar.h>
34# include <wctype.h>
35# define __iswctype iswctype
36# define __wcrtomb wcrtomb
37# define __btowc btowc
38# define __wctype wctype
39# endif
40# include <ctype.h>
41#endif
42
43/* Make sure noone compiles this code with a C++ compiler. */
44#ifdef __cplusplus
45# error "This is C code, use a C compiler"
46#endif
47
48/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
49 GNU regex allows. Include it before <regex.h>, which correctly
50 #undefs RE_DUP_MAX and sets it to the right value. */
51#include <limits.h>
52
53#include <regex.h>
54
55#include "regex_internal.h"
56#include "regex_internal.c"
57#include "regcomp.c"
58#include "regexec.c"