summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-09-02 00:31:21 +0000
committerPaul Smith <psmith@gnu.org>1999-09-02 00:31:21 +0000
commit10fee1c03c9dcf887314c04612224aeadcba6dd7 (patch)
tree47fa3887e014eb0021383dca9d7fb75764d43e95 /read.c
parent82f0c5495afcf82b7cf82cbd69fa2f8f63c6b241 (diff)
downloadgunmake-10fee1c03c9dcf887314c04612224aeadcba6dd7.tar.gz
* A few W32 fixes for backslash support.
Diffstat (limited to 'read.c')
-rw-r--r--read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/read.c b/read.c
index 400a62c..bf2be05 100644
--- a/read.c
+++ b/read.c
@@ -692,7 +692,9 @@ read_makefile (filename, flags)
| (noerror ? RM_DONTCARE : 0)))
&& ! noerror)
error (&fileinfo, "%s: %s", name, strerror (errno));
- free(name);
+
+ /* We can't free NAME here, in case some of the commands,
+ etc. still contain references to the filename. */
}
/* Free any space allocated by conditional_line. */
@@ -1725,7 +1727,7 @@ record_files (filenames, pattern, pattern_percent, deps, cmds_started,
not start with a `.', unless it contains a slash. */
if (default_goal_file == 0 && set_default
&& (*name != '.' || index (name, '/') != 0
-#ifdef __MSDOS__
+#if defined(__MSDOS__) || defined(WINDOWS32)
|| index (name, '\\') != 0
#endif
))