This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
> Thanks for pointing this. There are other places as well. The problem is > the following: Cygwin gcc needs to support '\' for a variety of reasons, > but we would like it to produce only '/' in (eg., in the pre-processed > output or in the dependency output). The way dir separator is handled in > GCC makes this a bit awkward to handle. DJGPP has a similiar problem. DJGPP still defines DIR_SEPARATOR to '\\'. But in the patches made in the DJGPP port of egcs, DIR_SEPARATOR_1 is defined as '/' and instances of DIR_SEPARATOR are changed to DIR_SEPARATOR_1. So essentially, backslashes are being converted to slashes. So the DJGPP port of egcs has patches that handle the problem, but probably not in a way acceptable to the egcs maintainers. > > Any suggestions on how to handle it is more than welcome. I was going to propose a patch that for DJGPP, DIR_SEPARATOR be changed to '/' and define a new macro DIR_SEPARATOR_2 or perhaps DIR_SEPARATOR_DOS to '\\'. Then in gcc.c and in a few other places, instances of DIR_SEPARATOR_2 would be changed to DIR_SEPARATOR. The patches would essentially a be rewrite of the DJGPP patches I mentioned. I don't see why the DIR_SEPARATOR_2 idea wouldn't also work for cygwin/mingw32 too. --- Mark Elbrecht snowball3@usa.net http://members.xoom.com/snowball3/