File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ CMakeCache.txt
37
37
CMakeFiles
38
38
Testing
39
39
* .cmake
40
+ * .stackdump
40
41
zconf.h
41
42
zconf.h.cmakein
42
43
zconf.h.included
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ endif()
58
58
check_type_size (off64_t OFF64_T )
59
59
if (HAVE_OFF64_T )
60
60
add_definitions (-D_LARGEFILE64_SOURCE=1 )
61
+ else ()
62
+ check_type_size (_off64_t _OFF64_T )
63
+ if (HAVE__OFF64_T )
64
+ add_definitions (-D_LARGEFILE64_SOURCE=1 )
65
+ endif ()
61
66
endif ()
62
67
set (CMAKE_REQUIRED_DEFINITIONS ) # clear variable
63
68
@@ -170,7 +175,7 @@ else (WITH_GZFILEOP)
170
175
endif (WITH_GZFILEOP )
171
176
172
177
173
- if (NOT MINGW )
178
+ if (NOT MINGW AND NOT MSYS )
174
179
set (ZLIB_DLL_SRCS
175
180
win32 /zlib1.rc # If present will override custom build rule below.
176
181
)
@@ -181,7 +186,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
181
186
string (REGEX REPLACE ".*#define[ \t ]+ZLIB_VERSION[ \t ]+\" ([-0-9A-Za-z.]+)\" .*"
182
187
"\\ 1" ZLIB_FULL_VERSION ${_zlib_h_contents} )
183
188
184
- if (MINGW )
189
+ if (MINGW OR MSYS )
185
190
# This gets us DLL resource information when compiling on MinGW.
186
191
if (NOT CMAKE_RC_COMPILER )
187
192
set (CMAKE_RC_COMPILER windres.exe )
@@ -195,7 +200,7 @@ if(MINGW)
195
200
-o ${CMAKE_CURRENT_BINARY_DIR} /zlib1rc.obj
196
201
-i ${CMAKE_CURRENT_SOURCE_DIR} /win32/zlib1.rc )
197
202
set (ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR} /zlib1rc.obj )
198
- endif (MINGW )
203
+ endif (MINGW OR MSYS )
199
204
200
205
add_library (zlib SHARED ${ZLIB_SRCS} ${ZLIB_GZFILE_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS} )
201
206
add_library (zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_GZFILE_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS} )
Original file line number Diff line number Diff line change @@ -455,6 +455,9 @@ echo >> configure.log
455
455
# check for large file support, and if none, check for fseeko()
456
456
cat > $test .c << EOF
457
457
#include <sys/types.h>
458
+ #ifdef __MSYS__
459
+ # define off64_t _off64_t
460
+ #endif
458
461
off64_t dummy = 0;
459
462
EOF
460
463
if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test .c; then
Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ typedef void *voidp;
164
164
#if !defined(WIN32 ) && defined(Z_LARGE64 )
165
165
# define z_off64_t off64_t
166
166
#else
167
- # if defined(WIN32 ) && !defined(__GNUC__ )
167
+ # if defined(__MSYS__ )
168
+ # define z_off64_t _off64_t
169
+ # elif defined(WIN32 ) && !defined(__GNUC__ )
168
170
# define z_off64_t __int64
169
171
# else
170
172
# define z_off64_t z_off_t
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
79
79
#endif
80
80
81
81
/* provide prototypes for these when building zlib without LFS */
82
- #if !defined(WIN32 ) && (!defined(_LARGEFILE64_SOURCE ) || _LFS64_LARGEFILE - 0 == 0 )
82
+ #if !defined(WIN32 ) && !defined( __MSYS__ ) && (!defined(_LARGEFILE64_SOURCE ) || _LFS64_LARGEFILE - 0 == 0 )
83
83
ZEXTERN uint32_t ZEXPORT adler32_combine64 (uint32_t , uint32_t , z_off_t );
84
84
ZEXTERN uint32_t ZEXPORT crc32_combine64 (uint32_t , uint32_t , z_off_t );
85
85
#endif
You can’t perform that action at this time.
0 commit comments