Re: DOS pathname separators?
Re: DOS pathname separators?
- Subject: Re: DOS pathname separators?
- From: Brad Oliver <email@hidden>
- Date: Tue, 9 Aug 2005 14:41:51 -0700
On Aug 9, 2005, at 1:20 PM, Markus Hitter wrote:
One idea would be to use a pre-pre processor to do the work. Name a
script e.g. "dos-cpp", put it into a convenient place and tell
Xcode to use this preprocessor instead of gcc to compile files. The
custom script should finally invoke the real gcc, of course.
This is a good suggestion, but I think there's a problem. Correct me
if I'm wrong, but using this as a pre-pre-processor step will solve
the issue of "\" separators in .c and .cpp files, but wouldn't solve
the issue of #includes found in .h files...?
I also understand that gcc does a smart equivalent of #pragma once
for files with header guards, and I suspect that manually walking
through each file that is #included in order to look for nested
#includes would defeat that mechanism. I've given up a lot of compile-
time speed in the switch from CodeWarrior already, so I'm somewhat
reluctant to give up any more if I can help it.
For one, foreign file path separators have nothing to do with Mac
OS X or any other Unix-like OS and for two, gcc doesn't even know
about paths. For gcc, these are just plain strings.
I believe gcc does know, according to the docs:
<http://gcc.gnu.org/onlinedocs/gccint/Filesystem.html#Filesystem>
...specifically, DIR_SEPARATOR and DIR_SEPARATOR_2. I fully
comprehend that "\" is not a valid path separator on the Mac, but
that does me no good.
In my perfect world, I'd like to see Apple's gcc branch accept "\" as
an equivalent path separator, but only as a compile flag passed to
gcc. That way purists and those devs who are crazy enough to use
filenames with a "\" in them can continue to live in peace and harmony.
--
Brad Oliver
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden