From 66f4ae9a38ef283c34617de327b706eaa7298c8d Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Sat, 8 Feb 2025 12:17:49 -0800 Subject: [PATCH] cleanup: Get rid of some compiler symbols no longer needed (#4606) The newer versions of the compilers we now use no longer need this. Signed-off-by: Larry Gritz --- src/cmake/compiler.cmake | 8 -------- src/include/OpenImageIO/image_view.h | 19 ------------------- 2 files changed, 27 deletions(-) diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake index 32d51d6b13..6eb8f27561 100644 --- a/src/cmake/compiler.cmake +++ b/src/cmake/compiler.cmake @@ -180,14 +180,6 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_I endif () endif () -if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) - # Options common to gcc and clang - - # Ensure this macro is set for stdint.h - add_compile_definitions (__STDC_LIMIT_MACROS) - add_compile_definitions (__STDC_CONSTANT_MACROS) -endif () - if (INTELCLANG_VERSION_STRING VERSION_GREATER_EQUAL 2022.1.0) # New versions of icx warn about changing certain floating point options add_compile_options ("-Wno-overriding-t-option") diff --git a/src/include/OpenImageIO/image_view.h b/src/include/OpenImageIO/image_view.h index 676068839a..dcdc33a4f1 100644 --- a/src/include/OpenImageIO/image_view.h +++ b/src/include/OpenImageIO/image_view.h @@ -8,25 +8,6 @@ #include #include -// We're including stdint.h to get int64_t and INT64_MIN. But on some -// platforms, stdint.h only defines them if __STDC_LIMIT_MACROS is defined, -// so we do so. But, oops, if user code included stdint.h before this file, -// and without defining the macro, it may have had ints one and only include -// and not seen the definitions we need, so at least try to make a helpful -// compile-time error in that case. -// And very old MSVC 9 versions don't even have stdint.h. -#if defined(_MSC_VER) && _MSC_VER < 1600 -typedef __int64 int64_t; -#else -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS /* needed for some defs in stdint.h */ -# endif -# include -# if !defined(INT64_MIN) -# error You must define __STDC_LIMIT_MACROS prior to including stdint.h -# endif -#endif - #include #include