diff liboctave/lo-sysdep.cc @ 6123:8d285942fc3c

[project @ 2006-10-28 14:09:20 by jwe]
author jwe
date Sat, 28 Oct 2006 14:11:18 +0000
parents 174cfaa0c4af
children 323be5eeed1f
line wrap: on
line diff
--- a/liboctave/lo-sysdep.cc	Sat Oct 28 13:56:55 2006 +0000
+++ b/liboctave/lo-sysdep.cc	Sat Oct 28 14:11:18 2006 +0000
@@ -38,6 +38,7 @@
 #include "file-ops.h"
 #include "lo-error.h"
 #include "pathlen.h"
+#include "lo-sysdep.h"
 
 std::string
 octave_getcwd (void)
@@ -92,7 +93,7 @@
 #endif
 }
 
-#ifdef _MSC_VER
+#if defined (_MSC_VER)
 
 // FIXME -- it would probably be better to adapt the versions of
 // opendir, readdir, and closedir from Emacs as they appear to be more
@@ -101,19 +102,14 @@
 
 #include <windows.h>
 
-struct direct
-{
-  char *d_name;
-};
-
-typedef struct
+struct __DIR
 {
   HANDLE hnd;
   WIN32_FIND_DATA fd;
   int dirty;
   struct direct d;
-  const char* current;
-} DIR;
+  const char *current;
+};
 
 DIR *
 opendir (const char *name)
@@ -132,7 +128,7 @@
 }
 
 void
-rewinddir (DIR* d)
+rewinddir (DIR *d)
 {
   if (d->hnd != INVALID_HANDLE_VALUE)
     FindClose (d->hnd);