This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Suggested ways to remove the need for xm-go32.h
> Date: Sun, 19 Sep 2004 13:44:28 +0200 (CEST)
> From: Mark Kettenis <kettenis@gnu.org>
> CC: gdb-patches@sources.redhat.com
>
> Thus far, we've required a ISO C compliant *compiler*, but not
> strictly ISO C compliant *libraries*. The reasoning behind this is
> that it's easy to replace the compiler (with gcc), but not so easy to
> replace the system libraries.
I think it's a really rare case that a system has an ISO compiler, but
a non-ISO library (last time I saw such a system was back in 1994: it
was a SunOS 4.3 box where I installed GCC). Nowadays an ISO compiler
goes with an ISO library, and "rb" and friends were mandated by C89,
not the latest C9x.
> I think it'd be better to have wrapper functions that try to open the
> file using the "b" modifier, and if that fails, retry without. It's a
> bit more work, but it should be more robust.
If people prefer this, I don't mind.
> Why not have a list of files to try? That would mean we'd always try
> "gdb.ini" if ".gdbinit" fails, even on Unix.
I have no problems with that, I just thought that Unix users will not
want "gdb.ini".
> 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).
>
> We should probably include "filenames.h" and base the definition on
> HAVE_DOS_BASED_FILE_SYSTEM.
I don't think this will be good, since Cygwin uses
HAVE_DOS_BASED_FILE_SYSTEM, and its DIRNAME_SEPARATOR is ':'. More
generally, HAVE_DOS_BASED_FILE_SYSTEM is somewhat orthogonal to the
DIRNAME_SEPARATOR issue.