8#ifndef INCLUDED_BSLS_PLATFORM
9#define INCLUDED_BSLS_PLATFORM
272struct bsls_Platform_Assert;
286 #define BSLS_PLATFORM_COMPILER_ERROR \
287 char die[sizeof(::BloombergLP::bsls_Platform_Assert)]
289 #define BSLS_PLATFORM_COMPILER_ERROR char die[sizeof(bsls_Platform_Assert)]
309#if defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)
310 #define BSLS_PLATFORM_CMP_IBM 1
311 #define BSLS_PLATFORM_CMP_VERSION __xlC__
313#ifndef BDE_OMIT_INTERNAL_DEPRECATED
315 #define BSLS_PLATFORM_CMP_AIX 1
319 #define BSLS_PLATFORM_OS_UNIX 1
321 #define BSLS_PLATFORM_OS_AIX 1
322 #define BSLS_PLATFORM_OS_VER_MAJOR _AIX
323 #elif defined(__linux__)
324 #define BSLS_PLATFORM_OS_LINUX 1
326 #error "AIX compiler appears to be in use on non-AIX OS."
331 #if defined(_ARCH_PWR2)
332 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_PWR2
333 #elif defined(_ARCH_PWR)
334 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_PWR
335 #elif defined(_ARCH_POWER)
336 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_POWER
337 #elif defined(_POWER)
338 #define BSLS_PLATFORM_CPU_VER_MAJOR _POWER
339 #elif defined(_ARCH_COM)
340 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_COM
341 #elif defined(_ARCH_601)
342 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_601
343 #elif defined(_ARCH_PPC)
344 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_PPC
345 #elif defined(_ARCH_PPC64)
346 #define BSLS_PLATFORM_CPU_VER_MAJOR _ARCH_PPC64
348 #error "Unable to identify the AIX CPU."
352 #define BSLS_PLATFORM_CPU_POWERPC 1
353 #if defined (__64BIT__)
354 #define BSLS_PLATFORM_CPU_64_BIT 1
356 #define BSLS_PLATFORM_CPU_32_BIT 1
359#elif defined(_MSC_VER)
360 #define BSLS_PLATFORM_CMP_MSVC 1
361 #define BSLS_PLATFORM_CMP_VERSION _MSC_VER
367 #if defined(_WIN64) || defined(_WIN32)
368 #define BSLS_PLATFORM_OS_WINDOWS 1
369 #elif defined(_WIN16)
370 #error "16-bit Windows platform not supported."
373 #error "Microsoft OS is running on an unknown platform."
380 #if _WIN32_WINNT >= 0x0A00
381 #define BSLS_PLATFORM_OS_WIN10 1
382 #elif _WIN32_WINNT >= 0x0603
383 #define BSLS_PLATFORM_OS_WINBLUE 1
384 #elif _WIN32_WINNT >= 0x0602
385 #define BSLS_PLATFORM_OS_WIN8 1
386 #elif _WIN32_WINNT >= 0x0601
387 #define BSLS_PLATFORM_OS_WIN7 1
388 #elif _WIN32_WINNT >= 0x0600
389 #define BSLS_PLATFORM_OS_WINVISTA 1
390 #elif _WIN32_WINNT >= 0x0502
391 #define BSLS_PLATFORM_OS_WINS03 1
392 #elif _WIN32_WINNT >= 0x0501
393 #define BSLS_PLATFORM_OS_WINXP 1
394 #elif _WIN32_WINNT >= 0x0500
395 #define BSLS_PLATFORM_OS_WIN2K 1
396 #elif _WIN32_WINNT >= 0x0410
397 #define BSLS_PLATFORM_OS_WIN9X 1
398 #elif _WIN32_WINNT >= 0x0400
399 #define BSLS_PLATFORM_OS_WINNT 1
400 #elif defined(WINVER) && WINVER >= 0x0400 \
401 || defined(_WIN32_WINDOWS) && _WIN32_WINDOWS >= 0x401
402 #define BSLS_PLATFORM_OS_WIN9X 1
404 #define BSLS_PLATFORM_OS_WINVISTA 1
408 #if defined(BSLS_PLATFORM_OS_WINVISTA) && !defined(BSLS_PLATFORM_OS_WINS08)
409 #define BSLS_PLATFORM_OS_WINS08 1
412 #if !defined(BSLS_PLATFORM_OS_WINVISTA) && defined(BSLS_PLATFORM_OS_WINS08)
413 #define BSLS_PLATFORM_OS_WINVISTA 1
418 #if defined(_WIN32_WINNT)
419 #define BSLS_PLATFORM_OS_VER_MAJOR _WIN32_WINNT / 0x100
420 #define BSLS_PLATFORM_OS_VER_MINOR _WIN32_WINNT % 0x100
421 #elif defined(WINVER)
422 #define BSLS_PLATFORM_OS_VER_MAJOR WINVER / 0x100
423 #define BSLS_PLATFORM_OS_VER_MINOR WINVER % 0x100
424 #elif defined(_WIN32_WINDOWS)
425 #define BSLS_PLATFORM_OS_VER_MAJOR _WIN32_WINDOWS / 0x100
426 #define BSLS_PLATFORM_OS_VER_MINOR _WIN32_WINDOWS % 0x100
428 #define BSLS_PLATFORM_OS_VER_MAJOR 4
429 #define BSLS_PLATFORM_OS_VER_MINOR 0
434 #if defined(_M_ALPHA)
435 #define BSLS_PLATFORM_CPU_ALPHA 1
436 #elif defined(_M_IX86)
437 #define BSLS_PLATFORM_CPU_X86 1
438 #define BSLS_PLATFORM_CPU_32_BIT 1
439 #define BSLS_PLATFORM_CPU_VER_MAJOR _M_IX86
440 #elif defined(_M_IA64)
442 #define BSLS_PLATFORM_CPU_IA64 1
443 #define BSLS_PLATFORM_CPU_64_BIT 1
445 #define BSLS_PLATFORM_CPU_X86 1
446 #define BSLS_PLATFORM_CPU_32_BIT 1
448 #define BSLS_PLATFORM_CPU_VER_MAJOR _M_IA64
449 #elif defined(_M_AMD64)
451 #define BSLS_PLATFORM_CPU_X86_64 1
452 #define BSLS_PLATFORM_CPU_64_BIT 1
454 #define BSLS_PLATFORM_CPU_X86 1
455 #define BSLS_PLATFORM_CPU_32_BIT 1
457 #define BSLS_PLATFORM_CPU_VER_MAJOR _M_AMD64
458 #elif defined(_M_PPC)
459 #define BSLS_PLATFORM_CPU_POWERPC 1
460 #define BSLS_PLATFORM_CPU_VER_MAJOR _M_PPC
461 #elif defined(_M_MRX000)
462 #define BSLS_PLATFORM_CPU_MIPS 1
463 #define BSLS_PLATFORM_CPU_VER_MAJOR _M_MRX000
464 #elif defined(_M_ARM)
465 #define BSLS_PLATFORM_CPU_ARM 1
466 #define BSLS_PLATFORM_CPU_32_BIT 1
470 #define BSLS_PLATFORM_CPU_ARM_V7 1
471 #elif defined(_M_ARM64)
472 #define BSLS_PLATFORM_CPU_ARM 1
473 #define BSLS_PLATFORM_CPU_64_BIT 1
477 #define BSLS_PLATFORM_CPU_ARM_V7 1
479 #error "Unable to identify CPU on which the MSVC compiler is running."
484#elif defined(__clang__) || defined(__GNUC__) || defined(__EDG__)
486 #if defined(__clang__)
505 #define BSLS_PLATFORM_CMP_CLANG 1
506 #define BSLS_PLATFORM_CMP_VERSION ( __clang_major__ * 10000 \
507 + __clang_minor__ * 100 \
508 + __clang_patchlevel__ )
509 #elif defined (__GNUC__)
510 #define BSLS_PLATFORM_CMP_GNU 1
511 #if defined(__GNUC_PATCHLEVEL__)
512 #define BSLS_PLATFORM_CMP_VERSION (__GNUC__ * 10000 \
513 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
515 #define BSLS_PLATFORM_CMP_VERSION (__GNUC__ * 10000 \
516 + __GNUC_MINOR__ * 100)
519 #define BSLS_PLATFORM_CMP_EDG 1
520 #define BSLS_PLATFORM_CMP_VERSION __EDG_VERSION__
525 #define BSLS_PLATFORM_OS_AIX 1
526 #elif defined(__CYGWIN__) || defined(cygwin) || defined(__cygwin)
527 #define BSLS_PLATFORM_OS_CYGWIN 1
528 #elif defined(linux) || defined(__linux)
529 #define BSLS_PLATFORM_OS_LINUX 1
530 #elif defined(__FreeBSD__)
531 #define BSLS_PLATFORM_OS_FREEBSD 1
532 #elif defined(sun) || defined(__sun)
533 #if defined(__SVR4) || defined(__svr4__)
534 #define BSLS_PLATFORM_OS_SOLARIS 1
536 #define BSLS_PLATFORM_OS_SUNOS 1
538 #elif defined(_WIN32) || defined(__WIN32__) && \
539 !(defined(cygwin) || defined(__cygwin))
540 #define BSLS_PLATFORM_OS_WINDOWS 1
541 #elif defined(__APPLE__)
542 #define BSLS_PLATFORM_OS_DARWIN 1
544 #if defined(__GNUC__)
545 #error "Unable to determine on which OS the compiler is running."
547 #error "Unable to determine on which OS EDG compiler is running."
552 #if !defined(BSLS_PLATFORM_OS_WINDOWS)
553 #define BSLS_PLATFORM_OS_UNIX 1
557 #if defined(__alpha__)
558 #define BSLS_PLATFORM_CPU_ALPHA 1
559 #elif defined(__x86_64) || defined(__x86_64__)
560 #define BSLS_PLATFORM_CPU_X86_64 1
561 #define BSLS_PLATFORM_CPU_64_BIT 1
562 #elif defined(__i386) || defined(__i386__) \
563 || defined(__ix86) || defined(__ix86__)
564 #define BSLS_PLATFORM_CPU_X86 1
565 #define BSLS_PLATFORM_CPU_32_BIT 1
566 #elif defined(__ia64) || defined(__ia64__) || defined(_IA64) \
568 #define BSLS_PLATFORM_CPU_IA64 1
569 #if defined(_LP64) || defined(__LP64__)
570 #define BSLS_PLATFORM_CPU_64_BIT 1
572 #define BSLS_PLATFORM_CPU_32_BIT 1
574 #elif defined(__mips__)
575 #define BSLS_PLATFORM_CPU_MIPS 1
576 #elif defined(__hppa__) || defined(__hppa)
577 #define BSLS_PLATFORM_CPU_HPPA 1
578 #elif defined(__powerpc) || defined(__powerpc__) \
579 || defined(__POWERPC__) || defined(__ppc__) || defined(_POWER)
580 #define BSLS_PLATFORM_CPU_POWERPC 1
581 #if defined(__64BIT__) || defined(_LP64) || defined(__LP64__)
582 #define BSLS_PLATFORM_CPU_64_BIT 1
584 #define BSLS_PLATFORM_CPU_32_BIT 1
586 #elif defined(__sparc__) || defined(__sparc_v9__) || defined(__sparcv9)
587 #define BSLS_PLATFORM_CPU_SPARC 1
588 #if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__)
589 #define BSLS_PLATFORM_CPU_SPARC_V9 1
590 #define BSLS_PLATFORM_CPU_64_BIT 1
592 #define BSLS_PLATFORM_CPU_SPARC_32 1
594 #elif defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
595 #define BSLS_PLATFORM_CPU_ARM 1
596 #if defined(__arm64__) || defined(__aarch64__)
597 #define BSLS_PLATFORM_CPU_64_BIT 1
599 #if defined(__ARM_ARCH)
601 #define BSLS_PLATFORM_CPU_ARM_V6 1
602 #elif __ARM_ARCH == 7
603 #define BSLS_PLATFORM_CPU_ARM_V7 1
604 #elif __ARM_ARCH == 8
605 #define BSLS_PLATFORM_CPU_ARM_V8 1
607 #elif defined(__ARM_ARCH_5T__) \
608 || defined(__ARM_ARCH_5TE__) \
609 || defined(__ARM_ARCH_5TEJ__)
610 #define BSLS_PLATFORM_CPU_ARM_V5
611 #elif defined(__ARM_ARCH_6__) || defined (__ARM_ARCH_6ZK__)
612 #define BSLS_PLATFORM_CPU_ARM_V6
613 #elif defined(__ARM_ARCH_7__) \
614 || defined(__ARM_ARCH_7A__) \
615 || defined(__ARM_ARCH_7M__) \
616 || defined(__ARM_ARCH_7R__)
617 #define BSLS_PLATFORM_CPU_ARM_V7
618 #elif defined(__ARM64_ARCH_8__) \
619 || defined(__ARM_ARCH_8_3__) \
620 || defined(__ARM_ARCH_8_4__) \
621 || defined(__ARM_ARCH_8_5__)
622 #define BSLS_PLATFORM_CPU_ARM_V8
624 #error "Unsupported ARM platform."
627 #if defined(__GNUC__)
628 #error "Unable to determine on which CPU the compiler is running."
630 #error "Unable to determine on which CPU EDG compiler is running."
635 #if !defined(BSLS_PLATFORM_CPU_64_BIT)
636 #define BSLS_PLATFORM_CPU_32_BIT 1
639#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
641 #define BSLS_PLATFORM_CMP_SUN 1
642 #if defined(__cplusplus)
643 #define BSLS_PLATFORM_CMP_VERSION __SUNPRO_CC
645 #define BSLS_PLATFORM_CMP_VERSION __SUNPRO_C
649 #define BSLS_PLATFORM_OS_UNIX 1
650 #if defined(sun) || defined(__sun)
651 #define BSLS_PLATFORM_OS_SOLARIS 1
652 #if defined(__SVR4) || defined(__svr4__)
653 #if defined(__SunOS_5_7)
654 #define BSLS_PLATFORM_OS_VER_MAJOR 7
655 #define BSLS_PLATFORM_OS_VER_MINOR 0
656 #elif defined(__SunOS_5_8)
657 #define BSLS_PLATFORM_OS_VER_MAJOR 8
658 #define BSLS_PLATFORM_OS_VER_MINOR 0
659 #elif defined(__SunOS_5_9)
660 #define BSLS_PLATFORM_OS_VER_MAJOR 9
661 #define BSLS_PLATFORM_OS_VER_MINOR 0
662 #elif defined(__SunOS_5_10)
663 #define BSLS_PLATFORM_OS_VER_MAJOR 10
664 #define BSLS_PLATFORM_OS_VER_MINOR 0
665 #elif defined(__SunOS_5_11)
666 #define BSLS_PLATFORM_OS_VER_MAJOR 11
667 #define BSLS_PLATFORM_OS_VER_MINOR 0
669 #define BSLS_PLATFORM_OS_VER_MAJOR 1
670 #define BSLS_PLATFORM_OS_VER_MINOR 0
673 #error "Unable to determine SUN OS version."
676 #elif defined(__SVR4) || defined(__svr4__)
677 #define BSLS_PLATFORM_OS_SUNOS 1
678 #if defined(__SunOS_5_7)
679 #define BSLS_PLATFORM_OS_VER_MAJOR 7
680 #define BSLS_PLATFORM_OS_VER_MINOR 0
681 #elif defined(__SunOS_5_8)
682 #define BSLS_PLATFORM_OS_VER_MAJOR 8
683 #define BSLS_PLATFORM_OS_VER_MINOR 0
684 #elif defined(__SunOS_5_9)
685 #define BSLS_PLATFORM_OS_VER_MAJOR 9
686 #define BSLS_PLATFORM_OS_VER_MINOR 0
688 #define BSLS_PLATFORM_OS_VER_MAJOR 1
691 #error "Unable to determine SUN OS version."
696 #if defined(__x86_64) || defined(__x86_64__)
697 #define BSLS_PLATFORM_CPU_X86_64 1
698 #define BSLS_PLATFORM_CPU_64_BIT 1
699 #elif defined(i386) || defined(__i386)
700 #define BSLS_PLATFORM_CPU_X86 1
701 #define BSLS_PLATFORM_CPU_32_BIT 1
702 #elif defined(__sparc64) || defined(__sparcv9)
703 #define BSLS_PLATFORM_CPU_SPARC 1
704 #define BSLS_PLATFORM_CPU_SPARC_V9 1
705 #define BSLS_PLATFORM_CPU_64_BIT 1
706 #elif defined(sparc) || defined(__sparc)
707 #define BSLS_PLATFORM_CPU_SPARC 1
708 #define BSLS_PLATFORM_CPU_SPARC_32 1
709 #define BSLS_PLATFORM_CPU_32_BIT 1
711 #error "Cannot determine CPU on which the SUN compiler is running."
716 #error "Could not identify the compiler."
724#if defined(BSLS_PLATFORM_OS_LINUX) || defined(BSLS_PLATFORM_OS_CYGWIN) \
725 || defined(__GLIBC__)
728 #if (__BYTE_ORDER == __LITTLE_ENDIAN)
729 #define BSLS_PLATFORM_IS_LITTLE_ENDIAN 1
730 #elif (__BYTE_ORDER == __BIG_ENDIAN)
731 #define BSLS_PLATFORM_IS_BIG_ENDIAN 1
735#elif defined(BSLS_PLATFORM_OS_AIX)
736 #include <sys/machine.h>
737 #if BYTE_ORDER == LITTLE_ENDIAN
738 #define BSLS_PLATFORM_IS_LITTLE_ENDIAN 1
739 #elif BYTE_ORDER == BIG_ENDIAN
740 #define BSLS_PLATFORM_IS_BIG_ENDIAN 1
744#elif defined(BSLS_PLATFORM_OS_SUNOS) || defined(BSLS_PLATFORM_OS_SOLARIS)
745 #include <sys/isa_defs.h>
746 #if defined(_LITTLE_ENDIAN)
747 #define BSLS_PLATFORM_IS_LITTLE_ENDIAN 1
748 #elif defined(_BIG_ENDIAN)
749 #define BSLS_PLATFORM_IS_BIG_ENDIAN 1
753#elif defined(BSLS_PLATFORM_OS_DARWIN)
754 #include <machine/endian.h>
755 #if BYTE_ORDER == LITTLE_ENDIAN
756 #define BSLS_PLATFORM_IS_LITTLE_ENDIAN 1
757 #elif BYTE_ORDER == BIG_ENDIAN
758 #define BSLS_PLATFORM_IS_BIG_ENDIAN 1
762#elif defined(BSLS_PLATFORM_OS_WINDOWS)
763 #define BSLS_PLATFORM_IS_LITTLE_ENDIAN 1
772#if !defined(BDE_DISABLE_COMPILER_VERSION_CHECK)
774#if defined(BSLS_PLATFORM_CMP_CLANG)
776#elif defined(BSLS_PLATFORM_CMP_EDG)
778#elif defined(BSLS_PLATFORM_CMP_HP)
779 #if BSLS_PLATFORM_CMP_VERSION < 62500
780 #error This early compiler is not supported by BDE
782#elif defined(BSLS_PLATFORM_CMP_IBM)
784 #if BSLS_PLATFORM_CMP_VERSION < 0x0c01
785 #error This early compiler is not supported by BDE
787#elif defined(BSLS_PLATFORM_CMP_SUN)
788 #if BSLS_PLATFORM_CMP_VERSION < 0x5120
789 #error This early compiler is not supported by BDE
791#elif defined(BSLS_PLATFORM_CMP_GNU)
793 #if BSLS_PLATFORM_CMP_VERSION < 40102
794 #error This early compiler is not supported by BDE
796#elif defined(BSLS_PLATFORM_CMP_MSVC)
799 #if BSLS_PLATFORM_CMP_VERSION < 1800
800 #error This early compiler is not supported by BDE
803 #error This compiler is not recognized by BDE
808#ifdef BSLS_PLATFORM_CMP_VERSION
810#define BSLS_PLATFORM_CMP_VER_MAJOR BSLS_PLATFORM_CMP_VERSION
816#if defined(BSLS_PLATFORM_CMP_GNU) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
817 #define BSLS_PLATFORM_NO_64_BIT_LITERALS 1
820#if defined(BSLS_PLATFORM_CMP_IBM) && !defined(BSLS_PLATFORM_CPU_64_BIT)
821 #define BSLS_PLATFORM_NO_64_BIT_LITERALS 1
824#if (defined(BSLS_PLATFORM_CMP_GNU) && BSLS_PLATFORM_CMP_VER_MAJOR >= 40600) \
825 || defined(BSLS_PLATFORM_CMP_CLANG)
826 #define BSLS_PLATFORM_HAS_PRAGMA_GCC_DIAGNOSTIC 1
827 #if defined(BSLS_PLATFORM_CMP_CLANG)
828 #define BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_CLANG 1
830 #define BSLS_PLATFORM_PRAGMA_GCC_DIAGNOSTIC_GCC 1
834#if !(defined(BSLS_PLATFORM_CMP_AIX) || defined(BSLS_PLATFORM_CMP_SUN)) \
835 || defined(BDE_BUILD_TARGET_AGGRESSIVE_INLINE)
836 #define BSLS_PLATFORM_AGGRESSIVE_INLINE inline
838 #define BSLS_PLATFORM_AGGRESSIVE_INLINE
841#if defined(BSLS_PLATFORM_CMP_GNU) && BSLS_PLATFORM_CMP_VERSION >= 40406 || \
842 defined(BSLS_PLATFORM_CMP_CLANG) || defined(BSLS_PLATFORM_CMP_MSVC)
848 #define BSLS_PLATFORM_HAS_MACRO_PUSH_POP 1
870 #if !defined(BSLS_PLATFORM_CPU_ARM)
871 #define BSLS_PLATFORM_CPU_SSE 1
872 #define BSLS_PLATFORM_CPU_SSE2 1
873 #define BSLS_PLATFORM_CPU_SSE3 1
875#elif defined(__clang__) || defined(__GNUC__) || defined(__EDG__)
877 #define BSLS_PLATFORM_CPU_SSE 1
879 #if defined(__SSE2__)
880 #define BSLS_PLATFORM_CPU_SSE2 1
882 #if defined(__SSE3__)
883 #define BSLS_PLATFORM_CPU_SSE3 1
885 #if defined(__SSE4_1__)
886 #define BSLS_PLATFORM_CPU_SSE4_1 1
888 #if defined(__SSE4_2__)
889 #define BSLS_PLATFORM_CPU_SSE4_2 1
898#if defined(BSLS_PLATFORM_OS_UNIX) && !defined(BSLS_PLATFORM_OS_AIX) && \
899 !defined(BSLS_PLATFORM_OS_DARWIN)
900 #if !defined(unix) && !defined(__unix__) && !defined(__unix)
901 #error "Unix platform assumed, but unix flag not set by compiler"
907#if BSLS_PLATFORM_CMP_EDG \
908 + BSLS_PLATFORM_CMP_CLANG \
909 + BSLS_PLATFORM_CMP_GNU \
910 + BSLS_PLATFORM_CMP_HP \
911 + BSLS_PLATFORM_CMP_IBM \
912 + BSLS_PLATFORM_CMP_MSVC \
913 + BSLS_PLATFORM_CMP_SUN != 1
914 #error "Exactly one compiler must be set."
919#if BSLS_PLATFORM_OS_UNIX \
920 + BSLS_PLATFORM_OS_WINDOWS != 1
921 #error "Exactly one operating system must be set."
926#define BSLS_PLATFORM_OS_SUBTYPE_COUNT \
927 BSLS_PLATFORM_OS_AIX \
928 + BSLS_PLATFORM_OS_DARWIN \
929 + BSLS_PLATFORM_OS_LINUX \
930 + BSLS_PLATFORM_OS_FREEBSD \
931 + BSLS_PLATFORM_OS_SOLARIS \
932 + BSLS_PLATFORM_OS_SUNOS \
933 + BSLS_PLATFORM_OS_CYGWIN \
934 + BSLS_PLATFORM_OS_WIN9X \
935 + BSLS_PLATFORM_OS_WINNT \
936 + BSLS_PLATFORM_OS_WIN2K \
937 + BSLS_PLATFORM_OS_WINXP \
938 + BSLS_PLATFORM_OS_WINS03 \
939 + BSLS_PLATFORM_OS_WINVISTA \
940 + BSLS_PLATFORM_OS_WIN7 \
941 + BSLS_PLATFORM_OS_WIN8 \
942 + BSLS_PLATFORM_OS_WINBLUE \
943 + BSLS_PLATFORM_OS_WIN10
944#if BSLS_PLATFORM_OS_SUBTYPE_COUNT > 1
945 #error "At most one operating system subtype must be set."
950#if defined(BSLS_PLATFORM_OS_WINVISTA) != defined(BSLS_PLATFORM_OS_WINS08)
951 #error "Windows Vista and Server 2008 are the same API."
956#if BSLS_PLATFORM_CPU_88000 \
957 + BSLS_PLATFORM_CPU_ALPHA \
958 + BSLS_PLATFORM_CPU_HPPA \
959 + BSLS_PLATFORM_CPU_IA64 \
960 + BSLS_PLATFORM_CPU_X86 \
961 + BSLS_PLATFORM_CPU_X86_64 \
962 + BSLS_PLATFORM_CPU_MIPS \
963 + BSLS_PLATFORM_CPU_POWERPC \
964 + BSLS_PLATFORM_CPU_SPARC \
965 + BSLS_PLATFORM_CPU_ARM != 1
966 #error "Exactly one processor must be set."
971#if BSLS_PLATFORM_IS_BIG_ENDIAN \
972 + BSLS_PLATFORM_IS_LITTLE_ENDIAN != 1
973 #error "Exactly one kind of endian-ness must be set."
977#if defined(BSLS_PLATFORM_OS_VER_MAJOR) && BSLS_PLATFORM_OS_SUBTYPE_COUNT != 1
979 #error "Operating system major version but not subtype defined."
983#undef BSLS_PLATFORM_OS_SUBTYPE_COUNT
985#if defined(BSLS_PLATFORM_OS_VER_MINOR) && !defined(BSLS_PLATFORM_OS_VER_MAJOR)
986 #error "Operating System minor but not major version defined."
1007 struct OsUnix : OsAny {};
1008 struct OsWindows : OsAny {};
1010 struct OsAix : OsUnix {};
1011 struct OsHpux : OsUnix {};
1012 struct OsLinux : OsUnix {};
1013 struct OsFreeBsd : OsUnix {};
1014 struct OsSolaris : OsUnix {};
1015 struct OsCygwin : OsUnix {};
1016 struct OsDarwin : OsUnix {};
1018 struct OsSolaris_V8 : OsSolaris {};
1019 struct OsSolaris_V9 : OsSolaris {};
1020 struct OsSolaris_V10 : OsSolaris {};
1022 struct OsAix_V5 : OsAix {};
1024 struct OsWinNT : OsWindows {};
1030 struct Cpu88000 : CpuAny {};
1031 struct CpuAlpha : CpuAny {};
1032 struct CpuHppa : CpuAny {};
1033 struct CpuX86 : CpuAny {};
1034 struct CpuIa64 : CpuAny {};
1035 struct CpuX86_64 : CpuAny {};
1036 struct CpuMips : CpuAny {};
1038 struct CpuPowerpc : CpuAny {};
1040 struct CpuSparc : CpuAny {};
1041 struct CpuSparc_32 : CpuSparc {};
1042 struct CpuSparc_V9 : CpuSparc {};
1044 typedef CpuPowerpc CPU_POWERPC;
1045 typedef CpuSparc CPU_SPARC;
1046 typedef CpuSparc_32 CPU_SPARC_32;
1047 typedef CpuSparc_V9 CPU_SPARC_V9;
1049 struct CpuPowerpc_601 : CpuPowerpc {};
1050 struct CpuArch_Pwr : CpuPowerpc {};
1051 struct CpuArch_Pwr2 : CpuPowerpc {};
1052 struct CpuArch_Pwr2s : CpuPowerpc {};
1054 struct CpuArm : CpuAny {};
1055 struct CpuArmv5 : CpuArm {};
1056 struct CpuArmv6 : CpuArm {};
1057 struct CpuArmv7 : CpuArm {};
1058 struct CpuArmv8 : CpuArm {};
1065 #if defined(BSLS_PLATFORM_OS_AIX)
1066 #if (BSLS_PLATFORM_OS_VER_MAJOR == _AIX)
1067 typedef OsAix_V5 Os;
1072 #if defined BSLS_PLATFORM_OS_SOLARIS
1073 #if (BSLS_PLATFORM_OS_VER_MAJOR == 9)
1074 typedef OsSolaris_V9 Os;
1075 #elif (BSLS_PLATFORM_OS_VER_MAJOR == 10)
1076 typedef OsSolaris_V10 Os;
1078 typedef OsSolaris_V8 Os;
1081 #if defined(BSLS_PLATFORM_OS_CYGWIN)
1082 typedef OsCygwin Os;
1084 #if defined(BSLS_PLATFORM_OS_LINUX)
1087 #if defined(BSLS_PLATFORM_OS_FREEBSD)
1088 typedef OsFreeBsd Os;
1090 #if defined(BSLS_PLATFORM_OS_WINDOWS)
1093 #if defined(BSLS_PLATFORM_OS_DARWIN)
1094 typedef OsDarwin Os;
1100 #if defined(BSLS_PLATFORM_CPU_X86)
1103 #if defined(BSLS_PLATFORM_CPU_IA64)
1104 typedef CpuIa64 Cpu;
1106 #if defined(BSLS_PLATFORM_CPU_X86_64)
1107 typedef CpuX86_64 Cpu;
1109 #if defined(BSLS_PLATFORM_CPU_POWERPC)
1110 #if defined(BSLS_PLATFORM_CPU_VER_MAJOR) && \
1111 (BSLS_PLATFORM_CPU_VER_MAJOR == _ARCH_601)
1112 typedef CpuPowerpc_601 Cpu;
1114 typedef CpuPowerpc Cpu;
1117 #if defined(BSLS_PLATFORM_CPU_SPARC_32)
1118 typedef CpuSparc_32 Cpu;
1120 #if defined(BSLS_PLATFORM_CPU_SPARC_V9)
1121 typedef CpuSparc_V9 Cpu;
1123 #if defined(BSLS_PLATFORM_CPU_ARM_V5)
1124 typedef CpuArmv5 Cpu;
1126 #if defined(BSLS_PLATFORM_CPU_ARM_V6)
1127 typedef CpuArmv6 Cpu;
1129 #if defined(BSLS_PLATFORM_CPU_ARM_V7)
1130 typedef CpuArmv7 Cpu;
1132 #if defined(BSLS_PLATFORM_CPU_ARM_V8)
1133 typedef CpuArmv8 Cpu;
1140#ifndef BDE_OPENSOURCE_PUBLICATION
1141#ifndef BDE_OMIT_INTERNAL_DEPRECATED
1149typedef bsls::Platform bdes_Platform;
1156typedef bsls::Platform bsls_Platform;
1165#if !defined(BSL_DOUBLE_UNDERSCORE_XLAT) || 1 == BSL_DOUBLE_UNDERSCORE_XLAT
1169#ifdef BSLS_PLATFORM_CMP_AIX
1170# define BDES_PLATFORM__CMP_AIX BSLS_PLATFORM_CMP_AIX
1172#ifdef BSLS_PLATFORM_CMP_GNU
1173# define BDES_PLATFORM__CMP_GNU BSLS_PLATFORM_CMP_GNU
1175#ifdef BSLS_PLATFORM_CMP_HP
1176# define BDES_PLATFORM__CMP_HP BSLS_PLATFORM_CMP_HP
1178#ifdef BSLS_PLATFORM_CMP_MSVC
1179# define BDES_PLATFORM__CMP_MSVC BSLS_PLATFORM_CMP_MSVC
1181#ifdef BSLS_PLATFORM_CMP_SUN
1182# define BDES_PLATFORM__CMP_SUN BSLS_PLATFORM_CMP_SUN
1184#ifdef BSLS_PLATFORM_CMP_VER_MAJOR
1185# define BDES_PLATFORM__CMP_VER_MAJOR BSLS_PLATFORM_CMP_VER_MAJOR
1187#ifdef BSLS_PLATFORM_CPU_64_BIT
1188# define BDES_PLATFORM__CPU_64_BIT BSLS_PLATFORM_CPU_64_BIT
1190#ifdef BSLS_PLATFORM_OS_AIX
1191# define BDES_PLATFORM__OS_AIX BSLS_PLATFORM_OS_AIX
1193#ifdef BSLS_PLATFORM_OS_CYGWIN
1194# define BDES_PLATFORM__OS_CYGWIN BSLS_PLATFORM_OS_CYGWIN
1196#ifdef BSLS_PLATFORM_OS_DARWIN
1197# define BDES_PLATFORM__OS_DARWIN BSLS_PLATFORM_OS_DARWIN
1199#ifdef BSLS_PLATFORM_OS_FREEBSD
1200# define BDES_PLATFORM__OS_FREEBSD BSLS_PLATFORM_OS_FREEBSD
1202#ifdef BSLS_PLATFORM_OS_LINUX
1203# define BDES_PLATFORM__OS_LINUX BSLS_PLATFORM_OS_LINUX
1205#ifdef BSLS_PLATFORM_OS_SOLARIS
1206# define BDES_PLATFORM__OS_SOLARIS BSLS_PLATFORM_OS_SOLARIS
1208#ifdef BSLS_PLATFORM_OS_SUNOS
1209# define BDES_PLATFORM__OS_SUNOS BSLS_PLATFORM_OS_SUNOS
1211#ifdef BSLS_PLATFORM_OS_UNIX
1212# define BDES_PLATFORM__OS_UNIX BSLS_PLATFORM_OS_UNIX
1214#ifdef BSLS_PLATFORM_OS_VER_MAJOR
1215# define BDES_PLATFORM__OS_VER_MAJOR BSLS_PLATFORM_OS_VER_MAJOR
1217#ifdef BSLS_PLATFORM_OS_VER_MINOR
1218# define BDES_PLATFORM__OS_VER_MINOR BSLS_PLATFORM_OS_VER_MINOR
1220#ifdef BSLS_PLATFORM_OS_WIN2K
1221# define BDES_PLATFORM__OS_WIN2K BSLS_PLATFORM_OS_WIN2K
1223#ifdef BSLS_PLATFORM_OS_WIN9X
1224# define BDES_PLATFORM__OS_WIN9X BSLS_PLATFORM_OS_WIN9X
1226#ifdef BSLS_PLATFORM_OS_WINDOWS
1227# define BDES_PLATFORM__OS_WINDOWS BSLS_PLATFORM_OS_WINDOWS
1229#ifdef BSLS_PLATFORM_OS_WINNT
1230# define BDES_PLATFORM__OS_WINNT BSLS_PLATFORM_OS_WINNT
1232#ifdef BSLS_PLATFORM_OS_WINXP
1233# define BDES_PLATFORM__OS_WINXP BSLS_PLATFORM_OS_WINXP
1238#ifdef BSLS_PLATFORM_CMP_AIX
1239# define BSLS_PLATFORM__CMP_AIX BSLS_PLATFORM_CMP_AIX
1241#ifdef BSLS_PLATFORM_CMP_CLANG
1242# define BSLS_PLATFORM__CMP_CLANG BSLS_PLATFORM_CMP_CLANG
1244#ifdef BSLS_PLATFORM_CMP_EDG
1245# define BSLS_PLATFORM__CMP_EDG BSLS_PLATFORM_CMP_EDG
1247#ifdef BSLS_PLATFORM_CMP_GNU
1248# define BSLS_PLATFORM__CMP_GNU BSLS_PLATFORM_CMP_GNU
1250#ifdef BSLS_PLATFORM_CMP_HP
1251# define BSLS_PLATFORM__CMP_HP BSLS_PLATFORM_CMP_HP
1253#ifdef BSLS_PLATFORM_CMP_IBM
1254# define BSLS_PLATFORM__CMP_IBM BSLS_PLATFORM_CMP_IBM
1256#ifdef BSLS_PLATFORM_CMP_MSVC
1257# define BSLS_PLATFORM__CMP_MSVC BSLS_PLATFORM_CMP_MSVC
1259#ifdef BSLS_PLATFORM_CMP_SUN
1260# define BSLS_PLATFORM__CMP_SUN BSLS_PLATFORM_CMP_SUN
1262#ifdef BSLS_PLATFORM_CMP_VERSION
1263# define BSLS_PLATFORM__CMP_VERSION BSLS_PLATFORM_CMP_VERSION
1265#ifdef BSLS_PLATFORM_CMP_VER_MAJOR
1266# define BSLS_PLATFORM__CMP_VER_MAJOR BSLS_PLATFORM_CMP_VER_MAJOR
1268#ifdef BSLS_PLATFORM_CPU_32_BIT
1269# define BSLS_PLATFORM__CPU_32_BIT BSLS_PLATFORM_CPU_32_BIT
1271#ifdef BSLS_PLATFORM_CPU_64_BIT
1272# define BSLS_PLATFORM__CPU_64_BIT BSLS_PLATFORM_CPU_64_BIT
1274#ifdef BSLS_PLATFORM_CPU_POWERPC
1275# define BSLS_PLATFORM__CPU_POWERPC BSLS_PLATFORM_CPU_POWERPC
1277#ifdef BSLS_PLATFORM_CPU_X86
1278# define BSLS_PLATFORM__CPU_X86 BSLS_PLATFORM_CPU_X86
1280#ifdef BSLS_PLATFORM_CPU_X86_64
1281# define BSLS_PLATFORM__CPU_X86_64 BSLS_PLATFORM_CPU_X86_64
1283#ifdef BSLS_PLATFORM_IS_BIG_ENDIAN
1284# define BSLS_PLATFORM__IS_BIG_ENDIAN BSLS_PLATFORM_IS_BIG_ENDIAN
1286#ifdef BSLS_PLATFORM_IS_LITTLE_ENDIAN
1287# define BSLS_PLATFORM__IS_LITTLE_ENDIAN BSLS_PLATFORM_IS_LITTLE_ENDIAN
1289#ifdef BSLS_PLATFORM_OS_AIX
1290# define BSLS_PLATFORM__OS_AIX BSLS_PLATFORM_OS_AIX
1292#ifdef BSLS_PLATFORM_OS_CYGWIN
1293# define BSLS_PLATFORM__OS_CYGWIN BSLS_PLATFORM_OS_CYGWIN
1295#ifdef BSLS_PLATFORM_OS_DARWIN
1296# define BSLS_PLATFORM__OS_DARWIN BSLS_PLATFORM_OS_DARWIN
1298#ifdef BSLS_PLATFORM_OS_LINUX
1299# define BSLS_PLATFORM__OS_LINUX BSLS_PLATFORM_OS_LINUX
1301#ifdef BSLS_PLATFORM_OS_SOLARIS
1302# define BSLS_PLATFORM__OS_SOLARIS BSLS_PLATFORM_OS_SOLARIS
1304#ifdef BSLS_PLATFORM_OS_SUNOS
1305# define BSLS_PLATFORM__OS_SUNOS BSLS_PLATFORM_OS_SUNOS
1307#ifdef BSLS_PLATFORM_OS_UNIX
1308# define BSLS_PLATFORM__OS_UNIX BSLS_PLATFORM_OS_UNIX
1310#ifdef BSLS_PLATFORM_OS_WINDOWS
1311# define BSLS_PLATFORM__OS_WINDOWS BSLS_PLATFORM_OS_WINDOWS
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691