diff options
Diffstat (limited to 'src/preproc/files.c')
-rw-r--r-- | src/preproc/files.c | 84 |
1 files changed, 3 insertions, 81 deletions
diff --git a/src/preproc/files.c b/src/preproc/files.c index 07abf60..016d04d 100644 --- a/src/preproc/files.c +++ b/src/preproc/files.c @@ -5,12 +5,6 @@ #include "../preproc/preproc.h" #include "../preproc/pproto.h" -#if CYGWIN - #include <limits.h> - #include <string.h> - #include <sys/cygwin.h> -#endif /* CYGWIN */ - #define IsRelPath(fname) (fname[0] != '/') static void file_src (char *fname, FILE *f); @@ -27,12 +21,6 @@ FILE *f; { union src_ref ref; - #if CYGWIN - char posix_path[ _POSIX_PATH_MAX + 1 ]; - cygwin_conv_to_posix_path( fname, posix_path ); - fname = strdup( posix_path ); - #endif /* CYGWIN */ - ref.cs = new_cs(fname, f, CBufSize); push_src(CharSrc, &ref); next_char = NULL; @@ -154,31 +142,8 @@ char **opt_args; * that establishes these search locations. */ - #if CYGWIN - char *incl_var; - static char *sysdir = "/usr/include"; - static char *windir = "/usr/include/w32api"; - n_paths = 2; - - incl_var = getenv("C_INCLUDE_PATH"); - if (incl_var != NULL) { - /* - * Add one entry for evry non-empty, colon-separated string in incl_var. - */ - char *dir_start, *dir_end; - - dir_start = incl_var; - while( ( dir_end = strchr( dir_start, ':' ) ) != NULL ) { - if (dir_end > dir_start) ++n_paths; - dir_start = dir_end + 1; - } - if ( *dir_start != '\0' ) - ++n_paths; /* One path after the final ':' */ - } - #else /* CYGWIN */ - static char *sysdir = "/usr/include/"; - n_paths = 1; - #endif /* CYGWIN */ + static char *sysdir = "/usr/include/"; + n_paths = 1; /* * Count the number of -I options to the preprocessor. @@ -201,22 +166,6 @@ char **opt_args; s = opt_args[i]; s1 = alloc(strlen(s) + 1); strcpy(s1, s); - - #if CYGWIN - /* - * Run s1 through cygwin_conv_to_posix_path; if the posix path - * differs from s1, reset s1 to a copy of the posix path. - */ - { - char posix_path[ _POSIX_PATH_MAX ]; - cygwin_conv_to_posix_path( s1, posix_path ); - if (strcmp( s1, posix_path ) != 0) { - free( s1 ); - s1 = salloc( posix_path ); - } - } - #endif /* CYGWIN */ - incl_search[j++] = s1; } @@ -224,34 +173,7 @@ char **opt_args; * Establish the standard locations to search after the -I options * on the preprocessor. */ - #if CYGWIN - if (incl_var != NULL) { - /* - * The C_INCLUDE_PATH components are carved out of a copy of incl_var. - * The colons after non-empty directory names are replaced by null - * chars, and the pointers to the start of these names are stored - * in inc_search. - */ - char *dir_start, *dir_end; - - dir_start = salloc( incl_var ); - while( ( dir_end = strchr( dir_start, ':' ) ) != NULL ) { - if (dir_end > dir_start) { - incl_search[j++] = dir_start; - *dir_end = '\0'; - } - dir_start = dir_end + 1; - } - if ( *dir_start != '\0' ) - incl_search[j++] = dir_start; - } - - /* Finally, add the system dir(s) */ - incl_search[j++] = sysdir; - incl_search[j++] = windir; - #else - incl_search[n_paths - 1] = sysdir; - #endif /* CYGWIN */ + incl_search[n_paths - 1] = sysdir; incl_search[n_paths] = NULL; } |