diff options
author | Boroondas Gupte <hg@boroon.dasgupta.ch> | 2011-02-11 01:27:01 +0100 |
---|---|---|
committer | Boroondas Gupte <hg@boroon.dasgupta.ch> | 2011-02-11 01:27:01 +0100 |
commit | 29b3207fe433497c60feff0b1f71b7fdb27412e1 (patch) | |
tree | 4909e82f870c9e081c2fcc9859e3fa257e2059d7 | |
parent | 547b40bfc8b0139789a2d9c5dcd1591343a2c60b (diff) |
OPEN-29 Error out if lldir_<platform>.h is included when building for a different platform
As far as I know, there is no good reason to include e.g.
indra/llvfs/lldir_win32.h while not building for a windows target, so be
better prevent this to avoid hard to find errors.
-rw-r--r-- | doc/contributions.txt | 1 | ||||
-rw-r--r-- | indra/llvfs/lldir_linux.h | 4 | ||||
-rw-r--r-- | indra/llvfs/lldir_mac.h | 4 | ||||
-rw-r--r-- | indra/llvfs/lldir_solaris.h | 4 | ||||
-rw-r--r-- | indra/llvfs/lldir_win32.h | 4 |
5 files changed, 17 insertions, 0 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 516760aa5a..3330b9794f 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -189,6 +189,7 @@ Blakar Ogre blino Nakamura VWR-17 Boroondas Gupte + OPEN-29 SNOW-278 SNOW-503 SNOW-510 diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index 451e81ae93..c7cfe905f5 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_LINUX +#error This header must not be included when compiling for any target other than Linux. Consider including lldir.h instead. +#endif // !LL_LINUX + #ifndef LL_LLDIR_LINUX_H #define LL_LLDIR_LINUX_H diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h index 4eac3c3ae6..6bde458bf6 100644 --- a/indra/llvfs/lldir_mac.h +++ b/indra/llvfs/lldir_mac.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_DARWIN +#error This header must not be included when compiling for any target other than Mac OS. Consider including lldir.h instead. +#endif // !LL_DARWIN + #ifndef LL_LLDIR_MAC_H #define LL_LLDIR_MAC_H diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h index 4a1794f539..b48752d362 100644 --- a/indra/llvfs/lldir_solaris.h +++ b/indra/llvfs/lldir_solaris.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_SOLARIS +#error This header must not be included when compiling for any target other than Solaris. Consider including lldir.h instead. +#endif // !LL_SOLARIS + #ifndef LL_LLDIR_SOLARIS_H #define LL_LLDIR_SOLARIS_H diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h index 4c932c932c..1d0a692883 100644 --- a/indra/llvfs/lldir_win32.h +++ b/indra/llvfs/lldir_win32.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_WINDOWS +#error This header must not be included when compiling for any target other than Windows. Consider including lldir.h instead. +#endif // !LL_WINDOWS + #ifndef LL_LLDIR_WIN32_H #define LL_LLDIR_WIN32_H |