From d9e0b59db5fce150845190686bf681b715e418ae Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Wed, 16 Mar 2016 15:15:52 -0700 Subject: [PATCH] Create portability/Config.h Summary: Because including the root portability header just to get a couple of defines to be able to enable things is a waste. In addition, it would be nice if the config defines are never needed outside of the portability headers. Reviewed By: yfeldblum Differential Revision: D3059651 fb-gh-sync-id: 1cb9910d850ea015616a598808556b4815b3fb74 shipit-source-id: 1cb9910d850ea015616a598808556b4815b3fb74 --- folly/Makefile.am | 1 + folly/Portability.h | 8 +------- folly/portability/Config.h | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100755 folly/portability/Config.h diff --git a/folly/Makefile.am b/folly/Makefile.am index 746350bd..5428b5fa 100644 --- a/folly/Makefile.am +++ b/folly/Makefile.am @@ -268,6 +268,7 @@ nobase_follyinclude_HEADERS = \ Padded.h \ PicoSpinLock.h \ Portability.h \ + portability/Config.h \ portability/Constexpr.h \ portability/Environment.h \ portability/GFlags.h \ diff --git a/folly/Portability.h b/folly/Portability.h index 3276e447..3df79c9a 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -21,13 +21,7 @@ #include -#ifndef FOLLY_NO_CONFIG -#include -#endif - -#ifdef FOLLY_PLATFORM_CONFIG -#include FOLLY_PLATFORM_CONFIG -#endif +#include #if FOLLY_HAVE_FEATURES_H #include diff --git a/folly/portability/Config.h b/folly/portability/Config.h new file mode 100755 index 00000000..a506f906 --- /dev/null +++ b/folly/portability/Config.h @@ -0,0 +1,25 @@ +/* + * Copyright 2016 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#ifndef FOLLY_NO_CONFIG +#include +#endif + +#ifdef FOLLY_PLATFORM_CONFIG +#include FOLLY_PLATFORM_CONFIG +#endif -- 2.34.1