Summary:
Malloc.h is intentionally included multiple times, once from folly and once from libstdc++. The current ###pragma once## implicitly allows this to happen. FBString.h has an undef for Malloc.h's include guard, which originally accomplished this goal.
The undefing code is presently moot, since its functionality has been replaced by ###pragma once##. Remove it.
I noticed this when ott was copying FBString over to libstdc++ in
D3757853.
The diff that switched the include guards to pragmas was a codemod, and was not specific to fbstring.
D3054492
Reviewed By: ot
Differential Revision:
D3758119
fbshipit-source-id:
e796d039a031d5f842ed39bf55a6b1aeb2686bc4
#define FOLLY_DEFINED_NDEBUG_FOR_FBSTRING
#endif // NDEBUG
-// Handle the cases where the fbcode version (folly/Malloc.h) is included
-// either before or after this inclusion.
-#ifdef FOLLY_MALLOC_H_
-#undef FOLLY_MALLOC_H_
-#include "basic_fbstring_malloc.h" // nolint
-#else
-#include "basic_fbstring_malloc.h" // nolint
-#undef FOLLY_MALLOC_H_
-#endif
+#include "basic_fbstring_malloc.h"
#else // !_LIBSTDCXX_FBSTRING
// http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html
#pragma once
-#define FOLLY_MALLOC_H_
/**
* Define various MALLOCX_* macros normally provided by jemalloc. We define