PATH_SEPARATOR attempted redefined in gcc-4.6 snapshot on certain targets

Tim Prince n8tm@aol.com
Mon Apr 26 14:22:00 GMT 2010


On 4/25/2010 9:41 PM, Ian Lance Taylor wrote:
> Tim Prince<n8tm@aol.com>  writes:
>
>    
>> Where the system.h header of today's snapshot changes the definition
>> of PATH_SEPARATOR on certain targets (including cygwin), is it
>> intended to precede the #define by a #undef?
>>      
> What I see in the current gcc/system.h is:
>
> #ifndef PATH_SEPARATOR
> #define PATH_SEPARATOR ':'
> #endif
>
> Can you explain the issue you are seeing in more detail?
>
> Ian
>    
gcc/system.h  sets PATH_SEPARATOR
#ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':'
#endif

include/filenames.h changes PATH_SEPARATOR:
#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined 
(__CYGW
IN__)
#  ifndef HAVE_DOS_BASED_FILE_SYSTEM
#    define HAVE_DOS_BASED_FILE_SYSTEM 1
#  endif
#  undef PATH_SEPARATOR   // added to enable build
#  define PATH_SEPARATOR ';'
#  define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
#  define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
#  define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
#else /* not DOSish */

-- 
Tim Prince



More information about the Gcc-help mailing list