add needed configure magic and header includes

This commit is contained in:
Mathieu Lacage
2006-12-04 08:03:28 +01:00
parent fa04c0e0df
commit 04e6f0dfa0
2 changed files with 25 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ simu = build.Ns3Module('simulator', 'src/simulator')
ns3.add(simu)
simu.add_dep('core')
simu.add_sources([
'cairo-wideint.c',
'high-precision.cc',
'time.cc',
'event-id.cc',
@@ -60,6 +61,7 @@ simu.add_sources([
'simulator.cc',
])
simu.add_headers([
'cairo-wideint-private.h',
'scheduler-heap.h',
'scheduler-map.h',
'scheduler-list.h'
@@ -73,6 +75,17 @@ simu.add_inst_headers([
'scheduler.h',
'scheduler-factory.h',
])
def config_simulator (env, config):
retval = []
if config.CheckCHeader ('stdint.h') == 1:
retval.append ('#define HAVE_STDINT_H 1')
elif config.CheckCHeader ('inttypes.h') == 1:
retval.append ('#define HAVE_INTTYPES_H 1')
elif config.CheckCHeader ('sys/inttypes.h') == 1:
retval.append ('#define HAVE_SYS_INT_TYPES_H 1')
return retval
simu.add_config (config_simulator)
#
# The Common module

View File

@@ -32,6 +32,9 @@
#ifndef CAIRO_WIDEINT_H
#define CAIRO_WIDEINT_H
#include "ns3/simulator-config.h"
#define cairo_private
#if HAVE_STDINT_H
# include <stdint.h>
#elif HAVE_INTTYPES_H
@@ -63,6 +66,10 @@
#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* 64-bit datatypes. Two separate implementations, one using
* built-in 64-bit signed/unsigned types another implemented
@@ -313,4 +320,9 @@ _cairo_int_96by64_32x64_divrem (cairo_int128_t num,
#undef I
#ifdef __cplusplus
};
#endif
#endif /* CAIRO_WIDEINT_H */