Jelajahi Sumber

curl: Use KWIML to get integer type sizes

Brad King 5 tahun lalu
induk
melakukan
1dd785b02c
2 mengubah file dengan 12 tambahan dan 19 penghapusan
  1. 0 10
      Utilities/cmcurl/CMakeLists.txt
  2. 12 9
      Utilities/cmcurl/lib/curl_config.h.cmake

+ 0 - 10
Utilities/cmcurl/CMakeLists.txt

@@ -975,18 +975,8 @@ check_include_file_concat("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
 
 check_type_size(size_t  SIZEOF_SIZE_T)
 check_type_size(ssize_t  SIZEOF_SSIZE_T)
-check_type_size("long long"  SIZEOF_LONG_LONG)
-check_type_size("long"  SIZEOF_LONG)
-check_type_size("short"  SIZEOF_SHORT)
-check_type_size("int"  SIZEOF_INT)
-check_type_size("__int64"  SIZEOF___INT64)
 check_type_size("time_t"  SIZEOF_TIME_T)
 
-if(HAVE_SIZEOF_LONG_LONG)
-  set(HAVE_LONGLONG 1)
-  set(HAVE_LL 1)
-endif()
-
 find_file(RANDOM_FILE urandom /dev)
 mark_as_advanced(RANDOM_FILE)
 

+ 12 - 9
Utilities/cmcurl/lib/curl_config.h.cmake

@@ -1,5 +1,7 @@
 /* lib/curl_config.h.in.  Generated somehow by cmake.  */
 
+#include <cm3p/kwiml/abi.h>
+
 /* when building libcurl itself */
 #cmakedefine BUILDING_LIBCURL 1
 
@@ -404,9 +406,6 @@
 /* if brotli is available */
 #cmakedefine HAVE_BROTLI 1
 
-/* if your compiler supports LL */
-#cmakedefine HAVE_LL 1
-
 /* Define to 1 if you have the <locale.h> header file. */
 #cmakedefine HAVE_LOCALE_H 1
 
@@ -414,7 +413,9 @@
 #cmakedefine HAVE_LOCALTIME_R 1
 
 /* Define to 1 if the compiler supports the 'long long' data type. */
-#cmakedefine HAVE_LONGLONG 1
+#if KWIML_ABI_SIZEOF_LONG_LONG
+#  define HAVE_LONGLONG 1
+#endif
 
 /* Define to 1 if you have the malloc.h header file. */
 #cmakedefine HAVE_MALLOC_H 1
@@ -883,19 +884,21 @@
 */
 
 /* The size of `int', as computed by sizeof. */
-${SIZEOF_INT_CODE}
+#define SIZEOF_INT KWIML_ABI_SIZEOF_INT
 
 /* The size of `short', as computed by sizeof. */
-${SIZEOF_SHORT_CODE}
+#define SIZEOF_SHORT KWIML_ABI_SIZEOF_SHORT
 
 /* The size of `long', as computed by sizeof. */
-${SIZEOF_LONG_CODE}
+#define SIZEOF_LONG KWIML_ABI_SIZEOF_LONG
 
 /* The size of `long long', as computed by sizeof. */
-${SIZEOF_LONG_LONG_CODE}
+#define SIZEOF_LONG_LONG KWIML_ABI_SIZEOF_LONG_LONG
 
 /* The size of `__int64', as computed by sizeof. */
-${SIZEOF___INT64_CODE}
+#if KWIML_ABI_SIZEOF___INT64
+#  define SIZEOF___INT64 KWIML_ABI_SIZEOF___INT64
+#endif
 
 /* The size of `off_t', as computed by sizeof. */
 ${SIZEOF_OFF_T_CODE}