diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-09-30 15:35:01 +0200 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-09-30 15:35:01 +0200 |
commit | 28015993235d3a1a56f08de5b86c4e1ef59d4723 (patch) | |
tree | 7f9c3b3991fa7d5f18931f146c63848ea7405fd6 /sql | |
parent | 46d04ebdefe05377b86e851d73df22c069d63246 (diff) | |
download | mariadb-git-28015993235d3a1a56f08de5b86c4e1ef59d4723.tar.gz |
Backport http://lists.mysql.com/commits/57778
2677 Vladislav Vaintroub 2008-11-04
CMakeLists.txt files cleanup
- remove SAFEMALLOC and SAFE_MUTEX definitions that were
present in *each* CMakeLists.txt. Instead, put them into top level
CMakeLists.txt, but disable on Windows, because
a) SAFEMALLOC does not add any functionality that is not already
present in Debug C runtime ( and 2 safe malloc one on top of the other
only unnecessarily slows down the server)
b)SAFE_MUTEX does not work on Windows and have been
explicitely disabled on Windows with #undef previously. Fortunately,
ntdll does pretty good job identifying l problems with
CRITICAL_SECTIONs.
DebugBreak()s on using uninited critical section, unlocking unowned
critical section)
-Also, remove occationally used -D_DEBUG (added by compiler
anyway)
Diffstat (limited to 'sql')
-rwxr-xr-x | sql/CMakeLists.txt | 4 | ||||
-rw-r--r-- | sql/udf_example.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 1b7175a7b82..49ae232c31c 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -15,9 +15,9 @@ INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake") SET(CMAKE_CXX_FLAGS_DEBUG - "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi") + "${CMAKE_CXX_FLAGS_DEBUG} -DUSE_SYMDIR /Zi") SET(CMAKE_C_FLAGS_DEBUG - "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi") + "${CMAKE_C_FLAGS_DEBUG} -DUSE_SYMDIR /Zi") SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /MAP /MAPINFO:EXPORTS") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include diff --git a/sql/udf_example.c b/sql/udf_example.c index 1d6a9828594..4b39a83d4ac 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -138,11 +138,11 @@ typedef long long longlong; #endif #include <mysql.h> #include <ctype.h> -
-#ifdef _WIN32
-/* inet_aton needs winsock library */
-#pragma comment(lib, "ws2_32")
-#endif
+ +#ifdef _WIN32 +/* inet_aton needs winsock library */ +#pragma comment(lib, "ws2_32") +#endif static pthread_mutex_t LOCK_hostname; |