Skip to content

Commit

Permalink
- fix so that loadModel works fine;
Browse files Browse the repository at this point in the history
  geez, this was a weird one, libModelicaExternalC.a re-defined (badly) 
  opendir, readdir and some other dirent.h functions, but MinGW already 
  has them. This made SystemImpl__getLoadModelPath to fail.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11664 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Apr 4, 2012
1 parent 37f28be commit 89af2bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SimulationRuntime/c/ModelicaExternalC/ModelicaInternal.c
Expand Up @@ -109,9 +109,13 @@ void ModelicaNotExistError(const char* name) {
# include <direct.h>
# include <sys/types.h>
# include <sys/stat.h>

#if defined(__MINGW32__) /* mingw has dirent */
#include <sys/types.h>
#include <dirent.h>
#else
/* include the opendir/readdir/closedir implementation for _WIN32 */
# include "win32_dirent.c"
# include "win32_dirent.c"
#endif
# elif defined(_POSIX_)
# include <dirent.h>
# include <unistd.h>
Expand Down

0 comments on commit 89af2bc

Please sign in to comment.