Bug 1339695 (part 2) - Reorder PlatformMacros.h.h. r=mstange.

This change increases consistency:

- Each OS is dealt with one at a time (no more interleaving).

- For each OS, x86 is now the first listed architecture.

The patch also adds the missing "#undef SPS_PLAT_x86_android".

--HG--
extra : rebase_source : 6ab278ff2523269424aa6dc872ec35ca6dc735a4
This commit is contained in:
Nicholas Nethercote 2017-02-15 16:24:33 +11:00
Родитель 8eb85b796e
Коммит bf2a7f555a
1 изменённых файлов: 23 добавлений и 17 удалений

Просмотреть файл

@ -12,59 +12,65 @@
and OS_ macros are defined too, since they are sometimes and OS_ macros are defined too, since they are sometimes
convenient. */ convenient. */
#undef SPS_PLAT_x86_android
#undef SPS_PLAT_arm_android #undef SPS_PLAT_arm_android
#undef SPS_PLAT_amd64_linux
#undef SPS_PLAT_x86_linux #undef SPS_PLAT_x86_linux
#undef SPS_PLAT_amd64_darwin #undef SPS_PLAT_amd64_linux
#undef SPS_PLAT_x86_darwin #undef SPS_PLAT_x86_darwin
#undef SPS_PLAT_amd64_darwin
#undef SPS_PLAT_x86_windows #undef SPS_PLAT_x86_windows
#undef SPS_PLAT_amd64_windows #undef SPS_PLAT_amd64_windows
#undef SPS_ARCH_arm
#undef SPS_ARCH_x86 #undef SPS_ARCH_x86
#undef SPS_ARCH_amd64 #undef SPS_ARCH_amd64
#undef SPS_ARCH_arm
#undef SPS_OS_android #undef SPS_OS_android
#undef SPS_OS_linux #undef SPS_OS_linux
#undef SPS_OS_darwin #undef SPS_OS_darwin
#undef SPS_OS_windows #undef SPS_OS_windows
#if defined(__linux__) && defined(__x86_64__) // We test __ANDROID__ before __linux__ because __linux__ is defined on both
# define SPS_PLAT_amd64_linux 1 // Android and Linux, whereas SPS_OS_android is not defined on vanilla Linux.
# define SPS_ARCH_amd64 1
# define SPS_OS_linux 1 #if defined(__ANDROID__) && defined(__i386__)
# define SPS_PLAT_x86_android 1
# define SPS_ARCH_x86 1
# define SPS_OS_android 1
#elif defined(__ANDROID__) && defined(__arm__) #elif defined(__ANDROID__) && defined(__arm__)
# define SPS_PLAT_arm_android 1 # define SPS_PLAT_arm_android 1
# define SPS_ARCH_arm 1 # define SPS_ARCH_arm 1
# define SPS_OS_android 1 # define SPS_OS_android 1
#elif defined(__ANDROID__) && defined(__i386__)
# define SPS_PLAT_x86_android 1
# define SPS_ARCH_x86 1
# define SPS_OS_android 1
#elif defined(__linux__) && defined(__i386__) #elif defined(__linux__) && defined(__i386__)
# define SPS_PLAT_x86_linux 1 # define SPS_PLAT_x86_linux 1
# define SPS_ARCH_x86 1 # define SPS_ARCH_x86 1
# define SPS_OS_linux 1 # define SPS_OS_linux 1
#elif defined(__APPLE__) && defined(__x86_64__) #elif defined(__linux__) && defined(__x86_64__)
# define SPS_PLAT_amd64_darwin 1 # define SPS_PLAT_amd64_linux 1
# define SPS_ARCH_amd64 1 # define SPS_ARCH_amd64 1
# define SPS_OS_darwin 1 # define SPS_OS_linux 1
#elif defined(__APPLE__) && defined(__i386__) #elif defined(__APPLE__) && defined(__i386__)
# define SPS_PLAT_x86_darwin 1 # define SPS_PLAT_x86_darwin 1
# define SPS_ARCH_x86 1 # define SPS_ARCH_x86 1
# define SPS_OS_darwin 1 # define SPS_OS_darwin 1
#elif (defined(_MSC_VER) || defined(__MINGW32__)) && (defined(_M_IX86) || defined(__i386__)) #elif defined(__APPLE__) && defined(__x86_64__)
# define SPS_PLAT_amd64_darwin 1
# define SPS_ARCH_amd64 1
# define SPS_OS_darwin 1
#elif (defined(_MSC_VER) || defined(__MINGW32__)) && \
(defined(_M_IX86) || defined(__i386__))
# define SPS_PLAT_x86_windows 1 # define SPS_PLAT_x86_windows 1
# define SPS_ARCH_x86 1 # define SPS_ARCH_x86 1
# define SPS_OS_windows 1 # define SPS_OS_windows 1
#elif (defined(_MSC_VER) || defined(__MINGW32__)) && (defined(_M_X64) || defined(__x86_64__)) #elif (defined(_MSC_VER) || defined(__MINGW32__)) && \
(defined(_M_X64) || defined(__x86_64__))
# define SPS_PLAT_amd64_windows 1 # define SPS_PLAT_amd64_windows 1
# define SPS_ARCH_amd64 1 # define SPS_ARCH_amd64 1
# define SPS_OS_windows 1 # define SPS_OS_windows 1