[09/17] Regex: Add undefs of various routines and macros.
Commit Message
This patch adds undefs for various routines and macros, making the
code more consistent.
2017-11-27 Arnold D. Robbins <arnold@skeeve.com>
* posix/regex_internal.h: Add undefs of various routines / macros.
Comments
On 12/08/2017 10:16 AM, Arnold Robbins wrote:
> +# ifdef inline
> +# undef inline
> +# endif
> +# define inline
Indentation is off. This also applies to the other patch hunk.
These macro manipulations could break system headers, and it seems that
at least <stdint.h> is included after them, so maybe the include order
needs changing.
Thanks,
Florian
Florian Weimer <fweimer@redhat.com> wrote:
> On 12/08/2017 10:16 AM, Arnold Robbins wrote:
> > +# ifdef inline
> > +# undef inline
> > +# endif
> > +# define inline
>
> Indentation is off. This also applies to the other patch hunk.
>
> These macro manipulations could break system headers, and it seems that
> at least <stdint.h> is included after them, so maybe the include order
> needs changing.
>
> Thanks,
> Florian
This is the kind of thing I'll ask the GLIBC maintainers to handle
if / when they integrate.
Thanks,
Arnold
On Dez 08 2017, Arnold Robbins <arnold@skeeve.com> wrote:
> @@ -97,6 +97,10 @@
> # define BE(expr, val) __builtin_expect (expr, val)
> #else
> # define BE(expr, val) (expr)
> +# ifdef inline
> +# undef inline
> +# endif
It's not an error to undef an undefined macro.
Andreas.
Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Dez 08 2017, Arnold Robbins <arnold@skeeve.com> wrote:
>
> > @@ -97,6 +97,10 @@
> > # define BE(expr, val) __builtin_expect (expr, val)
> > #else
> > # define BE(expr, val) (expr)
> > +# ifdef inline
> > +# undef inline
> > +# endif
>
> It's not an error to undef an undefined macro.
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
Heaven only knows how long I've had that bit. But all you're saying
is that the change could be reduced from 3 lines to 1. A minor improvement
to which I have no objection.
THanks,
Arnold
@@ -97,6 +97,10 @@
# define BE(expr, val) __builtin_expect (expr, val)
#else
# define BE(expr, val) (expr)
+# ifdef inline
+# undef inline
+# endif
+# define inline
#endif
/* Number of single byte character. */
@@ -110,10 +114,17 @@
/* Rename to standard API for using out of glibc. */
#ifndef _LIBC
+# ifdef __wctype
+# undef __wctype
+# endif
# define __wctype wctype
+# ifdef __iswctype
+# undef __iswctype
+# endif
# define __iswctype iswctype
# define __btowc btowc
# define __mbrtowc mbrtowc
+#undef __mempcpy
# define __mempcpy mempcpy
# define __wcrtomb wcrtomb
# define __regfree regfree