This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] Question about CODESET macro inside config/djgpp/langinfo.h
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Mark Kettenis'" <mark dot kettenis at xs4all dot nl>
- Cc: <gdb-patches at sourceware dot org>, <eliz at gnu dot org>
- Date: Mon, 21 Mar 2011 17:26:47 +0100
- Subject: RE: [RFC] Question about CODESET macro inside config/djgpp/langinfo.h
- References: <000c01cbe7e0$53e3f510$fbabdf30$@muller@ics-cnrs.unistra.fr> <201103211612.p2LGCbYU010335@glazunov.sibelius.xs4all.nl>
OK, then it is probably better to fix the
gdb_ari.sh script.
Looking at the corresponding ARI rule,
I think that the pattern to match FILENAME is wrong:
@@ -983,7 +1011,7 @@ Call to set_gdbarch_" name
# Count the number of times each tm/xm/nm macro is defined or undefined
/^#[[:space:]]*(undef|define)[[:space:]]+[[:alnum:]_]+.*$/ \
&&
!/^#[[:space:]]*(undef|define)[[:space:]]+[[:alnum:]_]+_H($|[[:space:]])/ \
-&& FILENAME ~ /(^|\/)(config\/|tm-|xm-|nm-).*\.h$/ {
+&& FILENAME ~ /(^|\/)config\/(|[^\/]*\/)(tm-|xm-|nm-).*\.h$/ {
basename = gensub(/(^|.*\/)([^\/]*)$/, "\\2", 1, FILENAME)
type = gensub(/^(tm|xm|nm)-.*\.h$/, "\\1", 1, basename)
name =
gensub(/^#[[:space:]]*(undef|define)[[:space:]]+([[:alnum:]_]+).*$/,
"\\2", 1, $0)
This patch removes config/djgpp/langinfo.h from
from the list of matches.
Should I apply that change to gdb_ari.sh
so that we can forget about CODESET macro once for all?
Pierre
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Mark Kettenis
> Envoyé?: lundi 21 mars 2011 17:13
> À?: pierre.muller@ics-cnrs.unistra.fr
> Cc?: gdb-patches@sourceware.org; eliz@gnu.org
> Objet?: Re: [RFC] Question about CODESET macro inside
> config/djgpp/langinfo.h
>
> > From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > Cc: "'Eli Zaretskii'" <eliz@gnu.org>
> >
> > Also about macros removal inside config subdirectory:
> >
> > I was wondering about the usefulness of CODESET macro definition
> > inside
> > config/djgpp/langinfo.h
> >
> > #define CODESET CODESET
> >
> > while CODESET is itself a member of an enumeration.
>
> It means that you can check for the macro using #ifdef. I think that
> is required by POSIX.