From 0c11d35f4a2a0f5f42ee684a3f5b27cbab8abae2 Mon Sep 17 00:00:00 2001 From: Aliaksey Kandratsenka Date: Sun, 14 Feb 2021 13:39:55 -0800 Subject: [PATCH] amputate checking for __int64 Since everything supports stdint.h this days. --- CMakeLists.txt | 1 - cmake/config.h.in | 3 --- configure.ac | 1 - src/windows/config.h | 5 ----- src/windows/port.h | 11 ----------- 5 files changed, 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a696f77..c657a6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,6 @@ check_c_source_compiles("#include int main() { return 0; }" HAVE___ATTRIBUTE__) -check_type_size("__int64" __INT64 LANGUAGE CXX) # defined in some windows platforms set(CMAKE_EXTRA_INCLUDE_FILES "malloc.h") check_type_size("struct mallinfo" STRUCT_MALLINFO LANGUAGE CXX) set(CMAKE_EXTRA_INCLUDE_FILES "elf.h") diff --git a/cmake/config.h.in b/cmake/config.h.in index 177456f..c5f0a1f 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -223,9 +223,6 @@ /* Define to 1 if compiler supports __environ */ #cmakedefine HAVE___ENVIRON -/* Define to 1 if the system has the type `__int64'. */ -#cmakedefine HAVE___INT64 - /* Define to 1 if you have the `__sbrk' function. */ #cmakedefine HAVE___SBRK diff --git a/configure.ac b/configure.ac index eae0780..5a8c0ff 100644 --- a/configure.ac +++ b/configure.ac @@ -195,7 +195,6 @@ AC_MSG_RESULT($ac_cv___attribute__aligned_fn) AC_HEADER_STDC # TODO(csilvers): we could remove a lot when WITH_CPU_PROFILER etc is "no". -AC_CHECK_TYPES([__int64]) # defined in some windows platforms AC_CHECK_TYPES([struct mallinfo],,, [#include ]) AC_CHECK_TYPES([Elf32_Versym],,, [#include ]) # for vdso_support.h AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory diff --git a/src/windows/config.h b/src/windows/config.h index 0f320a0..bbc1bb0 100644 --- a/src/windows/config.h +++ b/src/windows/config.h @@ -154,9 +154,7 @@ /* #undef HAVE_SCHED_H */ /* Define to 1 if you have the header file. */ -#if defined(_MSC_VER) && _MSC_VER >= 1900 #define HAVE_STDINT_H 1 -#endif /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 @@ -224,9 +222,6 @@ /* Define to 1 if compiler supports __environ */ /* #undef HAVE___ENVIRON */ -/* Define to 1 if the system has the type `__int64'. */ -#define HAVE___INT64 1 - /* Define to 1 if you have the `__sbrk' function. */ /* #undef HAVE___SBRK */ diff --git a/src/windows/port.h b/src/windows/port.h index eb9702b..f5dda88 100644 --- a/src/windows/port.h +++ b/src/windows/port.h @@ -102,20 +102,9 @@ /* ----------------------------------- BASIC TYPES */ #ifndef HAVE_STDINT_H -#ifndef HAVE___INT64 /* we need to have all the __intX names */ # error Do not know how to set up type aliases. Edit port.h for your system. #endif -typedef __int8 int8_t; -typedef __int16 int16_t; -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; -#endif /* #ifndef HAVE_STDINT_H */ - /* I guess MSVC's doesn't include ssize_t by default? */ #ifdef _MSC_VER typedef intptr_t ssize_t;