diff options
author | Paul Smith <psmith@gnu.org> | 2000-01-22 05:43:03 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2000-01-22 05:43:03 +0000 |
commit | 5577cdc2616262ae89c28cda49b5dd5449be472d (patch) | |
tree | 9e5b67f4754ce5a2d64bad43d28a7eaf093b6274 /file.c | |
parent | b7b83d6398e8e552dd1b9d70d18d7262753e03d4 (diff) | |
download | gunmake-5577cdc2616262ae89c28cda49b5dd5449be472d.tar.gz |
* Merge VMS patches by Hartmut Becker.
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -54,7 +54,7 @@ lookup_file (name) register struct file *f; register char *n; register unsigned int hashval; -#ifdef VMS +#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) register char *lname, *ln; #endif @@ -65,11 +65,13 @@ lookup_file (name) for names read from makefiles. It is here for names passed on the command line. */ #ifdef VMS +# ifndef WANT_CASE_SENSITIVE_TARGETS lname = (char *)malloc(strlen(name) + 1); for (n=name, ln=lname; *n != '\0'; ++n, ++ln) *ln = isupper((unsigned char)*n) ? tolower((unsigned char)*n) : *n; *ln = '\0'; name = lname; +# endif while (name[0] == '[' && name[1] == ']' && name[2] != '\0') name += 2; @@ -103,13 +105,13 @@ lookup_file (name) { if (strieq (f->hname, name)) { -#ifdef VMS +#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) free (lname); #endif return f; } } -#ifdef VMS +#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) free (lname); #endif return 0; @@ -122,14 +124,14 @@ enter_file (name) register struct file *f, *new; register char *n; register unsigned int hashval; -#ifdef VMS +#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) char *lname, *ln; #endif if (*name == '\0') abort (); -#ifdef VMS +#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) lname = (char *)malloc (strlen (name) + 1); for (n = name, ln = lname; *n != '\0'; ++n, ++ln) { @@ -139,6 +141,8 @@ enter_file (name) *ln = *n; } *ln = 0; + /* Creates a possible leak, old value of name is unreachable, but I + currently don't know how to fix it. */ name = lname; #endif @@ -153,7 +157,7 @@ enter_file (name) if (f != 0 && !f->double_colon) { -#ifdef VMS +#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) free(lname); #endif return f; |