Commit 4cace13a authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 9

Define DECLARE_VARIABLE in portability/GFlags.h

Summary: If we don't, then anywhere we include `glog/logging.h` after the portability header will get the `DECLARE_*` and `DEFINE_*` macros undefined -_-....

Reviewed By: mzlee

Differential Revision: D3220797

fb-gh-sync-id: 52907ddcd6b222fb1c6423034ea999eac5ce09ab
fbshipit-source-id: 52907ddcd6b222fb1c6423034ea999eac5ce09ab
parent e16f91ff
......@@ -19,6 +19,14 @@
#if FOLLY_HAVE_LIBGFLAGS
#include <gflags/gflags.h>
#else
// glog/logging.h is dependent on this implementation detail
// being defined otherwise it undefines all of this -_-....
//
// Also, this is deliberately expanded such that places using
// it directly break loudly. (C will break louder than C++, but oh well)
#define DECLARE_VARIABLE() \
static_assert(false, "You shouldn't be using GFlags internals.");
#define FOLLY_DECLARE_FLAG(_type, _name) extern _type FLAGS_##_name
#define DECLARE_bool(_name) FOLLY_DECLARE_FLAG(bool, _name)
#define DECLARE_double(_name) FOLLY_DECLARE_FLAG(double, _name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment