summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1996-07-26 00:05:41 +0000
committerRoland McGrath <roland@redhat.com>1996-07-26 00:05:41 +0000
commit2df6034eb63fb5746db110cad83ef5b1c04d3891 (patch)
treeab7f98eb7f7e3b1ca9acc4e7ca994a230f9c5dda
parentdd0fe8f1ee791d41354cd946df6673ac2781642a (diff)
downloadgunmake-2df6034eb63fb5746db110cad83ef5b1c04d3891.tar.gz
Thu Jul 25 19:53:31 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
From Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>: * dir.c [__MSDOS__] [DJGPP > 1]: Include <libc/dosio.h> and defin `__opendir_flags' initialized to 0. [__MSDOS__] (dosify) [DJGPP > 1]: Return name unchanged if _USE_LFN. (find_directory) [__MSDOS__ && DJGPP > 1]: If _USE_LGN, set __opendir_flags to __OPENDIR_PRESERVE_CASE.
-rw-r--r--dir.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index 11343dd..cc0c3e3 100644
--- a/dir.c
+++ b/dir.c
@@ -56,6 +56,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef __MSDOS__
#include <ctype.h>
+#if (DJGPP > 1)
+#include <libc/dosio.h>
+int __opendir_flags = 0;
+#endif
static char *
dosify (filename)
@@ -65,6 +69,11 @@ dosify (filename)
char *df;
int i;
+#if (DJGPP > 1)
+ if (_USE_LFN)
+ /* Using long file names; do no transformation. */
+ return filename;
+#endif
if (filename == 0)
return 0;
@@ -372,6 +381,13 @@ find_directory (name)
dc->next = directories_contents[hash];
directories_contents[hash] = dc;
+#if defined (__MSDOS__) && (DJGPP > 1)
+ if (_USE_LFN)
+ /* We are using long filenames, so tell opendir not
+ to mess with them. */
+ __opendir_flags = __OPENDIR_PRESERVE_CASE;
+#endif
+
dc->dirstream = opendir (name);
if (dc->dirstream == 0)
{