From: Eli Zaretskii <eliz@gnu.org>
To: danny.backx@scarlet.be
Cc: tromey@redhat.com, gdb@sourceware.org
Subject: Re: Build question
Date: Tue, 01 Sep 2009 19:34:00 -0000 [thread overview]
Message-ID: <83zl9e8nro.fsf@gnu.org> (raw)
In-Reply-To: <1251828295.6106.119.camel@pavilion>
> From: Danny Backx <danny.backx@scarlet.be>
> Cc: tromey@redhat.com, gdb@sourceware.org
> Date: Tue, 01 Sep 2009 20:04:55 +0200
>
> Getting most things I care about to work is done by simplifying
> include/filenames.h so it unconditionally takes the DOS versions of
> IS_DIR_SEPARATOR() and IS_ABSOLUTE_PATH().
If Unix users will not be too unhappy about that, as Daniel says, I
don't mind. But I still think it's a better idea to have a
user-settable option to control that at runtime.
> Apart from that, HAVE_DOS_BASED_FILE_SYSTEM is used in a number of
> sources (even though filenames.h appears to do much already) :
> ./libiberty/make-relative-prefix.c
> ./libiberty/basename.c
> ./libiberty/lbasename.c
> ./include/filenames.h
> ./bfd/archive.c
> ./gdb/utils.c
> ./gdb/cli/cli-cmds.c
> ./gdb/completer.c
> ./gdb/symtab.c
> ./gdb/source.c
>
> Quick analysis :
>
> The code in bfd/archive.c could probably be cleaned up based on
> IS_DIR_SEPARATOR.
Even better, just use lbasename or even basename.
> The code in gdb/utils.c could just always be compiled in.
Again, if Unix users don't mind losing support for files of the form
"d:foo".
> Same, I think, for gdb/cli/cli-cmds.c.
No, this one needs another macro: FILENAME_PREFIX_LEN, which should be
1 on Posix platforms and 3 on DOS-ish systems. Use the DOS-ish
variant on Posix systems if "d:/foo" is not an important file name.
> One part of gdb/completer.c is file name break characters. Not sure how
> to deal with those.
That one needs to be left as-is on DOS/Windows, but not on Unix. But
this is just for completion, so it's not a grave problem for your
use-case.
> The other #if is no problem.
Again, we need FILENAME_PREFIX_LEN here. See above.
> The stuff in gdb/symtab.c does case independent string compare in the
> DOS case.
I see a need for FILENAME_CMPN here, similar to FILENAME_CMP that we
already have. But using this on Unix is a bad idea, I think: you do
NOT want case-insensitive file comparison there, do you?
> gdb/source.c looks safe too.
FILENAME_PREFIX_LEN again for the first hunk, something like realpath
for the second, I think. Do we care about "d:" on Posix systems?
next prev parent reply other threads:[~2009-09-01 19:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 0:24 Danny Backx
2009-08-21 17:30 ` Tom Tromey
2009-08-21 17:57 ` Eli Zaretskii
2009-08-21 18:23 ` Danny Backx
2009-08-21 18:51 ` Eli Zaretskii
2009-08-21 20:15 ` Danny Backx
2009-08-21 21:57 ` Eli Zaretskii
2009-08-22 9:03 ` Tom Tromey
2009-08-22 9:55 ` Danny Backx
2009-08-22 11:07 ` Eli Zaretskii
2009-08-24 10:11 ` Danny Backx
2009-09-01 18:03 ` Danny Backx
2009-09-01 19:34 ` Eli Zaretskii [this message]
2009-09-01 20:10 ` Danny Backx
2009-09-02 3:25 ` Eli Zaretskii
2009-09-05 9:33 ` Danny Backx
2009-09-01 19:35 ` Eli Zaretskii
2009-08-22 22:01 ` Daniel Jacobowitz
2009-08-23 7:28 ` Joel Brobecker
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=83zl9e8nro.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=danny.backx@scarlet.be \
--cc=gdb@sourceware.org \
--cc=tromey@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