Import include/filenames.h from BFD (Windows/DJGPP testers needed)
Andris Pavenis
pavenis@latnet.lv
Tue Jul 1 06:54:00 GMT 2003
On Monday 30 June 2003 22:18, Zack Weinberg wrote:
> This patch brings over include/filenames.h from BFD and changes all
> the apposite locations to use it. I have bootstrapped it on
> i686-linux with no problem, but I need help testing it on Windows
> and/or DJGPP hosts.
>
> zw
>
> include:
> * filenames.h: New file, imported from binutils.
> gcc:
> * system.h: Include filenames.h.
> (IS_DIR_SEPARATOR, IS_ABSOLUTE_PATHNAME): Don't define.
> (DIR_SEPARATOR, DIR_SEPARATOR_2): If not already defined,
> define based on HAVE_DOS_BASED_FILE_SYSTEM.
> * config/i386/xm-cygwin.h, config/i386/xm-djgpp.h
> * config/i386/xm-mingw32.h: Don't define
> HAVE_DOS_BASED_FILE_SYSTEM, DIR_SEPARATOR, or DIR_SEPARATOR_2.
> * doc/hostconfig.texi: Update to match.
>
> * cppfiles.c, gcc.c, gensupport.c, protoize.c,
> config/i386/cygwin.h: Use IS_ABSOLUTE_PATH throughout.
> * gcc.c (DIR_UP): Delete, unused.
> * protoize.c (IS_SAME_PATH): Define in terms of FILENAME_CMP.
> (is_abspath): Delete.
> gcc/java:
> * jcf-path.c: Don't default-define PATH_SEPARATOR nor
> DIR_SEPARATOR. Use FILENAME_CMP.
> * jcf-write.c: Don't default-define DIR_SEPARATOR.
> * jcf.h: Delete COMPARE_FILENAMES definition.
>
One more related thing:
libiberty/make-relative-prefix.c uses case sensitive comparisson for
filenames. In thee case we should (fMSDOS, Windows) use strcasecmp()
instead of strcmp(). strcasecmp() is already present in libiberty, so it
should not be a problem. Perhaps it could be done by some macro
with the defaulting to strcmp().
Andris
More information about the Gcc-patches
mailing list