diff --git a/build-support/core-config-template.h b/build-support/core-config-template.h index c0fe399ce..96eb102b5 100644 --- a/build-support/core-config-template.h +++ b/build-support/core-config-template.h @@ -6,13 +6,9 @@ #cmakedefine INT64X64_USE_128 #cmakedefine INT64X64_USE_DOUBLE #cmakedefine INT64X64_USE_CAIRO -#cmakedefine01 HAVE_STDINT_H -#cmakedefine01 HAVE_INTTYPES_H -#cmakedefine HAVE_SYS_INT_TYPES_H #cmakedefine01 HAVE_SYS_TYPES_H #cmakedefine01 HAVE_SYS_STAT_H #cmakedefine01 HAVE_DIRENT_H -#cmakedefine01 HAVE_STDLIB_H #cmakedefine01 HAVE_GETENV #cmakedefine01 HAVE_SIGNAL_H diff --git a/build-support/macros-and-definitions.cmake b/build-support/macros-and-definitions.cmake index 97a91e734..5f7606904 100644 --- a/build-support/macros-and-definitions.cmake +++ b/build-support/macros-and-definitions.cmake @@ -1074,7 +1074,7 @@ macro(process_options) # Process core-config If INT128 is not found, fallback to CAIRO if(${NS3_INT64X64} MATCHES "INT128") check_cxx_source_compiles( - "#include + "#include int main() { if ((uint128_t *) 0) return 0; @@ -1084,7 +1084,7 @@ macro(process_options) HAVE_UINT128_T ) check_cxx_source_compiles( - "#include + "#include int main() { if ((__uint128_t *) 0) return 0; @@ -1129,12 +1129,9 @@ macro(process_options) # Check for required headers and functions, set flags if they're found or warn # if they're not found - check_include_file("stdint.h" "HAVE_STDINT_H") - check_include_file("inttypes.h" "HAVE_INTTYPES_H") check_include_file("sys/types.h" "HAVE_SYS_TYPES_H") check_include_file("sys/stat.h" "HAVE_SYS_STAT_H") check_include_file("dirent.h" "HAVE_DIRENT_H") - check_include_file("stdlib.h" "HAVE_STDLIB_H") check_include_file("signal.h" "HAVE_SIGNAL_H") check_include_file("netpacket/packet.h" "HAVE_PACKETH") check_function_exists("getenv" "HAVE_GETENV") @@ -1287,13 +1284,13 @@ macro(process_options) - + - - + + diff --git a/src/antenna/model/circular-aperture-antenna-model.cc b/src/antenna/model/circular-aperture-antenna-model.cc index ba2a88ba8..5475afc0e 100644 --- a/src/antenna/model/circular-aperture-antenna-model.cc +++ b/src/antenna/model/circular-aperture-antenna-model.cc @@ -20,7 +20,7 @@ #include "ns3/double.h" #include "ns3/log.h" -#include +#include /** * @file diff --git a/src/applications/model/three-gpp-http-variables.cc b/src/applications/model/three-gpp-http-variables.cc index 1f05d9211..4f4139f36 100644 --- a/src/applications/model/three-gpp-http-variables.cc +++ b/src/applications/model/three-gpp-http-variables.cc @@ -13,7 +13,7 @@ #include "ns3/log.h" #include "ns3/uinteger.h" -#include +#include NS_LOG_COMPONENT_DEFINE("ThreeGppHttpVariables"); diff --git a/src/core/model/cairo-wideint-private.h b/src/core/model/cairo-wideint-private.h index 402b68d24..22d503ec4 100644 --- a/src/core/model/cairo-wideint-private.h +++ b/src/core/model/cairo-wideint-private.h @@ -51,45 +51,7 @@ // extern const char * cairo_impl64; // extern const char * cairo_impl128; -/*for compatibility with MacOS and Cygwin*/ -#ifndef HAVE_STDINT_H -#ifdef __APPLE__ -#define HAVE_STDINT_H 1 -#elif defined(WIN32) -#define HAVE_STDINT_H 1 -#endif -#endif - -#if HAVE_STDINT_H -# include -#elif HAVE_INTTYPES_H -# include -#elif HAVE_SYS_INT_TYPES_H -# include -#elif defined(_MSC_VER) -typedef __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -# ifndef HAVE_UINT64_T -# define HAVE_UINT64_T 1 -# endif -# ifndef INT16_MIN -# define INT16_MIN (-32767-1) -# endif -# ifndef INT16_MAX -# define INT16_MAX (32767) -# endif -# ifndef UINT16_MAX -# define UINT16_MAX (65535) -# endif -#else -#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.) -#endif +#include // PDB #ifdef __cplusplus extern "C" { diff --git a/src/core/model/environment-variable.cc b/src/core/model/environment-variable.cc index 753aad277..aa689a8bd 100644 --- a/src/core/model/environment-variable.cc +++ b/src/core/model/environment-variable.cc @@ -11,9 +11,9 @@ #include "string.h" #include // std::getenv +#include // Global functions setenv, unsetenv #include // strlen #include // clog -#include // Global functions setenv, unsetenv /** * @file diff --git a/src/core/model/hash-fnv.cc b/src/core/model/hash-fnv.cc index 80d2c1fae..21a3282e1 100644 --- a/src/core/model/hash-fnv.cc +++ b/src/core/model/hash-fnv.cc @@ -22,7 +22,7 @@ #include "log.h" -#include +#include #include /** @@ -347,7 +347,7 @@ enum fnv_type { * Share and Enjoy! :-) */ -//#include //PDB +//#include //PDB //#include "fnv.h" //PDB @@ -495,7 +495,7 @@ fnv_32a_str(char *str, Fnv32_t hval) * Share and Enjoy! :-) */ -//#include //PDB +//#include //PDB //#include "fnv.h" //PDB diff --git a/src/core/model/int64x64.cc b/src/core/model/int64x64.cc index 1317c9335..759ef83d4 100644 --- a/src/core/model/int64x64.cc +++ b/src/core/model/int64x64.cc @@ -9,11 +9,11 @@ #include "assert.h" #include "log.h" +#include #include // showpos #include #include #include -#include /** * @file diff --git a/src/fd-net-device/helper/creator-utils.cc b/src/fd-net-device/helper/creator-utils.cc index c129db37d..0f1881d89 100644 --- a/src/fd-net-device/helper/creator-utils.cc +++ b/src/fd-net-device/helper/creator-utils.cc @@ -9,6 +9,7 @@ #include "encode-decode.h" #include +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/fd-net-device/helper/emu-fd-net-device-helper.cc b/src/fd-net-device/helper/emu-fd-net-device-helper.cc index e33abaee1..1f0f9fa2a 100644 --- a/src/fd-net-device/helper/emu-fd-net-device-helper.cc +++ b/src/fd-net-device/helper/emu-fd-net-device-helper.cc @@ -19,6 +19,7 @@ #include "ns3/trace-helper.h" #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/fd-net-device/helper/encode-decode.cc b/src/fd-net-device/helper/encode-decode.cc index 50471d0ca..df497043b 100644 --- a/src/fd-net-device/helper/encode-decode.cc +++ b/src/fd-net-device/helper/encode-decode.cc @@ -4,10 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include -#include #include namespace ns3 diff --git a/src/fd-net-device/helper/raw-sock-creator.cc b/src/fd-net-device/helper/raw-sock-creator.cc index 56c97d5df..48eb7bc2f 100644 --- a/src/fd-net-device/helper/raw-sock-creator.cc +++ b/src/fd-net-device/helper/raw-sock-creator.cc @@ -7,6 +7,7 @@ #include "creator-utils.h" #include +#include #include #include #include @@ -15,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/fd-net-device/helper/tap-device-creator.cc b/src/fd-net-device/helper/tap-device-creator.cc index b2140c337..26e03fc3f 100644 --- a/src/fd-net-device/helper/tap-device-creator.cc +++ b/src/fd-net-device/helper/tap-device-creator.cc @@ -9,6 +9,8 @@ #include "ns3/mac48-address.h" #include +#include +#include #include #include #include @@ -19,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/fd-net-device/helper/tap-fd-net-device-helper.cc b/src/fd-net-device/helper/tap-fd-net-device-helper.cc index 5007895b8..cb7b1ea8e 100644 --- a/src/fd-net-device/helper/tap-fd-net-device-helper.cc +++ b/src/fd-net-device/helper/tap-fd-net-device-helper.cc @@ -19,6 +19,7 @@ #include "ns3/trace-helper.h" #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/internet/helper/internet-trace-helper.cc b/src/internet/helper/internet-trace-helper.cc index 85a7e050e..3fa05c26f 100644 --- a/src/internet/helper/internet-trace-helper.cc +++ b/src/internet/helper/internet-trace-helper.cc @@ -15,8 +15,8 @@ #include "ns3/pcap-file-wrapper.h" #include "ns3/ptr.h" +#include #include -#include #include namespace ns3 diff --git a/src/internet/model/ipv4-packet-info-tag.cc b/src/internet/model/ipv4-packet-info-tag.cc index e375e7f82..a67403a29 100644 --- a/src/internet/model/ipv4-packet-info-tag.cc +++ b/src/internet/model/ipv4-packet-info-tag.cc @@ -11,7 +11,7 @@ #include "ns3/ipv4-address.h" #include "ns3/log.h" -#include +#include namespace ns3 { diff --git a/src/internet/model/ipv6-packet-info-tag.cc b/src/internet/model/ipv6-packet-info-tag.cc index afc6bc4d2..4813e1b8c 100644 --- a/src/internet/model/ipv6-packet-info-tag.cc +++ b/src/internet/model/ipv6-packet-info-tag.cc @@ -10,7 +10,7 @@ #include "ns3/ipv6-address.h" -#include +#include namespace ns3 { diff --git a/src/internet/model/tcp-header.cc b/src/internet/model/tcp-header.cc index 191ac0d63..70b035833 100644 --- a/src/internet/model/tcp-header.cc +++ b/src/internet/model/tcp-header.cc @@ -14,8 +14,8 @@ #include "ns3/buffer.h" #include "ns3/log.h" +#include #include -#include namespace ns3 { diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index c0464d55f..e0a91c793 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -52,7 +52,7 @@ #include "ns3/uinteger.h" #include -#include +#include namespace { diff --git a/src/lte/model/lte-mi-error-model.cc b/src/lte/model/lte-mi-error-model.cc index 0842ca14c..bd8294365 100644 --- a/src/lte/model/lte-mi-error-model.cc +++ b/src/lte/model/lte-mi-error-model.cc @@ -23,9 +23,9 @@ #include "ns3/pointer.h" #include +#include +#include #include -#include -#include #include namespace ns3 diff --git a/src/mobility/model/geocentric-constant-position-mobility-model.cc b/src/mobility/model/geocentric-constant-position-mobility-model.cc index 282feeeda..8caa63d3e 100644 --- a/src/mobility/model/geocentric-constant-position-mobility-model.cc +++ b/src/mobility/model/geocentric-constant-position-mobility-model.cc @@ -9,7 +9,7 @@ #include "ns3/angles.h" -#include +#include /** * @file diff --git a/src/network/helper/trace-helper.cc b/src/network/helper/trace-helper.cc index 2e294cd03..ca4cefade 100644 --- a/src/network/helper/trace-helper.cc +++ b/src/network/helper/trace-helper.cc @@ -15,8 +15,8 @@ #include "ns3/pcap-file-wrapper.h" #include "ns3/ptr.h" +#include #include -#include #include namespace ns3 diff --git a/src/network/utils/crc32.cc b/src/network/utils/crc32.cc index 1945acaeb..93d149176 100644 --- a/src/network/utils/crc32.cc +++ b/src/network/utils/crc32.cc @@ -13,7 +13,7 @@ * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or * code or tables extracted from it, as desired without restriction. */ -#include +#include namespace ns3 { diff --git a/src/network/utils/packet-burst.cc b/src/network/utils/packet-burst.cc index d96ec6948..8c7c0affd 100644 --- a/src/network/utils/packet-burst.cc +++ b/src/network/utils/packet-burst.cc @@ -11,8 +11,8 @@ #include "ns3/log.h" #include "ns3/packet.h" +#include #include -#include namespace ns3 { diff --git a/src/tap-bridge/model/tap-creator.cc b/src/tap-bridge/model/tap-creator.cc index a4e101c69..abfd92f92 100644 --- a/src/tap-bridge/model/tap-creator.cc +++ b/src/tap-bridge/model/tap-creator.cc @@ -9,6 +9,7 @@ #include "ns3/mac48-address.h" #include +#include #include #include // for strerror #include @@ -19,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/tap-bridge/model/tap-encode-decode.cc b/src/tap-bridge/model/tap-encode-decode.cc index 6d80b9b56..4fc2219c8 100644 --- a/src/tap-bridge/model/tap-encode-decode.cc +++ b/src/tap-bridge/model/tap-encode-decode.cc @@ -4,10 +4,10 @@ * SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include -#include #include namespace ns3 diff --git a/src/wimax/model/bs-link-manager.cc b/src/wimax/model/bs-link-manager.cc index 7d3af4990..cc1423b5f 100644 --- a/src/wimax/model/bs-link-manager.cc +++ b/src/wimax/model/bs-link-manager.cc @@ -21,7 +21,7 @@ #include "ns3/packet.h" #include "ns3/simulator.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/bs-service-flow-manager.cc b/src/wimax/model/bs-service-flow-manager.cc index 20c19671e..1bf7e3f4b 100644 --- a/src/wimax/model/bs-service-flow-manager.cc +++ b/src/wimax/model/bs-service-flow-manager.cc @@ -26,7 +26,7 @@ #include "ns3/pointer.h" #include "ns3/simulator.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/burst-profile-manager.cc b/src/wimax/model/burst-profile-manager.cc index f8c5ea165..e3e7ea9dc 100644 --- a/src/wimax/model/burst-profile-manager.cc +++ b/src/wimax/model/burst-profile-manager.cc @@ -16,7 +16,7 @@ #include "ns3/log.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/cid-factory.cc b/src/wimax/model/cid-factory.cc index 152a35548..243125d54 100644 --- a/src/wimax/model/cid-factory.cc +++ b/src/wimax/model/cid-factory.cc @@ -12,7 +12,7 @@ #include "ns3/uinteger.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/crc8.cc b/src/wimax/model/crc8.cc index 84064c101..23ee7c155 100644 --- a/src/wimax/model/crc8.cc +++ b/src/wimax/model/crc8.cc @@ -6,7 +6,7 @@ * Author: Mohamed Amine Ismail * */ -#include +#include namespace ns3 { diff --git a/src/wimax/model/dl-mac-messages.cc b/src/wimax/model/dl-mac-messages.cc index a388a91de..15449706b 100644 --- a/src/wimax/model/dl-mac-messages.cc +++ b/src/wimax/model/dl-mac-messages.cc @@ -12,7 +12,7 @@ #include "ns3/address-utils.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ipcs-classifier-record.cc b/src/wimax/model/ipcs-classifier-record.cc index 5312ca9ef..9082a553c 100644 --- a/src/wimax/model/ipcs-classifier-record.cc +++ b/src/wimax/model/ipcs-classifier-record.cc @@ -11,7 +11,7 @@ #include "ns3/ipv4-address.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ipcs-classifier.cc b/src/wimax/model/ipcs-classifier.cc index b5180d0f9..3773cc3cf 100644 --- a/src/wimax/model/ipcs-classifier.cc +++ b/src/wimax/model/ipcs-classifier.cc @@ -20,7 +20,7 @@ #include "ns3/udp-header.h" #include "ns3/udp-l4-protocol.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ofdm-downlink-frame-prefix.cc b/src/wimax/model/ofdm-downlink-frame-prefix.cc index af38a2602..007e5a154 100644 --- a/src/wimax/model/ofdm-downlink-frame-prefix.cc +++ b/src/wimax/model/ofdm-downlink-frame-prefix.cc @@ -10,7 +10,7 @@ #include "ns3/address-utils.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/service-flow-manager.cc b/src/wimax/model/service-flow-manager.cc index 5ddfa616a..086e3882a 100644 --- a/src/wimax/model/service-flow-manager.cc +++ b/src/wimax/model/service-flow-manager.cc @@ -29,7 +29,7 @@ #include "ns3/pointer.h" #include "ns3/simulator.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ss-link-manager.cc b/src/wimax/model/ss-link-manager.cc index 725458dbe..ef5ef8909 100644 --- a/src/wimax/model/ss-link-manager.cc +++ b/src/wimax/model/ss-link-manager.cc @@ -20,7 +20,7 @@ #include "ns3/pointer.h" #include "ns3/simulator.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ss-manager.cc b/src/wimax/model/ss-manager.cc index 62f3ae043..01fc7479d 100644 --- a/src/wimax/model/ss-manager.cc +++ b/src/wimax/model/ss-manager.cc @@ -14,7 +14,7 @@ #include "ns3/log.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ss-record.cc b/src/wimax/model/ss-record.cc index a1c16dc85..69ad77065 100644 --- a/src/wimax/model/ss-record.cc +++ b/src/wimax/model/ss-record.cc @@ -11,7 +11,7 @@ #include "service-flow.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ss-service-flow-manager.cc b/src/wimax/model/ss-service-flow-manager.cc index 111ef151e..7f5e3622d 100644 --- a/src/wimax/model/ss-service-flow-manager.cc +++ b/src/wimax/model/ss-service-flow-manager.cc @@ -27,7 +27,7 @@ #include "ns3/pointer.h" #include "ns3/simulator.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ul-job.cc b/src/wimax/model/ul-job.cc index 38242efd9..f3f7be9f2 100644 --- a/src/wimax/model/ul-job.cc +++ b/src/wimax/model/ul-job.cc @@ -9,7 +9,7 @@ #include "ul-job.h" -#include +#include namespace ns3 { diff --git a/src/wimax/model/ul-mac-messages.cc b/src/wimax/model/ul-mac-messages.cc index dc9b23b4f..835c6a7f0 100644 --- a/src/wimax/model/ul-mac-messages.cc +++ b/src/wimax/model/ul-mac-messages.cc @@ -10,7 +10,7 @@ #include "ul-mac-messages.h" -#include +#include namespace ns3 { diff --git a/utils/bench-packets.cc b/utils/bench-packets.cc index 85b18b0df..faad082d6 100644 --- a/utils/bench-packets.cc +++ b/utils/bench-packets.cc @@ -16,10 +16,10 @@ #include "ns3/system-wall-clock-ms.h" #include +#include // for exit () #include #include #include -#include // for exit () #include using namespace ns3;