Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ximi1970:Toolchains:MinGW:latest:win64
mingw64-mysql-connector-c
mingw-w64.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mingw-w64.patch of Package mingw64-mysql-connector-c
diff -ruB mysql-connector-c-6.1.11-src.orig/extra/yassl/src/yassl_int.cpp mysql-connector-c-6.1.11-src/extra/yassl/src/yassl_int.cpp --- mysql-connector-c-6.1.11-src.orig/extra/yassl/src/yassl_int.cpp 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/extra/yassl/src/yassl_int.cpp 2018-05-29 10:28:48.923753549 +0000 @@ -20,7 +20,8 @@ // First include (the generated) my_config.h, to get correct platform defines. #include "my_config.h" #ifdef _WIN32 -#include<Windows.h> +#include <winsock2.h> +#include <windows.h> #else #include <pthread.h> #endif diff -ruB mysql-connector-c-6.1.11-src.orig/include/my_atomic.h mysql-connector-c-6.1.11-src/include/my_atomic.h --- mysql-connector-c-6.1.11-src.orig/include/my_atomic.h 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/include/my_atomic.h 2018-05-29 10:32:43.630943173 +0000 @@ -58,7 +58,7 @@ # include "atomic/solaris.h" #elif defined(HAVE_GCC_SYNC_BUILTINS) /* Use old __sync by default */ # include "atomic/gcc_sync.h" -#elif defined(HAVE_GCC_ATOMIC_BUILTINS) /* Use __atomic on e.g. powerpc */ +#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(__MINGW32__)/* Use __atomic on e.g. powerpc */ # include "atomic/gcc_atomic.h" #else # error Native atomics support not found! diff -ruB mysql-connector-c-6.1.11-src.orig/include/my_dir.h mysql-connector-c-6.1.11-src/include/my_dir.h --- mysql-connector-c-6.1.11-src.orig/include/my_dir.h 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/include/my_dir.h 2018-05-29 10:31:21.631221796 +0000 @@ -27,9 +27,11 @@ /* Defines for my_dir and my_stat */ #ifdef _WIN32 +#ifndef __MINGW32__ #define S_IROTH _S_IREAD #define S_IFIFO _S_IFIFO #endif +#endif #define MY_S_IFMT S_IFMT /* type of file */ #define MY_S_IFDIR S_IFDIR /* directory */ diff -ruB mysql-connector-c-6.1.11-src.orig/include/my_global.h mysql-connector-c-6.1.11-src/include/my_global.h --- mysql-connector-c-6.1.11-src.orig/include/my_global.h 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/include/my_global.h 2018-05-29 10:34:22.186614517 +0000 @@ -217,8 +217,10 @@ #ifdef _WIN32 typedef int socket_len_t; typedef int sigset_t; +#ifndef __MINGW32__ typedef int mode_t; typedef SSIZE_T ssize_t; +#endif #else typedef socklen_t socket_len_t; #endif @@ -644,7 +646,7 @@ }; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) /**************************************************************************** ** Replacements for localtime_r and gmtime_r ****************************************************************************/ @@ -660,7 +662,7 @@ gmtime_s(res, clock); return res; } -#endif /* _WIN32 */ +#endif #ifndef HAVE_STRUCT_TIMESPEC /* Windows before VS2015 */ /* diff -ruB mysql-connector-c-6.1.11-src.orig/include/mysql/psi/mysql_socket.h mysql-connector-c-6.1.11-src/include/mysql/psi/mysql_socket.h --- mysql-connector-c-6.1.11-src.orig/include/mysql/psi/mysql_socket.h 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/include/mysql/psi/mysql_socket.h 2018-05-29 10:33:37.146763879 +0000 @@ -29,7 +29,7 @@ #ifdef _WIN32 #include <ws2def.h> #include <winsock2.h> - #include <MSWSock.h> + #include <mswsock.h> #define SOCKBUF_T char #else #include <netinet/in.h> diff -ruB mysql-connector-c-6.1.11-src.orig/libmysql/authentication_win/handshake.h mysql-connector-c-6.1.11-src/libmysql/authentication_win/handshake.h --- mysql-connector-c-6.1.11-src.orig/libmysql/authentication_win/handshake.h 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/libmysql/authentication_win/handshake.h 2018-05-29 10:39:44.393585561 +0000 @@ -100,7 +100,7 @@ Handshake(const char *ssp, side_t side); virtual ~Handshake(); - int Handshake::packet_processing_loop(); + int packet_processing_loop(); bool virtual is_complete() const { diff mysql-connector-c-6.1.11-src.orig/libmysql/authentication_win/CMakeLists.txt mysql-connector-c-6.1.11-src/libmysql/authentication_win/CMakeLists.txt --- mysql-connector-c-6.1.11-src.orig/libmysql/authentication_win/CMakeLists.txt +++ mysql-connector-c-6.1.11-src/libmysql/authentication_win/CMakeLists.txt @@ -26,7 +26,7 @@ SET(HEADERS common.h handshake.h) SET(PLUGIN_SOURCES plugin_client.cc handshake_client.cc log_client.cc common.cc handshake.cc) ADD_CONVENIENCE_LIBRARY(auth_win_client ${PLUGIN_SOURCES} ${HEADERS}) -TARGET_LINK_LIBRARIES(auth_win_client Secur32) +TARGET_LINK_LIBRARIES(auth_win_client secur32) # In IDE, group headers in a separate folder. diff -ubB mysql-connector-c-6.1.11-src.orig/mysys/my_thr_init.c mysql-connector-c-6.1.11-src/mysys/my_thr_init.c --- mysql-connector-c-6.1.11-src.orig/mysys/my_thr_init.c 2017-07-13 06:55:32.000000000 +0000 +++ mysql-connector-c-6.1.11-src/mysys/my_thr_init.c 2018-05-29 11:05:15.293532002 +0000 @@ -452,7 +452,9 @@ static void install_sigabrt_handler() { /*abort() should not override our exception filter*/ +#if !defined(__MINGW32__) _set_abort_behavior(0,_CALL_REPORTFAULT); +#endif signal(SIGABRT,my_sigabrt_handler); } #endif diff mysql-connector-c-6.1.11-src.orig/libmysql/CMakeLists.txt mysql-connector-c-6.1.11-src/libmysql/CMakeLists.txt --- mysql-connector-c-6.1.11-src.orig/libmysql/CMakeLists.txt +++ mysql-connector-c-6.1.11-src/libmysql/CMakeLists.txt @@ -216,13 +216,20 @@ MACRO(GET_TARGET_NAME target out_name) SET(${out_name} ${name}) ENDMACRO() -IF(UNIX) +IF(UNIX OR MINGW) MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME) + IF(MINGW) + SET(DOT_VERSION "-${VERSION}") + IF(DOT_VERSION STREQUAL "-") + SET(DOT_VERSION "") + ENDIF() + ELSE() SET(DOT_VERSION ".${VERSION}") IF(DOT_VERSION STREQUAL ".") SET(DOT_VERSION "") ENDIF() - IF(APPLE) + ENDIF() + IF(APPLE OR MINGW) SET(${OUTNAME} ${LIBNAME}${DOT_VERSION}${EXTENSION}) ELSE() SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) diff -rubB mysql-connector-c-6.1.11-src.orig/libmysql/CMakeLists.txt mysql-connector-c-6.1.11-src/libmysql/CMakeLists.txt --- mysql-connector-c-6.1.11-src.orig/libmysql/CMakeLists.txt 2018-05-29 11:38:30.861725813 +0000 +++ mysql-connector-c-6.1.11-src/libmysql/CMakeLists.txt 2018-05-29 11:48:43.749971875 +0000 @@ -292,9 +292,9 @@ MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_FUNCTIONS_UNDOCUMENTED} COMPONENT SharedLibraries) - IF(UNIX) + IF(UNIX OR MINGW) # libtool compatability - IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) + IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE OR MINGW) SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}") ELSE() SET(OS_SHARED_LIB_VERSION @@ -305,6 +305,12 @@ OUTPUT_NAME mysqlclient VERSION "${OS_SHARED_LIB_VERSION}" SOVERSION "${SHARED_LIB_MAJOR_VERSION}") + IF(MINGW) + # cmake is too dumb to handle mingw. Do the basics (append -MAJOR) + # and then do the rest in .spec + SET_TARGET_PROPERTIES(libmysql PROPERTIES + OUTPUT_NAME "mysqlclient-${OS_SHARED_LIB_VERSION}") + ENDIF() CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) IF(APPLE) diff -rubB mysql-connector-c-6.1.11-src.orig/libmysql/CMakeLists.txt mysql-connector-c-6.1.11-src/libmysql/CMakeLists.txt --- mysql-connector-c-6.1.11-src.orig/libmysql/CMakeLists.txt 2018-05-29 14:16:40.541937432 +0000 +++ mysql-connector-c-6.1.11-src/libmysql/CMakeLists.txt 2018-05-29 14:15:17.074377463 +0000 @@ -391,5 +391,5 @@ IF(DISABLE_SHARED) TARGET_LINK_LIBRARIES(libmysql_api_test ${LIBS}) ELSE() - TARGET_LINK_LIBRARIES(libmysql_api_test libmysql) + TARGET_LINK_LIBRARIES(libmysql_api_test mysqlclient) ENDIF() diff mysql-connector-c-6.1.11-src.orig/include/mysql.h mysql-connector-c-6.1.11-src/include/mysql.h --- mysql-connector-c-6.1.11-src.orig/include/mysql.h 2018-05-29 17:05:54.448203567 +0000 +++ mysql-connector-c-6.1.11-src/include/mysql.h 2018-05-29 17:06:53.363697705 +0000 @@ -35,7 +35,7 @@ #include <sys/types.h> #endif typedef char my_bool; -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(__MINGW32__) #define STDCALL #else #define STDCALL __stdcall
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor