File tree Expand file tree Collapse file tree 7 files changed +22
-24
lines changed
Expand file tree Collapse file tree 7 files changed +22
-24
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ install(FILES ${headers} DESTINATION include/gpuarray)
132132
133133if (NOT UNIX )
134134 install (FILES gpuarray/wincompat/stdint.h DESTINATION include /gpuarray/wincompat)
135+ install (FILES gpuarray/wincompat/util.h DESTINATION include /gpuarray/wincompat)
135136endif ()
136137
137138install (TARGETS gpuarray gpuarray-static
Original file line number Diff line number Diff line change 88#include <gpuarray/buffer.h>
99#include <gpuarray/util.h>
1010
11- #ifdef _MSC_VER
12- #ifndef inline
13- #define inline __inline
14- #endif
15- #endif
16-
1711#ifdef __cplusplus
1812extern "C" {
1913#endif
Original file line number Diff line number Diff line change 3232#endif
3333#define ssize_t intptr_t
3434#define SSIZE_MAX INTPTR_MAX
35+ #include <gpuarray/wincompat/util.h>
3536#else
3637#include <sys/types.h>
3738#include <stdint.h>
Original file line number Diff line number Diff line change @@ -15,13 +15,6 @@ extern "C" {
1515#include <gpuarray/elemwise.h>
1616#include <gpuarray/types.h>
1717
18- /* MSVC 2008 does not support "inline". */
19- #ifdef _MSC_VER
20- #ifndef inline
21- #define inline __inline
22- #endif
23- #endif
24-
2518/**
2619 * Registers a type with the kernel machinery.
2720 *
Original file line number Diff line number Diff line change 1+ #ifndef WINCOMPAT_UTIL
2+ #define WINCOMPAT_UTIL
3+
4+ #ifdef _MSC_VER
5+ /* MSVC 2008 does not support "inline". */
6+ #ifndef inline
7+ #define inline __inline
8+ #endif
9+ #ifndef snprintf
10+ #define snprintf _snprintf
11+ #endif
12+ #ifndef strdup
13+ #define strdup _strdup
14+ #endif
15+ #ifndef alloca
16+ #define alloca _alloca
17+ #endif
18+ #endif
19+
20+ #endif
Original file line number Diff line number Diff line change 1515#include "loaders/libclblas.h"
1616#include "loaders/libclblast.h"
1717
18- #ifdef _MSC_VER
19- #define strdup _strdup
20- #endif
21-
2218#define _unused (x ) ((void)x)
2319#define SSIZE_MIN (-(SSIZE_MAX-1))
2420
Original file line number Diff line number Diff line change 66
77#include <gpuarray/error.h>
88
9- /* MSVC 2008 does not support "inline". */
10- #ifdef _MSC_VER
11- #ifndef inline
12- #define inline __inline
13- #endif
14- #endif
15-
169/* 1024 - 4 for the int that goes after */
1710#define ERROR_MSGBUF_LEN 1020
1811
You can’t perform that action at this time.
0 commit comments