Skip to content

Commit

Permalink
- make the c_runtime compile with Visual Studio
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4485 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 10, 2009
1 parent 59f2594 commit bb36209
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
16 changes: 12 additions & 4 deletions c_runtime/java_interface.c
Expand Up @@ -28,10 +28,6 @@
*
*/

#include "java_interface.h"
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>

#if defined(__MINGW32__) || defined(_MSC_VER) /* Windows/MinGW */

Expand All @@ -40,13 +36,25 @@
#define MAXPATHLEN 1024
#include <winreg.h>
#include <winerror.h>

#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "java_interface.h"

typedef __declspec(dllimport) jint (__stdcall * GetCreatedJavaVMsFunc)(JavaVM **, jsize, jsize *);
typedef __declspec(dllimport) jint (__stdcall * CreateJavaVMFunc)(JavaVM**,void**,void*);

#else /* UNIX */

#include <unistd.h>
#include <dlfcn.h>

#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "java_interface.h"

typedef jint (*GetCreatedJavaVMsFunc)(JavaVM **, jsize, jsize *);
typedef jint (*CreateJavaVMFunc)(JavaVM**,void**,void*);

Expand Down
14 changes: 12 additions & 2 deletions c_runtime/meta_modelica_builtin.cpp
Expand Up @@ -29,8 +29,18 @@
*/

#include "meta_modelica_builtin.h"
#include "limits.h"
#include "time.h"
#include <limits.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <stdio.h>

#if defined(_MSC_VER)
#include <float.h>
#define isinf(d) (!_finite(d) && !_isnan(d))
#define isnan _isnan
#define snprintf _snprintf
#endif

/* Boolean Operations */
boolAnd_rettype boolAnd(modelica_boolean b1, modelica_boolean b2)
Expand Down

0 comments on commit bb36209

Please sign in to comment.