Skip to content

Commit fadbdfb

Browse files
committed
docs, utils: Replace remaining C stdlib.h, stdint.h and math.h headers with C++ variants
Apply changes from commit c001070 ("Replace C stdlib.h, stdint.h and math.h headers with C++ variants") to documentation and to create-module.py.
1 parent 8fbdc74 commit fadbdfb

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

doc/manual/source/working-with-cmake.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,12 +2936,9 @@ followed by a header configuration:
29362936
# Check for required headers and functions,
29372937
# set flags on the right argument if header in the first argument is found
29382938
# if they are not found, a warning is emitted
2939-
check_include_file_cxx("stdint.h" "HAVE_STDINT_H")
2940-
check_include_file_cxx("inttypes.h" "HAVE_INTTYPES_H")
29412939
check_include_file_cxx("sys/types.h" "HAVE_SYS_TYPES_H")
29422940
check_include_file_cxx("stat.h" "HAVE_SYS_STAT_H")
29432941
check_include_file_cxx("dirent.h" "HAVE_DIRENT_H")
2944-
check_include_file_cxx("stdlib.h" "HAVE_STDLIB_H")
29452942
check_include_file_cxx("signal.h" "HAVE_SIGNAL_H")
29462943
check_include_file_cxx("netpacket/packet.h" "HAVE_PACKETH")
29472944
check_function_exists("getenv" "HAVE_GETENV")
@@ -2970,13 +2967,9 @@ values are being used. So we need to check the template.
29702967
#cmakedefine INT64X64_USE_128
29712968
#cmakedefine INT64X64_USE_DOUBLE
29722969
#cmakedefine INT64X64_USE_CAIRO
2973-
#cmakedefine01 HAVE_STDINT_H
2974-
#cmakedefine01 HAVE_INTTYPES_H
2975-
#cmakedefine HAVE_SYS_INT_TYPES_H
29762970
#cmakedefine01 HAVE_SYS_TYPES_H
29772971
#cmakedefine01 HAVE_SYS_STAT_H
29782972
#cmakedefine01 HAVE_DIRENT_H
2979-
#cmakedefine01 HAVE_STDLIB_H
29802973
#cmakedefine01 HAVE_GETENV
29812974
#cmakedefine01 HAVE_SIGNAL_H
29822975

@@ -3300,12 +3293,12 @@ Compiler settings required by PCH and CCache are set in the PCH block in macros-
33003293
<limits>
33013294
<list>
33023295
<map>
3303-
<math.h>
3296+
<cmath>
33043297
<ostream>
33053298
<set>
33063299
<sstream>
3307-
<stdint.h>
3308-
<stdlib.h>
3300+
<cstdint>
3301+
<cstdlib>
33093302
<string>
33103303
<unordered_map>
33113304
<vector>

utils/create-module.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
from pathlib import Path
88

99
CMAKELISTS_TEMPLATE = """\
10-
check_include_file_cxx(stdint.h HAVE_STDINT_H)
11-
if(HAVE_STDINT_H)
12-
add_definitions(-DHAVE_STDINT_H)
13-
endif()
14-
1510
set(examples_as_tests_sources)
1611
if(${{ENABLE_EXAMPLES}})
1712
set(examples_as_tests_sources

0 commit comments

Comments
 (0)