Skip to content

Commit 05110ad

Browse files
committed
Put "inline" definition in public config.
Let private definitions in private config.
1 parent 488f2c0 commit 05110ad

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed

src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ install(FILES ${headers} DESTINATION include/gpuarray)
132132

133133
if(NOT UNIX)
134134
install(FILES gpuarray/wincompat/stdint.h DESTINATION include/gpuarray/wincompat)
135-
install(FILES gpuarray/wincompat/util.h DESTINATION include/gpuarray/wincompat)
136135
endif()
137136

138137
install(TARGETS gpuarray gpuarray-static

src/gpuarray/config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@
2525

2626
#ifdef _MSC_VER
2727
#include <stddef.h>
28+
#ifndef inline
29+
#define inline __inline
30+
#endif
2831
#if _MSC_VER < 1600
2932
#include <gpuarray/wincompat/stdint.h>
3033
#else
3134
#include <stdint.h>
3235
#endif
3336
#define ssize_t intptr_t
3437
#define SSIZE_MAX INTPTR_MAX
35-
#include <gpuarray/wincompat/util.h>
3638
#else
3739
#include <sys/types.h>
3840
#include <stdint.h>

src/gpuarray/wincompat/util.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/private_config.h.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ extern "C" {
1919
}
2020
#endif
2121

22+
#ifdef _MSC_VER
23+
/* God damn Microsoft ... */
24+
#define snprintf _snprintf
25+
#define strdup _strdup
26+
#define alloca _alloca
27+
#endif
28+
2229
#ifdef _MSC_VER
2330
#define SPREFIX "I"
2431
#else

0 commit comments

Comments
 (0)