summaryrefslogtreecommitdiffstats
path: root/gl/regex_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/regex_internal.h')
-rw-r--r--gl/regex_internal.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/gl/regex_internal.h b/gl/regex_internal.h
index 149ec2e8..1f297299 100644
--- a/gl/regex_internal.h
+++ b/gl/regex_internal.h
@@ -1,5 +1,5 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc. 2 Copyright (C) 2002-2025 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 5
@@ -29,6 +29,7 @@
29#include <locale.h> 29#include <locale.h>
30#include <wchar.h> 30#include <wchar.h>
31#include <wctype.h> 31#include <wctype.h>
32#include <stdckdint.h>
32#include <stdint.h> 33#include <stdint.h>
33 34
34#ifndef _LIBC 35#ifndef _LIBC
@@ -99,10 +100,12 @@
99/* This is for other GNU distributions with internationalized messages. */ 100/* This is for other GNU distributions with internationalized messages. */
100#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC 101#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
101# include <libintl.h> 102# include <libintl.h>
103# undef gettext
102# ifdef _LIBC 104# ifdef _LIBC
103# undef gettext
104# define gettext(msgid) \ 105# define gettext(msgid) \
105 __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) 106 __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
107# else
108# define gettext(msgid) dgettext ("gnulib", msgid)
106# endif 109# endif
107#else 110#else
108# undef gettext 111# undef gettext
@@ -150,9 +153,6 @@
150 as some non-GCC platforms lack them, an issue when this code is 153 as some non-GCC platforms lack them, an issue when this code is
151 used in Gnulib. */ 154 used in Gnulib. */
152 155
153#ifndef SSIZE_MAX
154# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
155#endif
156#ifndef ULONG_WIDTH 156#ifndef ULONG_WIDTH
157# define ULONG_WIDTH REGEX_UINTEGER_WIDTH (ULONG_MAX) 157# define ULONG_WIDTH REGEX_UINTEGER_WIDTH (ULONG_MAX)
158/* The number of usable bits in an unsigned integer type with maximum 158/* The number of usable bits in an unsigned integer type with maximum
@@ -438,12 +438,6 @@ typedef struct re_dfa_t re_dfa_t;
438#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) 438#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
439#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) 439#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
440 440
441#ifdef _LIBC
442# define MALLOC_0_IS_NONNULL 1
443#elif !defined MALLOC_0_IS_NONNULL
444# define MALLOC_0_IS_NONNULL 0
445#endif
446
447#ifndef MAX 441#ifndef MAX
448# define MAX(a,b) ((a) < (b) ? (b) : (a)) 442# define MAX(a,b) ((a) < (b) ? (b) : (a))
449#endif 443#endif
@@ -822,7 +816,7 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
822} 816}
823 817
824#ifdef _LIBC 818#ifdef _LIBC
825# if __GNUC__ >= 7 819# if __glibc_has_attribute (__fallthrough__)
826# define FALLTHROUGH __attribute__ ((__fallthrough__)) 820# define FALLTHROUGH __attribute__ ((__fallthrough__))
827# else 821# else
828# define FALLTHROUGH ((void) 0) 822# define FALLTHROUGH ((void) 0)