Skip to content

Commit

Permalink
Remove some CHECK_TYPE_SIZE() that can be problematic in some platforms
Browse files Browse the repository at this point in the history
These cases can create errors when we are doing a cross-compilation.
  • Loading branch information
dacap committed Sep 16, 2022
1 parent 1c7c8ef commit afa2213
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1564,13 +1564,9 @@ CHECK_STRUCT_HAS_MEMBER("struct tm" tm_sec
#
CHECK_TYPE_SIZE("short" SIZEOF_SHORT)
CHECK_TYPE_SIZE("int" SIZEOF_INT)
CHECK_TYPE_SIZE("long" SIZEOF_LONG)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)

CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT)
CHECK_TYPE_SIZE("unsigned" SIZEOF_UNSIGNED)
CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG)
CHECK_TYPE_SIZE("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)

CHECK_TYPE_SIZE("__int64" __INT64)
CHECK_TYPE_SIZE("unsigned __int64" UNSIGNED___INT64)
Expand Down
34 changes: 0 additions & 34 deletions build/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@
/* The sizes of various standard integer types. */
@SIZEOF_SHORT_CODE@
@SIZEOF_INT_CODE@
@SIZEOF_LONG_CODE@
@SIZEOF_LONG_LONG_CODE@
@SIZEOF_UNSIGNED_SHORT_CODE@
@SIZEOF_UNSIGNED_CODE@
@SIZEOF_UNSIGNED_LONG_CODE@
@SIZEOF_UNSIGNED_LONG_LONG_CODE@

/*
* If we lack int64_t, define it to the first of __int64, int, long, and long long
Expand All @@ -46,16 +42,6 @@ typedef int int64_t;
#define HAVE_INT64_T
#endif

#if !defined(HAVE_INT64_T) && SIZEOF_LONG == 8
typedef long int64_t;
#define HAVE_INT64_T
#endif

#if !defined(HAVE_INT64_T) && SIZEOF_LONG_LONG == 8
typedef long long int64_t;
#define HAVE_INT64_T
#endif

#if !defined(HAVE_INT64_T)
#error No 64-bit integer type was found.
#endif
Expand All @@ -68,11 +54,6 @@ typedef int int32_t;
#define HAVE_INT32_T
#endif

#if !defined(HAVE_INT32_T) && SIZEOF_LONG == 4
typedef long int32_t;
#define HAVE_INT32_T
#endif

#if !defined(HAVE_INT32_T)
#error No 32-bit integer type was found.
#endif
Expand Down Expand Up @@ -107,16 +88,6 @@ typedef unsigned uint64_t;
#define HAVE_UINT64_T
#endif

#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG == 8
typedef unsigned long uint64_t;
#define HAVE_UINT64_T
#endif

#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG_LONG == 8
typedef unsigned long long uint64_t;
#define HAVE_UINT64_T
#endif

#if !defined(HAVE_UINT64_T)
#error No 64-bit unsigned integer type was found.
#endif
Expand All @@ -130,11 +101,6 @@ typedef unsigned uint32_t;
#define HAVE_UINT32_T
#endif

#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED_LONG == 4
typedef unsigned long uint32_t;
#define HAVE_UINT32_T
#endif

#if !defined(HAVE_UINT32_T)
#error No 32-bit unsigned integer type was found.
#endif
Expand Down

0 comments on commit afa2213

Please sign in to comment.