Permalink
Browse files

Tell glibcxx to use glibc's optimized str functions

  • Loading branch information...
1 parent e039151 commit 04261c7d15308d2b20edf61b9c8ee175f6c21ad4 @RedBeard0531 RedBeard0531 committed Aug 8, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 pch.h
View
13 pch.h
@@ -44,7 +44,20 @@
# include <windows.h>
#endif
+#if defined(__linux__) && defined(MONGO_EXPOSE_MACROS)
+// glibc's optimized versions are better than g++ builtins
+# define __builtin_strcmp strcmp
+# define __builtin_strlen strlen
+# define __builtin_memchr memchr
+# define __builtin_memcmp memcmp
+# define __builtin_memcpy memcpy
+# define __builtin_memset memset
+# define __builtin_memmove memmove
+#endif
+
+
#include <ctime>
+#include <cstring>
#include <sstream>
#include <string>
#include <memory>

0 comments on commit 04261c7

Please sign in to comment.