port.h 1.29 KB
Newer Older
Robert Ricci's avatar
Robert Ricci committed
1 2
/*
 * EMULAB-COPYRIGHT
Robert Ricci's avatar
Robert Ricci committed
3
 * Copyright (c) 2002-2010 University of Utah and the Flux Group.
Robert Ricci's avatar
Robert Ricci committed
4 5 6
 * All rights reserved.
 */

7
// This file may need to be changed depending on the architecture.
8
#ifndef __PORT_H
9
#define __PORT_H
10 11
#include <limits.h>

12
#ifndef WCHAR_MIN
13 14
#define WCHAR_MIN INT_MIN
#define WCHAR_MAX INT_MAX
15
#endif
16 17 18 19

/*
 * We have to do these includes differently depending on which version of gcc
 * we're compiling with
Robert Ricci's avatar
Robert Ricci committed
20 21 22 23 24 25 26 27 28 29
 *
 * In G++ 4.3, hash_set and hash_map were formally deprecated and
 * moved from ext/ to backward/.  Well, that's what the release notes
 * claim.  In fact, on my system, hash_set and hash_map appear in both
 * ext/ and backward/.  But, hash_fun.h is only in backward/, necessi-
 * tating the NEWER_GCC macro.
 *
 * The real fix is to replace
 *   hash_set with tr1::unordered_set in <tr1/unordered_set>
 *   hash_map with tr1::unordered_map in <tr1/unordered_map>
30
 */
31 32 33 34
#if (__GNUC__ == 3 && __GNUC_MINOR__ > 0) || (__GNUC__ > 3)
#define NEW_GCC
#endif

Robert Ricci's avatar
Robert Ricci committed
35 36 37 38
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 4)
#define NEWER_GCC
#endif

39
#ifdef NEW_GCC
40
#include <ext/slist>
41 42
using namespace __gnu_cxx;
#else
43
#include <slist>
44 45
#endif

46 47 48 49 50 51
#ifdef NEWER_BOOST
#define BOOST_PMAP_HEADER <boost/property_map/property_map.hpp>
#else
#define BOOST_PMAP_HEADER <boost/property_map.hpp>
#endif

52 53
#else
#endif