Changeset: 8cbff7897eba for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8cbff7897eba
Modified Files:
        cmake/monetdb-defines.cmake
        monetdb_config.h.in
Branch: default
Log Message:

No need for cmake vars if we can do it in monetdb_config.h.in.


diffs (75 lines):

diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -193,12 +193,6 @@ macro(monetdb_macro_variables)
     message(FATAL_ERROR "PCRE library or GNU regex library not found but 
required for MonetDB5")
   endif()
 
-  set(MAPI_PORT 50000)
-  set(MAPI_PORT_STR "${MAPI_PORT}")
-
-  set(DIR_SEP  "/")
-  set(PATH_SEP ":")
-  set(DIR_SEP_STR  "/")
   set(SO_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
   set(SO_EXT "${CMAKE_SHARED_LIBRARY_SUFFIX}")
 
@@ -230,15 +224,6 @@ macro(monetdb_configure_sizes)
   check_type_size(size_t SIZEOF_SIZE_T LANGUAGE C)
   set(SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
   check_type_size(ssize_t SIZEOF_SSIZE_T LANGUAGE C)
-  if(NOT HAVE_SIZEOF_SSIZE_T)
-    # Set a default value
-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-      set(ssize_t "int64_t")
-    else()
-      set(ssize_t "int32_t")
-    endif()
-    set(SIZEOF_SSIZE_T ${CMAKE_SIZEOF_VOID_P})
-  endif()
   check_type_size(char SIZEOF_CHAR LANGUAGE C)
   check_type_size(short SIZEOF_SHORT LANGUAGE C)
   check_type_size(int SIZEOF_INT LANGUAGE C)
diff --git a/monetdb_config.h.in b/monetdb_config.h.in
--- a/monetdb_config.h.in
+++ b/monetdb_config.h.in
@@ -390,8 +390,8 @@
 #define BUILD_TYPE "@BUILD_TYPE@"
 #define EXTRA_C_FLAGS "@EXTRA_C_FLAGS@"
 
-#cmakedefine MAPI_PORT @MAPI_PORT@
-#cmakedefine MAPI_PORT_STR "@MAPI_PORT_STR@"
+#define MAPI_PORT 50000
+#define MAPI_PORT_STR "50000"
 
 #ifdef _MSC_VER
 #define DIR_SEP '\\'
@@ -399,9 +399,9 @@
 #define DIR_SEP_STR "\\"
 #define SO_PREFIX ""
 #else
-#cmakedefine DIR_SEP '@DIR_SEP@'
-#cmakedefine PATH_SEP '@PATH_SEP@'
-#cmakedefine DIR_SEP_STR "@DIR_SEP_STR@"
+#define DIR_SEP ':'
+#define PATH_SEP '/'
+#define DIR_SEP_STR "/"
 #cmakedefine SO_PREFIX "@SO_PREFIX@"
 #endif
 #cmakedefine SO_EXT "@SO_EXT@"
@@ -485,8 +485,13 @@
 #cmakedefine WORDS_BIGENDIAN @HAVE_WORDS_BIGENDIAN@
 
 /* Does your compiler support `ssize_t' type? (Posix type) */
-#ifndef ssize_t
-#cmakedefine ssize_t @ssize_t@
+#if 0x0@SIZEOF_SSIZE_T@ == 0   /* is a size for `ssize_t` available? */
+#if SIZEOF_SIZE_T == 4
+typedef int32_t ssize_t;
+#else
+typedef int64_t ssize_t;
+#endif
+#define SIZEOF_SSIZE_T SIZEOF_SIZE_T
 #endif
 
 /* The size of `__int128', as computed by sizeof. */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to