svn commit: r1919400 - in /subversion/branches/cmake: CMakeLists.txt subversion/svn_private_config.hc

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Sat Jul 20 13:16:59 2024
New Revision: 1919400

URL: http://svn.apache.org/viewvc?rev=1919400&view=rev
Log:
On the 'cmake' branch: Setup HAVE_STDINT_H and HAVE_STDBOOL_H definitions
using check_include_files() macro instead of checking for MSVC from private
config. These headers could be installed also when using non-msvc compilers.

* CMakeLists.txt
  (checks): Add checks for `stdbool.h' and `stdint.h' to setup HAVE_STDINT_H
   and HAVE_STDBOOL_H compile definitions.

* subversion/svn_private_config.hc
  (HAVE_STDINT_H and HAVE_STDBOOL_H): Don't setup these definitions from
   private config, because they are moved into CMakeLists.txt with checks.

Modified:
    subversion/branches/cmake/CMakeLists.txt
    subversion/branches/cmake/subversion/svn_private_config.hc

Modified: subversion/branches/cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1919400&r1=1919399&r2=1919400&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Sat Jul 20 13:16:59 2024
@@ -274,6 +274,16 @@ if(HAVE_INTTYPES_H)
   add_compile_definitions(HAVE_INTTYPES_H)
 endif()
 
+check_include_files("stdbool.h" HAVE_STDBOOL_H)
+if(HAVE_STDBOOL_H)
+  add_compile_definitions(HAVE_STDBOOL_H)
+endif()
+
+check_include_files("stdint.h" HAVE_STDINT_H)
+if(HAVE_STDINT_H)
+  add_compile_definitions(HAVE_STDINT_H)
+endif()
+
 check_include_files("sys/utsname.h" HAVE_SYS_UTSNAME_H)
 if (HAVE_SYS_UTSNAME_H)
   add_compile_definitions(HAVE_SYS_UTSNAME_H)

Modified: subversion/branches/cmake/subversion/svn_private_config.hc
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/subversion/svn_private_config.hc?rev=1919400&r1=1919399&r2=1919400&view=diff
==============================================================================
--- subversion/branches/cmake/subversion/svn_private_config.hc (original)
+++ subversion/branches/cmake/subversion/svn_private_config.hc Sat Jul 20 13:16:59 2024
@@ -112,14 +112,6 @@
    Suppresses compiler warnings about the variable being unused.  */
 #define SVN_UNUSED(v) ( (void)(v) )
 
-#if defined(_MSC_VER) && _MSC_VER >= 1600
-#define HAVE_STDINT_H
-#endif
-
-#if defined(_MSC_VER) && _MSC_VER >= 1800
-#define HAVE_STDBOOL_H
-#endif
-
 #endif /* SVN_PRIVATE_CONFIG_HW */
 
 /* Inclusion of Berkeley DB header */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.