This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Suggested ways to remove the need for xm-go32.h


   Date: Thu, 23 Sep 2004 01:05:34 -0400
   From: Christopher Faylor <me@cgf.cx>

   On Sat, Sep 18, 2004 at 04:18:31PM +0300, Eli Zaretskii wrote:
   >Here's how I propose to deal with each one of these:
   >
   >1.  fopen-bin.h: I suggest to modify the default definitions of the
   >    FOPEN_* macros on defs.h to the ANSI/ISO-compatible "rb", "wb",
   >    etc. strings that include the "b" modifier.  Since we already
   >    require ISO C compliance from all the ports, such a default must
   >    DTRT.  Once the defaults are changed, there should be no need to
   >    use fopen-bin.h neither in the DJGPP nor in the Cygwin port.

   I'd be happy to see this but I see that later in the thread that we
   seem to be converging on a wrapper function.

I still favour the wrapper function, since that's more robust, but I
wouldn't really object if we'd use exactly the same configure magic as
BFD does.  Note that that imposes a burden on the maintainers of
DOS-ish systems to keep it in sync with BFD.

   >4.  DIRNAME_SEPARATOR: The DOS-specific definition can be put either
   >    in defs.h or local to the only file that uses it (source.c).

   This could be determined at configure time couldn't it?  You could
   play with the path to see if a colon or semicolon does the desired
   thing and then set it appropriately via config.in.

Please note that DIRNAME_SEPARATOR is only used in GDB.  Preferably it
would be the same on all hosts, although it makes sense to follow the
convention of the host platform if there is one.  That's why we have
':' on POSIX-ish systems.  The most important reasone why it's
something different on DOS-ish systems, is that ':' is to specify
drive letters and therefore useless as a sepatator.  Makes me wonder
why cygwin uses ':'.

Mark



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]