core: Split C++ include guards from int64x64 include logic

This commit is contained in:
Eduardo Almeida
2024-08-20 23:36:13 +01:00
parent ac7a5074b5
commit c455e4a360
3 changed files with 19 additions and 8 deletions

View File

@@ -16,14 +16,16 @@
*
*/
#ifndef INT64X64_128_H
#define INT64X64_128_H
#include "ns3/core-config.h"
#if !defined(INT64X64_128_H) && defined(INT64X64_USE_128) && !defined(PYTHON_SCAN)
/**
* \ingroup highprec
* Use uint128_t for int64x64_t implementation
*/
#define INT64X64_128_H
#if defined(INT64X64_USE_128) && !defined(PYTHON_SCAN)
#include <cmath> // pow
#include <stdint.h>
@@ -460,4 +462,5 @@ class int64x64_t
} // namespace ns3
#endif /* defined(INT64X64_USE_128) && !defined(PYTHON_SCAN) */
#endif /* INT64X64_128_H */

View File

@@ -16,11 +16,14 @@
*
*/
#include "ns3/core-config.h"
#if !defined(INT64X64_CAIRO_H) && defined(INT64X64_USE_CAIRO) && !defined(PYTHON_SCAN)
/** Using the ns3::int64x64_t based on Cairo 128-bit integers. */
#ifndef INT64X64_CAIRO_H
#define INT64X64_CAIRO_H
#include "ns3/core-config.h"
#if defined(INT64X64_USE_CAIRO) && !defined(PYTHON_SCAN)
/** Using the ns3::int64x64_t based on Cairo 128-bit integers. */
#include "cairo-wideint-private.h"
#include <cmath> // pow
@@ -443,4 +446,5 @@ class int64x64_t
} // namespace ns3
#endif /* defined(INT64X64_USE_CAIRO) && !defined(PYTHON_SCAN) */
#endif /* INT64X64_CAIRO_H */

View File

@@ -16,11 +16,14 @@
*
*/
#include "ns3/core-config.h"
#if !defined(INT64X64_DOUBLE_H) && (defined(INT64X64_USE_DOUBLE) || defined(PYTHON_SCAN))
/** Using the ns3::int64x64_t based on double values. */
#ifndef INT64X64_DOUBLE_H
#define INT64X64_DOUBLE_H
#include "ns3/core-config.h"
#if defined(INT64X64_USE_DOUBLE) || defined(PYTHON_SCAN)
/** Using the ns3::int64x64_t based on double values. */
#include <cmath> // pow
#include <stdint.h>
#include <utility> // pair
@@ -386,4 +389,5 @@ class int64x64_t
} // namespace ns3
#endif /* defined(INT64X64_USE_DOUBLE) || defined(PYTHON_SCAN) */
#endif /* INT64X64_DOUBLE_H */