From: Christopher Faylor <me@cgf.cx>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Suggested ways to remove the need for xm-go32.h
Date: Thu, 23 Sep 2004 21:14:00 -0000 [thread overview]
Message-ID: <20040923211643.GA22829@trixie.casa.cgf.cx> (raw)
In-Reply-To: <200409232058.i8NKwHg4009186@elgar.sibelius.xs4all.nl>
On Thu, Sep 23, 2004 at 10:58:17PM +0200, Mark Kettenis wrote:
> 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.
i.e.,
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN([BFD_BINARY_FOPEN],
[AC_REQUIRE([AC_CANONICAL_SYSTEM])
case "${host}" in
changequote(,)dnl
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
changequote([,])dnl
AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
esac])dnl
Since I've never had to worry about this in binutils, it's probably ok
but, these days, I think it's backwards to put the burden on the
maintainers of the modern systems (i.e., cygwin and DJGPP) at the
expense of the hypothetical ancient ones. Why not let the Ultrix
maintainer worry about this rather than the cygwin/djgpp maintainers?
> >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 ':'.
Cygwin is a POSIX emulation and it should be using the same thing as
UNIX. You can actually use colons (and semicolons for that matter) in
file names in Cygwin, depending on the mount option.
A simple way to see what the preference is would be to poll the PATH
environment variable. But, then, it's easy enough to must make it ';'
for the one host that needs it by using a similar technique to the
above.
cgf
next prev parent reply other threads:[~2004-09-23 21:14 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-18 13:21 Eli Zaretskii
2004-09-19 11:44 ` Mark Kettenis
2004-09-20 3:33 ` Eli Zaretskii
2004-09-22 20:21 ` Michael Chastain
2004-09-23 4:51 ` Eli Zaretskii
2004-09-23 6:02 ` Michael Chastain
2004-09-23 8:14 ` Corinna Vinschen
2004-09-23 5:03 ` Christopher Faylor
2004-09-23 6:30 ` Michael Chastain
2004-09-23 8:02 ` Corinna Vinschen
2004-09-24 10:51 ` Eli Zaretskii
2004-09-24 14:35 ` Andrew Cagney
2004-09-23 13:56 ` Christopher Faylor
2004-09-23 17:20 ` Michael Chastain
2004-09-23 17:24 ` Christopher Faylor
2004-09-23 15:18 ` Joel Brobecker
2004-09-23 17:57 ` Daniel Jacobowitz
2004-09-24 15:05 ` Andrew Cagney
2004-09-25 16:43 ` Eli Zaretskii
2004-09-26 18:38 ` Mark Kettenis
2004-09-27 2:29 ` Daniel Jacobowitz
2004-09-23 20:58 ` Mark Kettenis
2004-09-23 21:14 ` Christopher Faylor [this message]
2004-09-24 10:48 ` Eli Zaretskii
2004-09-24 12:23 ` Corinna Vinschen
2004-09-24 13:39 ` Andreas Schwab
2004-09-24 19:51 ` Christopher Faylor
2004-09-24 21:16 ` Christopher Faylor
2004-09-24 21:32 ` Andreas Schwab
2004-09-24 13:40 ` Eli Zaretskii
2004-09-24 16:49 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040923211643.GA22829@trixie.casa.cgf.cx \
--to=me@cgf.cx \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox