#ifndef PROCESS_H
#define PROCESS_H
-#include <map>
+#define USE_UNORDERED_MAP 1
+//#undef USE_UNORDERED_MAP
+
#include <vector>
+#ifdef USE_UNORDERED_MAP
+# include <tr1/unordered_map>
+# define MAP_TEMPLATE std::tr1::unordered_map
+#else
+# include <map>
+# define MAP_TEMPLATE std::map
+#endif
#include <msg/msg.h>
#include "communicator.h"
#include "neighbor.h"
class process {
public:
process(int argc, char* argv[]);
- ~process() { };
+ ~process();
int run();
private:
std::vector<neighbor> neigh;
- std::map<m_host_t, neighbor*> rev_neigh;
+ MAP_TEMPLATE<m_host_t, neighbor*> rev_neigh;
+ std::vector<neighbor*> pneigh;
communicator comm;
int ctrl_close_pending;
#!/bin/bash
+# Inspired by linux-2.6/scripts/setlocalversion
+
set -e
FILE=localversion
fi
head=$(git rev-parse --verify --short HEAD)
printf "~git-%s" "$head"
+ # Check for uncommitted changes
+ if git diff-index --name-only HEAD | read dummy; then
+ printf '%s' "-dirty"
+ fi
+
}
[ -f "$FILE" ] || touch "$FILE"