| Index: build/build_config.h
|
| diff --git a/build/build_config.h b/build/build_config.h
|
| index 2b9efda15a2759b5cf0617123916257178218abd..90d88205c5923cd7af009e72fe0b5f3dccfd6735 100644
|
| --- a/build/build_config.h
|
| +++ b/build/build_config.h
|
| @@ -2,8 +2,10 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -// This file adds defines about the platform we're currently building on.
|
| -// Operating System:
|
| +// This file adds and checks for defines about the platform we're currently
|
| +// building on. (The OS_* defines were historically set here, but now they're
|
| +// part of the build configuration and this file just asserts that they're set.)
|
| +// Operating System (set by build configuration):
|
| // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
|
| // Compiler:
|
| // COMPILER_MSVC / COMPILER_GCC
|
| @@ -16,11 +18,17 @@
|
|
|
| // A set of macros to use for platform detection.
|
| #if defined(__APPLE__)
|
| -#define OS_MACOSX 1
|
| +#ifndef OS_MACOSX 1
|
| +#error OS_MACOSX should have been set by build files.
|
| +#endif
|
| #elif defined(__linux__)
|
| -#define OS_LINUX 1
|
| +#ifndef OS_LINUX
|
| +#error OS_LINUX should have been set by build files.
|
| +#endif
|
| #elif defined(_WIN32)
|
| -#define OS_WIN 1
|
| +#ifndef OS_WIN
|
| +#error OS_WIN should have been set by build files.
|
| +#endif
|
| #else
|
| #error Please add support for your platform in build/build_config.h
|
| #endif
|
| @@ -28,7 +36,9 @@
|
| // For access to standard POSIX features, use OS_POSIX instead of a more
|
| // specific macro.
|
| #if defined(OS_MACOSX) || defined(OS_LINUX)
|
| -#define OS_POSIX 1
|
| +#ifndef OS_POSIX
|
| +#error OS_POSIX should have been set by build files.
|
| +#endif
|
| #endif
|
|
|
| // Compiler detection.
|
|
|