Skip to content

Commit

Permalink
external libs / libmodplug: correction after previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Nov 24, 2019
1 parent 611ed58 commit 98d1166
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
16 changes: 13 additions & 3 deletions external/libmodplug-0.8.9.0/libmodplug-0.8.9.0-2.patch
Expand Up @@ -170,19 +170,29 @@ diff -u libmodplug-0.8.9.0/src/libmodplug/stdafx.h~ libmodplug-0.8.9.0/src/libmo
#include <mmsystem.h>
#include <stdio.h>
#include <malloc.h>
+#if (_MSC_VER >= 1600)
#include <stdint.h>
+#else
+#if defined(_MSC_VER) && (_MSC_VER < 1600)
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+#else
#include <stdint.h>
+#endif

#define srandom(_seed) srand(_seed)
#define random() rand()
@@ -57,7 +66,9 @@
#define strcasecmp(a,b) _stricmp(a,b)
#define strncasecmp(a,b,c) _strnicmp(a,b,c)

+#if defined(_MSC_VER) || defined(__MINGW32__)
#define HAVE_SINF 1
+#endif

#ifndef isblank
#define isblank(c) ((c) == ' ' || (c) == '\t')
diff -u libmodplug-0.8.9.0/src/load_abc.cpp~ libmodplug-0.8.9.0/src/load_abc.cpp
--- libmodplug-0.8.9.0/src/load_abc.cpp~
+++ libmodplug-0.8.9.0/src/load_abc.cpp
Expand Down
8 changes: 5 additions & 3 deletions external/libmodplug-0.8.9.0/src/libmodplug/stdafx.h
Expand Up @@ -44,15 +44,15 @@
#include <mmsystem.h>
#include <stdio.h>
#include <malloc.h>
#if (_MSC_VER >= 1600)
#include <stdint.h>
#else
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
#include <stdint.h>
#endif

#define srandom(_seed) srand(_seed)
Expand All @@ -66,7 +66,9 @@ inline void ProcessPlugins(int n) {}
#define strcasecmp(a,b) _stricmp(a,b)
#define strncasecmp(a,b,c) _strnicmp(a,b,c)

#if defined(_MSC_VER) || defined(__MINGW32__)
#define HAVE_SINF 1
#endif

#ifndef isblank
#define isblank(c) ((c) == ' ' || (c) == '\t')
Expand Down

0 comments on commit 98d1166

Please sign in to comment.