freebsd-ports/benchmarks/postal/files/patch-smtp.h
Mathieu Arnold 56bf85096c Cleanup patches, category benchmarks
Rename them to follow the make makepatch naming, and regenerate them.

With hat:	portmgr
Sponsored by:	Absolight
2016-07-27 15:09:11 +00:00

34 lines
695 B
C++

--- smtp.h.orig 2012-01-14 12:36:56 UTC
+++ smtp.h
@@ -4,14 +4,18 @@
using namespace std;
#include <string>
#include <cstring>
-#include <time.h>
+#include <ctime>
#include "conf.h"
+#if defined(_LIBCPP_VERSION)
+#include <unordered_map>
+#else
#ifdef HAVE_EXT_HASH_MAP
using namespace __gnu_cxx;
#include <ext/hash_map>
#else
#include <hash_map.h>
#endif
+#endif
#include "tcp.h"
#include "mutex.h"
@@ -30,7 +34,11 @@ struct eqlng
}
};
+#if defined(_LIBCPP_VERSION)
+typedef std::unordered_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
+#else
typedef hash_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
+#endif
class smtpData
{