summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2003-11-03 22:04:09 +0000
committerPaul Smith <psmith@gnu.org>2003-11-03 22:04:09 +0000
commit76f034acaadf081fd589cc5409bb4c2c138570e0 (patch)
treeca44bfcb6c1353fbc2982adb82b46bfdda8fe5bd /dir.c
parent74216b00a461e6002640cf98c66f5c137e84470b (diff)
downloadgunmake-76f034acaadf081fd589cc5409bb4c2c138570e0.tar.gz
Added MINGW32 changes.
This commits a number of changes from Earnie Boyd that allows GNU make to build for MINGW32 systems. Only missing from this commit are the changes to configure.in etc.; I'm waiting for Earnie to sign papers for those new files. Also not here is any README.mingw32 etc. which would explain how to use this port.
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 8b77ee6..9ab4ffc 100644
--- a/dir.c
+++ b/dir.c
@@ -1130,6 +1130,12 @@ read_dirstream (__ptr_t stream)
buf = xmalloc (bufsz);
}
d = (struct dirent *) buf;
+#ifdef __MINGW32__
+# if __MINGW32_VERSION_MAJOR < 3 || (__MINGW32_VERSION_MAJOR == 3 && \
+ __MINGW32_VERSION_MINOR == 0)
+ d->d_name = xmalloc(len);
+# endif
+#endif
FAKE_DIR_ENTRY (d);
#ifdef _DIRENT_HAVE_D_NAMLEN
d->d_namlen = len - 1;