Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Question about CODESET macro inside config/djgpp/langinfo.h
@ 2011-03-21 16:27 Pierre Muller
  2011-03-21 16:53 ` Mark Kettenis
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2011-03-21 16:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: 'Eli Zaretskii'

  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.

Albeit harmless, this is listed as a macro to remove...
I don't see any code testing for the presence of this macro.
The configure script should work unchanged if we remove that line, no?
I also looked into config/djgpp/djconfig.sh 
and I don't see where it could trigger any change.

Any objection to remove that macro?

Pierre Muller


Changelog entry:

2011-03-21  Pierre Muller  <muller@ics.u-strasbg.fr>

	* config/djgpp/langinfo.h (CODESET macro): Remove.



Pierre@E6510-Muller ~/git/archer
$ git diff gdb/config/djgpp
diff --git a/gdb/config/djgpp/langinfo.h b/gdb/config/djgpp/langinfo.h
index d3a5672..a624f78 100644
--- a/gdb/config/djgpp/langinfo.h
+++ b/gdb/config/djgpp/langinfo.h
@@ -28,8 +28,6 @@ enum {
   _NL_NUM
 };

-#define CODESET CODESET
-
 extern char *nl_langinfo (nl_item);

 #endif /* _LANGINFO_H */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] Question about CODESET macro inside config/djgpp/langinfo.h
  2011-03-21 16:27 [RFC] Question about CODESET macro inside config/djgpp/langinfo.h Pierre Muller
@ 2011-03-21 16:53 ` Mark Kettenis
  2011-03-21 17:25   ` Pierre Muller
  2011-03-21 20:10   ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Kettenis @ 2011-03-21 16:53 UTC (permalink / raw)
  To: pierre.muller; +Cc: gdb-patches, eliz

> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC] Question about CODESET macro inside config/djgpp/langinfo.h
  2011-03-21 16:53 ` Mark Kettenis
@ 2011-03-21 17:25   ` Pierre Muller
  2011-03-21 20:10   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2011-03-21 17:25 UTC (permalink / raw)
  To: 'Mark Kettenis'; +Cc: gdb-patches, eliz

  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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] Question about CODESET macro inside config/djgpp/langinfo.h
  2011-03-21 16:53 ` Mark Kettenis
  2011-03-21 17:25   ` Pierre Muller
@ 2011-03-21 20:10   ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2011-03-21 20:10 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: pierre.muller, gdb-patches

> Date: Mon, 21 Mar 2011 17:12:37 +0100 (CET)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: gdb-patches@sourceware.org, eliz@gnu.org
> 
> > 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.

I'm not sure it's required, but every implementation I've seen has
this macro, so I put it in as well.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-21 18:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21 16:27 [RFC] Question about CODESET macro inside config/djgpp/langinfo.h Pierre Muller
2011-03-21 16:53 ` Mark Kettenis
2011-03-21 17:25   ` Pierre Muller
2011-03-21 20:10   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox