1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/common/sgi-hashmap.h Tue Aug 25 08:41:04 2009 +0200
1.3 @@ -0,0 +1,38 @@
1.4 +/* This code snippet was ripped out of the gcc
1.5 + * documentation and slightly modified to work
1.6 + * with gcc 4.x
1.7 + */
1.8 +#ifndef SGI_HASHMAP_H
1.9 +#define SGI_HASHMAP_H
1.10 +
1.11 +/* To use gcc extensions.
1.12 + */
1.13 +#ifdef __GNUC__
1.14 + #if __GNUC__ < 3
1.15 + #include <hash_map.h>
1.16 +namespace sgi { using ::hash_map; }; // inherit globals
1.17 + #else
1.18 + #if __GNUC__ < 4
1.19 + #include <ext/hash_map>
1.20 + #if __GNUC_MINOR__ == 0
1.21 +namespace sgi = std; // GCC 3.0
1.22 + #else
1.23 +namespace sgi = ::__gnu_cxx; // GCC 3.1 and later
1.24 + #endif
1.25 + #else // gcc 4.x and later
1.26 + #if __GNUC_MINOR__ < 3
1.27 + #include <ext/hash_map>
1.28 +namespace sgi = ::__gnu_cxx;
1.29 + #else
1.30 +#undef __DEPRECATED
1.31 + #include <backward/hash_map>
1.32 +namespace sgi = ::__gnu_cxx;
1.33 + #endif
1.34 + #endif
1.35 + #endif
1.36 +#else // ... there are other compilers, right?
1.37 +namespace sgi = std;
1.38 +#endif
1.39 +
1.40 +
1.41 +#endif /* SGI_HASHMAP_H */
2.1 --- a/src/common/wscript Mon Aug 24 19:11:41 2009 -0700
2.2 +++ b/src/common/wscript Tue Aug 25 08:41:04 2009 +0200
2.3 @@ -37,4 +37,5 @@
2.4 'tag-buffer.h',
2.5 'packet-tag-list.h',
2.6 'ascii-writer.h',
2.7 + 'sgi-hashmap.h',
2.8 ]
3.1 --- a/src/internet-stack/arp-cache.h Mon Aug 24 19:11:41 2009 -0700
3.2 +++ b/src/internet-stack/arp-cache.h Tue Aug 25 08:41:04 2009 +0200
3.3 @@ -32,7 +32,7 @@
3.4 #include "ns3/ptr.h"
3.5 #include "ns3/object.h"
3.6 #include "ns3/traced-callback.h"
3.7 -#include "sgi-hashmap.h"
3.8 +#include "ns3/sgi-hashmap.h"
3.9
3.10 namespace ns3 {
3.11
4.1 --- a/src/internet-stack/ndisc-cache.h Mon Aug 24 19:11:41 2009 -0700
4.2 +++ b/src/internet-stack/ndisc-cache.h Tue Aug 25 08:41:04 2009 +0200
4.3 @@ -31,8 +31,8 @@
4.4 #include "ns3/ipv6-address.h"
4.5 #include "ns3/ptr.h"
4.6 #include "ns3/timer.h"
4.7 +#include "ns3/sgi-hashmap.h"
4.8
4.9 -#include "sgi-hashmap.h"
4.10 #include "ipv6-interface.h"
4.11
4.12 namespace ns3
5.1 --- a/src/internet-stack/sgi-hashmap.h Mon Aug 24 19:11:41 2009 -0700
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,38 +0,0 @@
5.4 -/* This code snippet was ripped out of the gcc
5.5 - * documentation and slightly modified to work
5.6 - * with gcc 4.x
5.7 - */
5.8 -#ifndef SGI_HASHMAP_H
5.9 -#define SGI_HASHMAP_H
5.10 -
5.11 -/* To use gcc extensions.
5.12 - */
5.13 -#ifdef __GNUC__
5.14 - #if __GNUC__ < 3
5.15 - #include <hash_map.h>
5.16 -namespace sgi { using ::hash_map; }; // inherit globals
5.17 - #else
5.18 - #if __GNUC__ < 4
5.19 - #include <ext/hash_map>
5.20 - #if __GNUC_MINOR__ == 0
5.21 -namespace sgi = std; // GCC 3.0
5.22 - #else
5.23 -namespace sgi = ::__gnu_cxx; // GCC 3.1 and later
5.24 - #endif
5.25 - #else // gcc 4.x and later
5.26 - #if __GNUC_MINOR__ < 3
5.27 - #include <ext/hash_map>
5.28 -namespace sgi = ::__gnu_cxx;
5.29 - #else
5.30 -#undef __DEPRECATED
5.31 - #include <backward/hash_map>
5.32 -namespace sgi = ::__gnu_cxx;
5.33 - #endif
5.34 - #endif
5.35 - #endif
5.36 -#else // ... there are other compilers, right?
5.37 -namespace sgi = std;
5.38 -#endif
5.39 -
5.40 -
5.41 -#endif /* SGI_HASHMAP_H */