Skip to content

Commit 3c7fd97

Browse files
authored
Avoid inclusion of C source file win32_dirent.c (#2994)
1 parent 6f60a37 commit 3c7fd97

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Modelica/Resources/C-Sources/ModelicaInternal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ void ModelicaInternal_setenv(_In_z_ const char* name,
212212

213213
#if defined(__MINGW32__) || defined(__CYGWIN__) /* MinGW and Cygwin have dirent.h */
214214
#include <dirent.h>
215-
#else /* include the opendir/readdir/closedir implementation for _WIN32 */
216-
#include "win32_dirent.c"
215+
#else /* include the opendir/readdir/closedir interface for _WIN32 */
216+
#include "win32_dirent.h"
217217
#endif
218218

219219
#elif defined(_POSIX_) || defined(__GNUC__)

Modelica/Resources/C-Sources/win32_dirent.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* current directory can be changed after "opendir".
2222
*/
2323

24+
#if defined(_WIN32) && !defined(NO_FILE_SYSTEM) && !defined(__WATCOMC__) && !defined(__BORLANDC__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
25+
2426
#include <stdlib.h>
2527
#include <errno.h>
2628
#include <string.h>
@@ -317,3 +319,5 @@ seekdir (DIR * dirp, long lPos)
317319
;
318320
}
319321
}
322+
323+
#endif

0 commit comments

Comments
 (0)