aboutsummaryrefslogtreecommitdiff
path: root/posix/regex_internal.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-26 14:13:43 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-27 11:17:06 -0800
commitc0feb731d5bd063f351487c28eadaf37b33d07a5 (patch)
tree7e8a78f51ab1f1b0cb257f518bd93af30c9ccc58 /posix/regex_internal.h
parent5289f1f56b7174da6b036d24a7626d9cd658fb01 (diff)
downloadglibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.tar
glibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.tar.gz
glibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.tar.bz2
glibc-c0feb731d5bd063f351487c28eadaf37b33d07a5.zip
regex: simplify Gnulib port
This simplifies the code, by removing stuff intended for porting to Gnulib but no longer needed there. * posix/regcomp.c [!_LIBC]: No need to put #ifdef _LIBC around uses of libc_hidden_def, weak_alias. * posix/regcomp.c, posix/regexec.c: Use __restrict rather than _Restrict_ except for public-facing headers. * posix/regex_internal.h (attribute_hidden) [!_LIBC]: Remove; already defined elsewhere. * posix/regex.c, posix/regex_internal.h: Use __GNUC_PREREQ instead of rolling our own. * posix/regex_internal.h (__GNUC_PREREQ): Remove duplicate defn.
Diffstat (limited to 'posix/regex_internal.h')
-rw-r--r--posix/regex_internal.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index f4b2702868..c7df419334 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -144,10 +144,9 @@
# define __mbrtowc mbrtowc
# define __wcrtomb wcrtomb
# define __regfree regfree
-# define attribute_hidden
#endif /* not _LIBC */
-#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
+#if !__GNUC_PREREQ (3, 1)
# define __attribute__(arg)
#endif
@@ -868,15 +867,6 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
}
#endif /* RE_ENABLE_I18N */
-#ifndef __GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_MINOR__
-# define __GNUC_PREREQ(maj, min) \
- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-# else
-# define __GNUC_PREREQ(maj, min) 0
-# endif
-#endif
-
#if __GNUC_PREREQ (3,4)
# undef __attribute_warn_unused_result__
# define __attribute_warn_unused_result__ \