From b10e3490ecb91d3f39ceb642839b518ebc9efee1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 2 Apr 2013 21:40:46 -0500 Subject: [PATCH] Completed all changes from review. --- doc/html/index.html | 6 +- doc/html/predef/adding_new_predefs.html | 33 +- doc/html/predef/introduction.html | 27 +- doc/html/predef/reference.html | 3 +- .../boost_arch_architecture_macros.html | 467 ++++--- .../reference/boost_comp_compiler_macros.html | 94 +- .../reference/boost_lib_library_macros.html | 2 +- .../boost_os_operating_system_macros.html | 1151 +---------------- .../reference/version_definition_macros.html | 7 +- doc/html/predef/using_the_predefs.html | 36 +- doc/predef.qbk | 113 +- include/boost/predef.h | 2 +- include/boost/predef/architecture.h | 2 - include/boost/predef/architecture/alpha.h | 4 +- include/boost/predef/architecture/amd64.h | 47 - include/boost/predef/architecture/ia64.h | 50 - include/boost/predef/architecture/x86.h | 66 +- include/boost/predef/architecture/x86/32.h | 87 ++ include/boost/predef/architecture/x86/64.h | 59 + include/boost/predef/compiler.h | 3 +- include/boost/predef/compiler/gcc_xml.h | 3 +- include/boost/predef/detail/endian_compat.h | 4 +- include/boost/predef/other.h | 15 + include/boost/predef/{ => other}/endian.h | 0 .../boost/predef/{compiler => other}/mingw.h | 28 +- 25 files changed, 639 insertions(+), 1670 deletions(-) delete mode 100644 include/boost/predef/architecture/amd64.h delete mode 100644 include/boost/predef/architecture/ia64.h create mode 100644 include/boost/predef/architecture/x86/32.h create mode 100644 include/boost/predef/architecture/x86/64.h create mode 100644 include/boost/predef/other.h rename include/boost/predef/{ => other}/endian.h (100%) rename include/boost/predef/{compiler => other}/mingw.h (64%) diff --git a/doc/html/index.html b/doc/html/index.html index 399902e..234c383 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -40,10 +40,12 @@
BOOST_COMP compiler macros
BOOST_LANG language standards macros
BOOST_LIB library macros
-
BOOST_OS_ operating system macros
+
BOOST_OS operating system macros
+
Other macros
Version definition macros
+
Acknoledgements
@@ -57,7 +59,7 @@
- +

Last revised: March 20, 2013 at 04:42:44 GMT

Last revised: April 03, 2013 at 02:20:25 GMT


diff --git a/doc/html/predef/adding_new_predefs.html b/doc/html/predef/adding_new_predefs.html index 1e678c3..31ca571 100644 --- a/doc/html/predef/adding_new_predefs.html +++ b/doc/html/predef/adding_new_predefs.html @@ -48,6 +48,13 @@
  • If possible, the predef will be defined as the version number detected.
  • +
  • + The predef must define *_AVAILABLE + macros. +
  • +
  • + The predef must define a symbolic constant string name macro. +
  • The predef must declare itself, after being defined, for the testing system.
  • @@ -127,14 +134,24 @@ Documentation about what is detected. that the predef was detected:

    #if (condition_a)
    -    #undef BOOST_category_tag
    -    #if (condition_b)
    -        #define BOOST_category_tag BOOST_VERSION_NUMBER(major,minor,patch)
    -    #else
    -        #define BOOST_category_tag BOOST_VERSION_NUMBER(0,0,1)
    -    #endif
    +#   undef BOOST_category_tag
    +#   if (condition_b)
    +#        define BOOST_category_tag BOOST_VERSION_NUMBER(major,minor,patch)
    +#    else
    +#        define BOOST_category_tag BOOST_VERSION_NUMBER(0,0,1)
    +#    endif
     #endif
     
    +

    + We also need to provide the *_AVAILABLE versions of the predef. And for + convenience we also want to provide a *_NAME macro: +

    +
    #if BOOST_category_tag
    +#   define BOOST_category_tag_AVAILABLE
    +#endif
    +
    +#define BOOST_catagory_tag_NAME "Name"
    +

    The testing of the predef macros is automated to generate checks for all the defined predefs, whether detected or not. To do this we need to declare the @@ -142,7 +159,7 @@ Documentation about what is detected. the test programs they expand out specially to create informational output:

    #include <boost/predef/detail/test.h>
    -BOOST_PREDEF_DECLARE_TEST(BOOST_category_tag,"Name")
    +BOOST_PREDEF_DECLARE_TEST(BOOST_category_tag,BOOST_category_tag_NAME)
     

    And, of course, we last need to close out the include guard: @@ -164,7 +181,7 @@ Documentation about what is detected. by compilers. For example the EDG compiler uses a simple 3-digit version macro (M,N,P). It can be decomesed and defined as:

    -
    #define BOOST_CXX_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__)
    +
    #define BOOST_CCOMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__)
     

    The decomposition macros are split into three types: decimal decomposition, diff --git a/doc/html/predef/introduction.html b/doc/html/predef/introduction.html index 9d0d64a..fbbea03 100644 --- a/doc/html/predef/introduction.html +++ b/doc/html/predef/introduction.html @@ -18,12 +18,12 @@ Introduction

    - This library defines a set of compiler, architecture, operating system, and - library version numbers from the information it can gather of C++ predefined - macros or those defined in generally available headers. The idea for this library - grew out of a proposal to extend the Boost Config library to provide more, - and consistent, information than the feature definitions it supports. What - follows is an edited version of that brief proposal. + This library defines a set of compiler, architecture, operating system, library, + and other version numbers from the information it can gather of C, C++, Objective + C, and Objective C++ predefined macros or those defined in generally available + headers. The idea for this library grew out of a proposal to extend the Boost + Config library to provide more, and consistent, information than the feature + definitions it supports. What follows is an edited version of that brief proposal.

    @@ -63,18 +63,27 @@

    The current Predef library is now, both an independent library, and expanded in scope. It includes detection and definition of architectures, compilers, - languages, libraries, and operating systems. The key benefits are: + languages, libraries, operating systems, and endianness. The key benefits are:

    • Version numbers that are always defined so that one doesn't have to guard with #ifdef.
    • +
    • + Guard macros that can be used for #ifdef + checks. +
    • All possible definitions are included with the single #include <boost/predef.h> so that it's friendly to precompiled header usage.
    • +
    • + Specific definitions can be included, ex. #include + <boost/predef/os/windows.h> + for single checks. +
    • Predefs can be directly used in both preprocessor and compiler expressions for comparison to other similarly defined values. @@ -155,7 +164,9 @@
    • Along with the above, it might be good to add some user control as to which - headers are included with the top-level header. + headers are included with the top-level header. Although in the current + form of the library this is less of an issue as one can include the specific + headers one needs.
    • Additionally, even if there is no auto-configure style option.. It would diff --git a/doc/html/predef/reference.html b/doc/html/predef/reference.html index 495ea06..8358df5 100644 --- a/doc/html/predef/reference.html +++ b/doc/html/predef/reference.html @@ -22,7 +22,8 @@
      BOOST_COMP compiler macros
      BOOST_LANG language standards macros
      BOOST_LIB library macros
      -
      BOOST_OS_ operating system macros
      +
      BOOST_OS operating system macros
      +
      Other macros
      Version definition macros
    diff --git a/doc/html/predef/reference/boost_arch_architecture_macros.html b/doc/html/predef/reference/boost_arch_architecture_macros.html index 177033e..5b36c61 100644 --- a/doc/html/predef/reference/boost_arch_architecture_macros.html +++ b/doc/html/predef/reference/boost_arch_architecture_macros.html @@ -19,9 +19,11 @@

    - BOOST_ARCH_ALPHA, DEC - Alpha + BOOST_ARCH_ALPHA
    +

    + DEC Alpha architecture. +

    @@ -116,91 +118,6 @@
    - BOOST_ARCH_AMD64, Advanced - Micro Devices AMD 64 architecture. -
    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __amd64__ -

    -
    -

    - detection -

    -
    -

    - __amd64 -

    -
    -

    - detection -

    -
    -

    - __x86_64__ -

    -
    -

    - detection -

    -
    -

    - __x86_64 -

    -
    -

    - detection -

    -
    -

    - _M_X64 -

    -
    -

    - detection -

    -
    -
    - BOOST_ARCH_ARM

    @@ -299,6 +216,81 @@

    + + BOOST_ARCH_BLACKFIN +
    +

    + Blackfin Processors from Analog Devices. +

    +
    ++++ + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + __bfin__ +

    +
    +

    + detection +

    +
    +

    + __BFIN__ +

    +
    +

    + detection +

    +
    +

    + bfin +

    +
    +

    + detection +

    +
    +

    + BFIN +

    +
    +

    + detection +

    +
    +
    BOOST_ARCH_CONVEX
    @@ -400,105 +392,6 @@
    - BOOST_ARCH_IA64 -
    -

    - Intel IA-64 architecture. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __ia64__ -

    -
    -

    - detection -

    -
    -

    - _IA64 -

    -
    -

    - detection -

    -
    -

    - __IA64__ -

    -
    -

    - detection -

    -
    -

    - __ia64 -

    -
    -

    - detection -

    -
    -

    - _M_IA64 -

    -
    -

    - detection -

    -
    -

    - __itanium__ -

    -
    -

    - detection -

    -
    -
    - BOOST_ARCH_M68K

    @@ -765,7 +658,7 @@

    - + BOOST_ARCH_MIPS

    @@ -949,7 +842,7 @@

    - + BOOST_ARCH_PARISK

    @@ -1109,7 +1002,7 @@

    - + BOOST_ARCH_PPC

    @@ -1316,7 +1209,7 @@

    - + BOOST_ARCH_PYRAMID

    @@ -1353,7 +1246,7 @@

    - + BOOST_ARCH_RS6000

    @@ -1440,7 +1333,7 @@

    - + BOOST_ARCH_SPARC

    @@ -1515,7 +1408,7 @@

    - + BOOST_ARCH_SH

    @@ -1627,7 +1520,7 @@

    - + BOOST_ARCH_SYS370

    @@ -1678,7 +1571,7 @@

    - + BOOST_ARCH_SYS390

    @@ -1729,9 +1622,56 @@

    - + BOOST_ARCH_X86
    +

    + Intel x86 architecture. + This is a category to indicate that either BOOST_ARCH_X86_32 + or BOOST_ARCH_X86_64 is detected. +

    +
    + + BOOST_ARCH_Z +
    +

    + z/Architecture + architecture. +

    +
    ++++ + + + + + + + + +
    +

    + Symbol +

    +
    +

    + Version +

    +
    +

    + __SYSC_ZARCH__ +

    +
    +

    + detection +

    +
    +
    + + BOOST_ARCH_X86_32 +

    Intel x86 architecture: If available versions [3-6] are specifically detected. @@ -1961,12 +1901,11 @@

    - - BOOST_ARCH_Z + + BOOST_ARCH_X86_64

    - z/Architecture - architecture. + Intel IA-64 architecture.

    @@ -1985,10 +1924,11 @@

    - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    - __SYSC_ZARCH__ + __x86_64

    @@ -1996,7 +1936,128 @@ detection

    +

    + __x86_64__ +

    +
    +

    + detection +

    +
    +

    + __ia64__ +

    +
    +

    + detection +

    +
    +

    + _IA64 +

    +
    +

    + detection +

    +
    +

    + __IA64__ +

    +
    +

    + detection +

    +
    +

    + __ia64 +

    +
    +

    + detection +

    +
    +

    + _M_IA64 +

    +
    +

    + detection +

    +
    +

    + __itanium__ +

    +
    +

    + detection +

    +
    +

    + __amd64__ +

    +
    +

    + detection +

    +
    +

    + __amd64 +

    +
    +

    + detection +

    +
    +

    + _M_X64 +

    +
    +

    + detection +

    +
    diff --git a/doc/html/predef/reference/boost_comp_compiler_macros.html b/doc/html/predef/reference/boost_comp_compiler_macros.html index eab3eac..0846d95 100644 --- a/doc/html/predef/reference/boost_comp_compiler_macros.html +++ b/doc/html/predef/reference/boost_comp_compiler_macros.html @@ -605,7 +605,7 @@ BOOST_COMP_GCCXML

    - GCC XML compiler. + GCC XML compiler.

    @@ -1279,84 +1279,6 @@
    - BOOST_COMP_MINGW -
    -

    - MinGW compiler. Version - number available as major, minor, and patch. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __MINGW32__ -

    -
    -

    - detection -

    -
    -

    - __MINGW64__ -

    -
    -

    - detection -

    -
    -

    - __MINGW64_VERSION_MAJOR, - __MINGW64_VERSION_MINOR -

    -
    -

    - V.R.0 -

    -
    -

    - __MINGW32_VERSION_MAJOR, - __MINGW32_VERSION_MINOR -

    -
    -

    - V.R.0 -

    -
    -
    - BOOST_COMP_MPW

    @@ -1432,7 +1354,7 @@

    - + BOOST_COMP_PALM

    @@ -1483,7 +1405,7 @@

    - + BOOST_COMP_PGI

    @@ -1535,7 +1457,7 @@

    - + BOOST_COMP_SGI

    @@ -1611,7 +1533,7 @@

    - + BOOST_COMP_SUNPRO

    @@ -1687,7 +1609,7 @@

    - + BOOST_COMP_TENDRA

    @@ -1725,7 +1647,7 @@

    - + BOOST_COMP_MSVC

    @@ -1789,7 +1711,7 @@

    - + BOOST_COMP_WATCOM

    diff --git a/doc/html/predef/reference/boost_lib_library_macros.html b/doc/html/predef/reference/boost_lib_library_macros.html index 9950d44..ee1b929 100644 --- a/doc/html/predef/reference/boost_lib_library_macros.html +++ b/doc/html/predef/reference/boost_lib_library_macros.html @@ -7,7 +7,7 @@ - +

    diff --git a/doc/html/predef/reference/boost_os_operating_system_macros.html b/doc/html/predef/reference/boost_os_operating_system_macros.html index a0f0beb..77fe926 100644 --- a/doc/html/predef/reference/boost_os_operating_system_macros.html +++ b/doc/html/predef/reference/boost_os_operating_system_macros.html @@ -1,21 +1,21 @@ -BOOST_OS_ operating system macros +BOOST_OS operating system macros - +
    -PrevUpHomeNext +PrevUpHomeNext
    - BOOST_OS_AIX -
    -

    - IBM AIX - operating system. Version number available as major, minor, and patch. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - _AIX -

    -
    -

    - detection -

    -
    -

    - __TOS_AIX__ -

    -
    -

    - detection -

    -
    -

    - _AIX43 -

    -
    -

    - 4.3.0 -

    -
    -

    - _AIX41 -

    -
    -

    - 4.1.0 -

    -
    -

    - _AIX32 -

    -
    -

    - 3.2.0 -

    -
    -

    - _AIX3 -

    -
    -

    - 3.0.0 -

    -
    -
    - - BOOST_OS_AMIGAOS -
    -

    - AmigaOS operating - system. -

    -
    ---- - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - AMIGA -

    -
    -

    - detection -

    -
    -

    - __amigaos__ -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_ANDROID -
    -

    - Android - operating system. -

    -
    ---- - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __ANDROID__ -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_BEOS -
    -

    - BeOS operating system. -

    -
    ---- - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __BEOS__ -

    -
    -

    - detection -

    -
    -
    - BOOST_OS_BSD_BSDI

    @@ -1416,7 +1189,7 @@

    - + BOOST_OS_BSD_DRAGONFLY

    @@ -1454,7 +1227,7 @@

    - + BOOST_OS_BSD_FREE

    @@ -1506,7 +1279,7 @@

    - + BOOST_OS_BSD_NET

    @@ -1618,7 +1391,7 @@

    - + BOOST_OS_BSD_OPEN

    @@ -2017,912 +1790,6 @@ -

    - - BOOST_OS_BSD -
    -

    - BSD - operating system. -

    -

    - BSD has various branch operating systems possible and each detected individually. - This detects the following variations and sets a specific version number - macro to match: -

    -
    -
    - - - - - -
    [Note]Note

    - The general BOOST_OS_BSD - is set in all cases to indicate some form of BSD. If the above variants - is detected the corresponding macro is also set. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - BSD -

    -
    -

    - detection -

    -
    -

    - _SYSTYPE_BSD -

    -
    -

    - detection -

    -
    -

    - BSD4_2 -

    -
    -

    - 4.2.0 -

    -
    -

    - BSD4_3 -

    -
    -

    - 4.3.0 -

    -
    -

    - BSD4_4 -

    -
    -

    - 4.4.0 -

    -
    -

    - BSD -

    -
    -

    - V.R.0 -

    -
    -
    - - BOOST_OS_CYGWIN -
    -

    - Cygwin evironment. -

    -
    ---- - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __CYGWIN__ -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_HPUX -
    -

    - HP-UX operating system. -

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - hpux -

    -
    -

    - detection -

    -
    -

    - _hpux -

    -
    -

    - detection -

    -
    -

    - __hpux -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_IRIX -
    -

    - IRIX operating system. -

    -
    ---- - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - sgi -

    -
    -

    - detection -

    -
    -

    - __sgi -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_LINUX -
    -

    - Linux operating system. -

    -
    ---- - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - linux -

    -
    -

    - detection -

    -
    -

    - __linux -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_MACOS -
    -

    - Mac OS operating - system. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - macintosh -

    -
    -

    - detection -

    -
    -

    - Macintosh -

    -
    -

    - detection -

    -
    -

    - __APPLE__ -

    -
    -

    - detection -

    -
    -

    - __MACH__ -

    -
    -

    - detection -

    -
    -

    - __APPLE__, __MACH__ -

    -
    -

    - 10.0.0 -

    -
    -

    - otherwise -

    -
    -

    - 9.0.0 -

    -
    -
    - - BOOST_OS_OS400 -
    -

    - IBM OS/400 operating - system. -

    -
    ---- - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __OS400__ -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_QNX -
    -

    - QNX operating system. - Version number available as major, and minor if possible. And version 4 is - specifically detected. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __QNX__ -

    -
    -

    - detection -

    -
    -

    - __QNXNTO__ -

    -
    -

    - detection -

    -
    -

    - _NTO_VERSION -

    -
    -

    - V.R.0 -

    -
    -

    - __QNX__ -

    -
    -

    - 4.0.0 -

    -
    -
    - - BOOST_OS_SOLARIS -
    -

    - Solaris - operating system. -

    -
    ---- - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - sun -

    -
    -

    - detection -

    -
    -

    - __sun -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_UNIX -
    -

    - Unix Environment operating - system. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - unix -

    -
    -

    - detection -

    -
    -

    - __unix -

    -
    -

    - detection -

    -
    -

    - _XOPEN_SOURCE -

    -
    -

    - detection -

    -
    -

    - _POSIX_SOURCE -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_SVR4 -
    -

    - SVR4 Environment - operating system. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - __sysv__ -

    -
    -

    - detection -

    -
    -

    - __SVR4 -

    -
    -

    - detection -

    -
    -

    - __svr4__ -

    -
    -

    - detection -

    -
    -

    - _SYSTYPE_SVR4 -

    -
    -

    - detection -

    -
    -
    - - BOOST_OS_VMS -
    -

    - VMS operating system. -

    -
    ---- - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - VMS -

    -
    -

    - detection -

    -
    -

    - __VMS -

    -
    -

    - detection -

    -
    -

    - __VMS_VER -

    -
    -

    - V.R.P -

    -
    -
    - - BOOST_OS_WINDOWS -
    -

    - Microsoft - Windows operating system. -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Symbol -

    -
    -

    - Version -

    -
    -

    - _WIN32 -

    -
    -

    - detection -

    -
    -

    - _WIN64 -

    -
    -

    - detection -

    -
    -

    - __WIN32__ -

    -
    -

    - detection -

    -
    -

    - __TOS_WIN__ -

    -
    -

    - detection -

    -
    -

    - __WINDOWS__ -

    -
    -

    - detection -

    -
    @@ -2934,7 +1801,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/predef/reference/version_definition_macros.html b/doc/html/predef/reference/version_definition_macros.html index 1289fe4..071866f 100644 --- a/doc/html/predef/reference/version_definition_macros.html +++ b/doc/html/predef/reference/version_definition_macros.html @@ -6,11 +6,12 @@ - + +
    -PrevUpHome +PrevUpHomeNext

    @@ -177,7 +178,7 @@
    -PrevUpHome +PrevUpHomeNext
    diff --git a/doc/html/predef/using_the_predefs.html b/doc/html/predef/using_the_predefs.html index a672f27..3836fa0 100644 --- a/doc/html/predef/using_the_predefs.html +++ b/doc/html/predef/using_the_predefs.html @@ -32,25 +32,29 @@

    • - BOOST_ARCHITECTURE_for - system/CPU architecture one is compiling for. + BOOST_ARCH_for system/CPU + architecture one is compiling for.
    • - BOOST_CXX_ for the compiler + BOOST_COMP_ for the compiler one is using.
    • - BOOST_LANGUAGE_ for language + BOOST_LANG_ for language standards one is compiling against.
    • - BOOST_LIBC_ and BOOST_LIBSTD_ for the C and C++ standard + BOOST_LIB_C_ and BOOST_LIB_STD_ for the C and C++ standard library in use.
    • BOOST_OS_ for the operating system we are compiling to.
    • +
    • + BOOST_ENDIAN_ for endianness + of the os and architecture combination. +
    @@ -74,7 +78,7 @@ intmain(){ - if(BOOST_CXX_GNUC>=BOOST_VERSION_NUMBER(4,0,0)) + if(BOOST_COMP_GNUC>=BOOST_VERSION_NUMBER(4,0,0))std::cout<<"GCC compiler is at least version 4.0.0"<<std::endl;elsestd::cout<<"GCC compiler is at older than version 4.0.0, or not a GCC compiler"<<std::endl; @@ -84,7 +88,7 @@

    As you might notice above the else clause also covers the case where the particular compiler is not detected. - But one can make the test specifically test for the detection. All predef definitions + But one can make the test also test for the detection. All predef definitions are defined as a zero (0) expression when not detected. Hence one could use the detection with a natural single condition. For example:

    @@ -93,7 +97,7 @@ intmain(){ - if(BOOST_CXX_GNUC) + if(BOOST_COMP_GNUC)std::cout<<"This is GNU GCC!"<<std::endl;elsestd::cout<<"Not GNU GCC."<<std::endl; @@ -107,8 +111,8 @@
    #include <boost/predef.h>
     #include <iostream>
     
    -#if BOOST_CXX_GNUC
    -  #if BOOST_CXX_GNUC >= BOOST_VERSION_NUMBER(4,0,0)
    +#if BOOST_COMP_GNUC
    +  #if BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(4,0,0)
         const char * the_compiler = "GNU GCC, of at least version 4."
       #else
         const char * the_compiler = "GNU GCC, less than version 4."
    @@ -123,6 +127,18 @@
       return 0;
     }
     
    +

    + In addition, for each version macro defined there is a *_AVAILABLE macro defined only when the particular + aspect is detected. I.e. a definition equivalent to: +

    +
    #if BOOST_PREDEF_ABC
    +  #define BOOST_PREDEF_ABC_AVAILABLE
    +#endif
    +
    +

    + Also for each aspect there is a macro defined with a descriptive name of what + the detection is. +

    Using the diff --git a/doc/predef.qbk b/doc/predef.qbk index 7565955..38fd31f 100644 --- a/doc/predef.qbk +++ b/doc/predef.qbk @@ -18,12 +18,12 @@ Boost C++ Libraries.] [section Introduction] This library defines a set of compiler, architecture, operating system, -and library version numbers from the information it can gather of C++ -predefined macros or those defined in generally available headers. The -idea for this library grew out of a proposal to extend the Boost Config -library to provide more, and consistent, information than the feature -definitions it supports. What follows is an edited version of that brief -proposal. +library, and other version numbers from the information it can gather of +C, C++, Objective C, and Objective C++ predefined macros or those defined +in generally available headers. The idea for this library grew out of a +proposal to extend the Boost Config library to provide more, and consistent, +information than the feature definitions it supports. What follows is +an edited version of that brief proposal. [heading Proposal] @@ -51,12 +51,15 @@ consistently represent their version. This includes: The current Predef library is now, both an independent library, and expanded in scope. It includes detection and definition of architectures, compilers, -languages, libraries, and operating systems. The key benefits are: +languages, libraries, operating systems, and endianness. The key benefits are: * Version numbers that are always defined so that one doesn't have to guard with `#ifdef`. +* Guard macros that can be used for `#ifdef` checks. * All possible definitions are included with the single `#include ` so that it's friendly to precompiled header usage. +* Specific definitions can be included, ex. `#include ` + for single checks. * Predefs can be directly used in both preprocessor and compiler expressions for comparison to other similarly defined values. * The headers are usable from multiple languages, that support the C preprocessor. @@ -103,7 +106,9 @@ done: interesting to add something like auto-configuration predefs. This way we can add definitions for user specific libraries and features. * Along with the above, it might be good to add some user control as to which - headers are included with the top-level header. + headers are included with the top-level header. Although in the current + form of the library this is less of an issue as one can include the + specific headers one needs. * Additionally, even if there is no auto-configure style option.. It would be good to add optionally included headers so that user can get consistent version number definitions for libraries they use. @@ -133,12 +138,13 @@ the particular item is not detected, and to a /positive/ value if it is detected. The predef macros fall onto five categories each with macros of a particular prefix: -* `BOOST_ARCHITECTURE_`for system/CPU architecture one is compiling for. -* `BOOST_CXX_` for the compiler one is using. -* `BOOST_LANGUAGE_` for language standards one is compiling against. -* `BOOST_LIBC_` and `BOOST_LIBSTD_` for the C and C++ standard library +* `BOOST_ARCH_`for system/CPU architecture one is compiling for. +* `BOOST_COMP_` for the compiler one is using. +* `BOOST_LANG_` for language standards one is compiling against. +* `BOOST_LIB_C_` and `BOOST_LIB_STD_` for the C and C++ standard library in use. * `BOOST_OS_` for the operating system we are compiling to. +* `BOOST_ENDIAN_` for endianness of the os and architecture combination. [note The detected definitions are for the configuration one is targeting during the compile. In particular in a cross-compile this means the target @@ -154,7 +160,7 @@ a choice based on the version of the GCC C++ compiler one would: int main() { - if (BOOST_CXX_GNUC >= BOOST_VERSION_NUMBER(4,0,0)) + if (BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(4,0,0)) std::cout << "GCC compiler is at least version 4.0.0" << std::endl; else std::cout << "GCC compiler is at older than version 4.0.0, or not a GCC compiler" << std::endl; @@ -164,7 +170,7 @@ a choice based on the version of the GCC C++ compiler one would: As you might notice above the `else` clause also covers the case where the particular compiler is not detected. But one can make the test -specifically test for the detection. All predef definitions are defined +also test for the detection. All predef definitions are defined as a zero (0) expression when not detected. Hence one could use the detection with a natural single condition. For example: @@ -174,7 +180,7 @@ detection with a natural single condition. For example: int main() { - if (BOOST_CXX_GNUC) + if (BOOST_COMP_GNUC) std::cout << "This is GNU GCC!" << std::endl; else std::cout << "Not GNU GCC." << std::endl; @@ -189,8 +195,8 @@ from the preprocessor: #include #include - #if BOOST_CXX_GNUC - #if BOOST_CXX_GNUC >= BOOST_VERSION_NUMBER(4,0,0) + #if BOOST_COMP_GNUC + #if BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(4,0,0) const char * the_compiler = "GNU GCC, of at least version 4." #else const char * the_compiler = "GNU GCC, less than version 4." @@ -206,6 +212,19 @@ from the preprocessor: } `` +In addition, for each version macro defined there is a +`*_AVAILABLE` macro defined only when the particular aspect is +detected. I.e. a definition equivalent to: + +`` + #if BOOST_PREDEF_ABC + #define BOOST_PREDEF_ABC_AVAILABLE + #endif +`` + +Also for each aspect there is a macro defined with a descriptive +name of what the detection is. + [heading Using the `BOOST_VERSION_NUMBER` macro] All the predefs are defined to be a use of the `BOOST_VERSION_NUMBER` macro. @@ -264,6 +283,8 @@ All predefs need to follow a set of requirements: * The predef must, by default, be defined to `BOOST_VERSION_NUMBER(0,0,1)` when the predef is detected. * If possible, the predef will be defined as the version number detected. +* The predef must define `*_AVAILABLE` macros. +* The predef must define a symbolic constant string name macro. * The predef must declare itself, after being defined, for the testing system. @@ -335,15 +356,26 @@ to minimally indicate that the predef was detected: `` #if (condition_a) - #undef BOOST_category_tag - #if (condition_b) - #define BOOST_category_tag BOOST_VERSION_NUMBER(major,minor,patch) - #else - #define BOOST_category_tag BOOST_VERSION_NUMBER(0,0,1) - #endif +# undef BOOST_category_tag +# if (condition_b) +# define BOOST_category_tag BOOST_VERSION_NUMBER(major,minor,patch) +# else +# define BOOST_category_tag BOOST_VERSION_NUMBER(0,0,1) +# endif #endif `` +We also need to provide the `*_AVAILABLE` versions of the predef. And +for convenience we also want to provide a `*_NAME` macro: + +`` +#if BOOST_category_tag +# define BOOST_category_tag_AVAILABLE +#endif + +#define BOOST_catagory_tag_NAME "Name" +`` + The testing of the predef macros is automated to generate checks for all the defined predefs, whether detected or not. To do this we need to declare the predef to the test system. This declaration is empty for @@ -352,7 +384,7 @@ to create informational output: `` #include -BOOST_PREDEF_DECLARE_TEST(BOOST_category_tag,"Name") +BOOST_PREDEF_DECLARE_TEST(BOOST_category_tag,BOOST_category_tag_NAME) `` And, of course, we last need to close out the include guard: @@ -375,7 +407,7 @@ uses a simple 3-digit version macro (M,N,P). It can be decomesed and defined as: `` -#define BOOST_CXX_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__) +#define BOOST_CCOMP_EDG BOOST_PREDEF_MAKE_N_N_N(__EDG_VERSION__) `` The decomposition macros are split into three types: decimal @@ -393,6 +425,7 @@ and "Y", "M", "D" for dates. [section `BOOST_ARCH` architecture macros] [include ../include/boost/predef/architecture/*.h] +[include ../include/boost/predef/architecture/x86/*.h] [endsect] [section `BOOST_COMP` compiler macros] @@ -404,12 +437,17 @@ and "Y", "M", "D" for dates. [endsect] [section `BOOST_LIB` library macros] -[include ../include/boost/predef/library/*/*.h] +[include ../include/boost/predef/library/c/*.h] +[include ../include/boost/predef/library/std/*.h] [endsect] -[section `BOOST_OS_` operating system macros] +[section `BOOST_OS` operating system macros] [include ../include/boost/predef/os/*.h] -[include ../include/boost/predef/os/*/*.h] +[include ../include/boost/predef/os/bsd/*.h] +[endsect] + +[section Other macros] +[include ../include/boost/predef/other/*.h] [endsect] [section Version definition macros] @@ -418,3 +456,22 @@ and "Y", "M", "D" for dates. [endsect] [endsect] + +[section Acknoledgements] + +The comprehensiveness of this library would not be +possible without the existance of the indispensible +resource that is the +[@http://sourceforge.net/p/predef/ Pre-defined C/C++ Compiler Macros] +Project. It was, and continues to be, the primary source +of the definitions that make up this library. Thanks +to Bjorn Reese and all the volunteers that make that +resource possible. + +This library would be an incoherent mess if it weren't for +Boost community that provided invaluable feedback for the +eight years that it took to polish into a useable form. +In particular I would like to thank: ... + + +[endsect] \ No newline at end of file diff --git a/include/boost/predef.h b/include/boost/predef.h index 44b0915..6aeb904 100644 --- a/include/boost/predef.h +++ b/include/boost/predef.h @@ -13,6 +13,6 @@ http://www.boost.org/LICENSE_1_0.txt) #include #include #include -#include +#include #endif diff --git a/include/boost/predef/architecture.h b/include/boost/predef/architecture.h index c7d0f24..40bc596 100644 --- a/include/boost/predef/architecture.h +++ b/include/boost/predef/architecture.h @@ -9,11 +9,9 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_PREDEF_ARCHITECTURE_H #include -#include #include #include #include -#include #include #include #include diff --git a/include/boost/predef/architecture/alpha.h b/include/boost/predef/architecture/alpha.h index 436e097..7ccc480 100644 --- a/include/boost/predef/architecture/alpha.h +++ b/include/boost/predef/architecture/alpha.h @@ -12,7 +12,9 @@ http://www.boost.org/LICENSE_1_0.txt) #include /*` -[heading `BOOST_ARCH_ALPHA`, [@http://en.wikipedia.org/wiki/DEC_Alpha DEC Alpha]] +[heading `BOOST_ARCH_ALPHA`] + +[@http://en.wikipedia.org/wiki/DEC_Alpha DEC Alpha] architecture. [table [[__predef_symbol__] [__predef_version__]] diff --git a/include/boost/predef/architecture/amd64.h b/include/boost/predef/architecture/amd64.h deleted file mode 100644 index 8344558..0000000 --- a/include/boost/predef/architecture/amd64.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright Redshift Software, Inc. 2008-2013 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at -http://www.boost.org/LICENSE_1_0.txt) -*/ - -#ifndef BOOST_PREDEF_ARCHITECTURE_AMD64_H -#define BOOST_PREDEF_ARCHITECTURE_AMD64_H - -#include -#include - -/*` -[heading `BOOST_ARCH_AMD64`, [@http://en.wikipedia.org/wiki/Amd64 Advanced Micro Devices AMD 64] architecture.] - -[table - [[__predef_symbol__] [__predef_version__]] - - [[`__amd64__`] [__predef_detection__]] - [[`__amd64`] [__predef_detection__]] - [[`__x86_64__`] [__predef_detection__]] - [[`__x86_64`] [__predef_detection__]] - [[`_M_X64`] [__predef_detection__]] - ] - */ - -#define BOOST_ARCH_AMD64 BOOST_VERSION_NUMBER_NOT_AVAILABLE - -#if defined(__amd64__) || defined(__amd64) || \ - defined(__x86_64__) || defined(__x86_64) || \ - defined(_M_X64) -# undef BOOST_ARCH_AMD64 -# define BOOST_ARCH_AMD64 BOOST_VERSION_NUMBER_AVAILABLE -#endif - -#if BOOST_ARCH_AMD64 -# define BOOST_ARCH_AMD64_AVAILABLE -#endif - -#define BOOST_ARCH_AMD64_NAME "Advanced Micro Devices AMD 64" - -#include -BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_AMD64,BOOST_ARCH_AMD64_NAME) - - -#endif diff --git a/include/boost/predef/architecture/ia64.h b/include/boost/predef/architecture/ia64.h deleted file mode 100644 index aedb686..0000000 --- a/include/boost/predef/architecture/ia64.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright Redshift Software, Inc. 2008-2013 -Distributed under the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at -http://www.boost.org/LICENSE_1_0.txt) -*/ - -#ifndef BOOST_PREDEF_ARCHITECTURE_IA64_H -#define BOOST_PREDEF_ARCHITECTURE_IA64_H - -#include -#include - -/*` -[heading `BOOST_ARCH_IA64`] - -[@http://en.wikipedia.org/wiki/Ia64 Intel IA-64] architecture. - -[table - [[__predef_symbol__] [__predef_version__]] - - [[`__ia64__`] [__predef_detection__]] - [[`_IA64`] [__predef_detection__]] - [[`__IA64__`] [__predef_detection__]] - [[`__ia64`] [__predef_detection__]] - [[`_M_IA64`] [__predef_detection__]] - [[`__itanium__`] [__predef_detection__]] - ] - */ - -#define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_NOT_AVAILABLE - -#if defined(__ia64__) || defined(_IA64) || \ - defined(__IA64__) || defined(__ia64) || \ - defined(_M_IA64) || defined(__itanium__) -# undef BOOST_ARCH_IA64 -# define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_AVAILABLE -#endif - -#if BOOST_ARCH_IA64 -# define BOOST_ARCH_IA64_AVAILABLE -#endif - -#define BOOST_ARCH_IA64_NAME "Intel IA-64" - -#include -BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_IA64,BOOST_ARCH_IA64_NAME) - - -#endif diff --git a/include/boost/predef/architecture/x86.h b/include/boost/predef/architecture/x86.h index 54afb7c..3a08e9c 100644 --- a/include/boost/predef/architecture/x86.h +++ b/include/boost/predef/architecture/x86.h @@ -8,69 +8,22 @@ http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PREDEF_ARCHITECTURE_X86_H #define BOOST_PREDEF_ARCHITECTURE_X86_H -#include -#include - -#define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE +#include +#include /*` [heading `BOOST_ARCH_X86`] -[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture: -If available versions \[3-6\] are specifically detected. - -[table - [[__predef_symbol__] [__predef_version__]] - - [[`i386`] [__predef_detection__]] - [[`__i386__`] [__predef_detection__]] - [[`__i486__`] [__predef_detection__]] - [[`__i586__`] [__predef_detection__]] - [[`__i686__`] [__predef_detection__]] - [[`__i386`] [__predef_detection__]] - [[`_M_IX86`] [__predef_detection__]] - [[`_X86_`] [__predef_detection__]] - [[`__THW_INTEL__`] [__predef_detection__]] - [[`__I86__`] [__predef_detection__]] - [[`__INTEL__`] [__predef_detection__]] - - [[`__I86__`] [V.0.0]] - [[`_M_IX86`] [V.0.0]] - [[`__i686__`] [6.0.0]] - [[`__i586__`] [5.0.0]] - [[`__i486__`] [4.0.0]] - [[`__i386__`] [3.0.0]] - ] +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture. This is +a category to indicate that either `BOOST_ARCH_X86_32` or +`BOOST_ARCH_X86_64` is detected. */ -#if defined(i386) || defined(__i386__) || \ - defined(__i486__) || defined(__i586__) || \ - defined(__i686__) || defined(__i386) || \ - defined(_M_IX86) || defined(_X86_) || \ - defined(__THW_INTEL__) || defined(__I86__) || \ - defined(__INTEL__) +#define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_ARCH_X86_32 || BOOST_ARCH_X86_64 # undef BOOST_ARCH_X86 -# if !defined(BOOST_ARCH_X86) && defined(__I86__) -# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER(__I86__,0,0) -# endif -# if !defined(BOOST_ARCH_X86) && defined(_M_IX86) -# define BOOST_ARCH_X86 BOOST_PREDEF_MAKE_10_VV00(_M_IX86) -# endif -# if !defined(BOOST_ARCH_X86) && defined(__i686__) -# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER(6,0,0) -# endif -# if !defined(BOOST_ARCH_X86) && defined(__i586__) -# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER(5,0,0) -# endif -# if !defined(BOOST_ARCH_X86) && defined(__i486__) -# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER(4,0,0) -# endif -# if !defined(BOOST_ARCH_X86) && defined(__i386__) -# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER(3,0,0) -# endif -# if !defined(BOOST_ARCH_X86) -# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_AVAILABLE -# endif +# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_AVAILABLE #endif #if BOOST_ARCH_X86 @@ -82,5 +35,4 @@ If available versions \[3-6\] are specifically detected. #include BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86,BOOST_ARCH_X86_NAME) - #endif diff --git a/include/boost/predef/architecture/x86/32.h b/include/boost/predef/architecture/x86/32.h new file mode 100644 index 0000000..131d94d --- /dev/null +++ b/include/boost/predef/architecture/x86/32.h @@ -0,0 +1,87 @@ +/* +Copyright Redshift Software, Inc. 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_32_H +#define BOOST_PREDEF_ARCHITECTURE_X86_32_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_32`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture: +If available versions \[3-6\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`i386`] [__predef_detection__]] + [[`__i386__`] [__predef_detection__]] + [[`__i486__`] [__predef_detection__]] + [[`__i586__`] [__predef_detection__]] + [[`__i686__`] [__predef_detection__]] + [[`__i386`] [__predef_detection__]] + [[`_M_IX86`] [__predef_detection__]] + [[`_X86_`] [__predef_detection__]] + [[`__THW_INTEL__`] [__predef_detection__]] + [[`__I86__`] [__predef_detection__]] + [[`__INTEL__`] [__predef_detection__]] + + [[`__I86__`] [V.0.0]] + [[`_M_IX86`] [V.0.0]] + [[`__i686__`] [6.0.0]] + [[`__i586__`] [5.0.0]] + [[`__i486__`] [4.0.0]] + [[`__i386__`] [3.0.0]] + ] + */ + +#define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(i386) || defined(__i386__) || \ + defined(__i486__) || defined(__i586__) || \ + defined(__i686__) || defined(__i386) || \ + defined(_M_IX86) || defined(_X86_) || \ + defined(__THW_INTEL__) || defined(__I86__) || \ + defined(__INTEL__) +# undef BOOST_ARCH_X86_32 +# if !defined(BOOST_ARCH_X86_32) && defined(__I86__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(__I86__,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(_M_IX86) +# define BOOST_ARCH_X86_32 BOOST_PREDEF_MAKE_10_VV00(_M_IX86) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i686__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i586__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i486__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i386__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_X86_32 +# define BOOST_ARCH_X86_32_AVAILABLE +#endif + +#define BOOST_ARCH_X86_32_NAME "Intel x86-32" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME) + +#include + +#endif diff --git a/include/boost/predef/architecture/x86/64.h b/include/boost/predef/architecture/x86/64.h new file mode 100644 index 0000000..718faa3 --- /dev/null +++ b/include/boost/predef/architecture/x86/64.h @@ -0,0 +1,59 @@ +/* +Copyright Redshift Software, Inc. 2008-2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_64_H +#define BOOST_PREDEF_ARCHITECTURE_X86_64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel IA-64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__x86_64`] [__predef_detection__]] + [[`__x86_64__`] [__predef_detection__]] + [[`__ia64__`] [__predef_detection__]] + [[`_IA64`] [__predef_detection__]] + [[`__IA64__`] [__predef_detection__]] + [[`__ia64`] [__predef_detection__]] + [[`_M_IA64`] [__predef_detection__]] + [[`__itanium__`] [__predef_detection__]] + [[`__amd64__`] [__predef_detection__]] + [[`__amd64`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__x86_64) || defined(__x86_64__) || \ + defined(__ia64__) || defined(_IA64) || \ + defined(__IA64__) || defined(__ia64) || \ + defined(_M_IA64) || defined(__itanium__) || \ + defined(__amd64__) || defined(__amd64) || \ + defined(_M_X64) +# undef BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64_AVAILABLE +#endif + +#define BOOST_ARCH_X86_64_NAME "Intel x86-64" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_64,BOOST_ARCH_X86_64_NAME) + +#include + +#endif diff --git a/include/boost/predef/compiler.h b/include/boost/predef/compiler.h index 4a37452..e83f449 100644 --- a/include/boost/predef/compiler.h +++ b/include/boost/predef/compiler.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2012 +Copyright Redshift Software, Inc. 2008-2013 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -29,7 +29,6 @@ http://www.boost.org/LICENSE_1_0.txt) #include #include #include -#include #include #include #include diff --git a/include/boost/predef/compiler/gcc_xml.h b/include/boost/predef/compiler/gcc_xml.h index b0f5819..d762c5d 100644 --- a/include/boost/predef/compiler/gcc_xml.h +++ b/include/boost/predef/compiler/gcc_xml.h @@ -14,7 +14,7 @@ http://www.boost.org/LICENSE_1_0.txt) /*` [heading `BOOST_COMP_GCCXML`] -[@http://en.wikipedia.org/wiki/XXX GCC XML] compiler. +[@http://www.gccxml.org/ GCC XML] compiler. [table [[__predef_symbol__] [__predef_version__]] @@ -39,5 +39,4 @@ http://www.boost.org/LICENSE_1_0.txt) #include BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML,BOOST_COMP_GCCXML_NAME) - #endif diff --git a/include/boost/predef/detail/endian_compat.h b/include/boost/predef/detail/endian_compat.h index 4090182..b253866 100644 --- a/include/boost/predef/detail/endian_compat.h +++ b/include/boost/predef/detail/endian_compat.h @@ -10,11 +10,11 @@ http://www.boost.org/LICENSE_1_0.txt) #include -#if BOOST_PREDEF_ENDIAN_BIG_BYTE +#if BOOST_ENDIAN_BIG_BYTE # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #endif -#if BOOST_PREDEF_ENDIAN_LITTLE_BYTE +#if BOOST_ENDIAN_LITTLE_BYTE # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #endif diff --git a/include/boost/predef/other.h b/include/boost/predef/other.h new file mode 100644 index 0000000..341130e --- /dev/null +++ b/include/boost/predef/other.h @@ -0,0 +1,15 @@ +/* +Copyright Redshift Software, Inc. 2013 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_OTHER_H +#define BOOST_PREDEF_OTHER_H + +#include +#include +/*#include */ + +#endif diff --git a/include/boost/predef/endian.h b/include/boost/predef/other/endian.h similarity index 100% rename from include/boost/predef/endian.h rename to include/boost/predef/other/endian.h diff --git a/include/boost/predef/compiler/mingw.h b/include/boost/predef/other/mingw.h similarity index 64% rename from include/boost/predef/compiler/mingw.h rename to include/boost/predef/other/mingw.h index 60b50b2..9bd7a5c 100644 --- a/include/boost/predef/compiler/mingw.h +++ b/include/boost/predef/other/mingw.h @@ -12,9 +12,9 @@ http://www.boost.org/LICENSE_1_0.txt) #include /*` -[heading `BOOST_COMP_MINGW`] +[heading `BOOST_PLAT_MINGW`] -[@http://en.wikipedia.org/wiki/MinGW MinGW] compiler. +[@http://en.wikipedia.org/wiki/MinGW MinGW] platform. Version number available as major, minor, and patch. [table @@ -28,32 +28,32 @@ Version number available as major, minor, and patch. ] */ -#define BOOST_COMP_MINGW BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_NOT_AVAILABLE #if defined(__MINGW32__) || defined(__MINGW64__) # include <_mingw.h> -# undef BOOST_COMP_MINGW -# if !defined(BOOST_COMP_MINGW) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) -# define BOOST_COMP_MINGW \ +# undef BOOST_PLAT_MINGW +# if !defined(BOOST_PLAT_MINGW) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define BOOST_PLAT_MINGW \ BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0) # endif -# if !defined(BOOST_COMP_MINGW) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) -# define BOOST_COMP_MINGW \ +# if !defined(BOOST_PLAT_MINGW) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define BOOST_PLAT_MINGW \ BOOST_VERSION_NUMBER(__MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION,0) # endif -# if !defined(BOOST_COMP_MINGW) -# define BOOST_COMP_MINGW BOOST_VERSION_NUMBER_AVAILABLE +# if !defined(BOOST_PLAT_MINGW) +# define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_AVAILABLE # endif #endif -#if BOOST_COMP_MINGW -# define BOOST_COMP_MINGW_AVAILABLE +#if BOOST_PLAT_MINGW +# define BOOST_PLAT_MINGW_AVAILABLE #endif -#define BOOST_COMP_MINGW_NAME "MinGW" +#define BOOST_PLAT_MINGW_NAME "MinGW" #include -BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MINGW,BOOST_COMP_MINGW_NAME) +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW,BOOST_PLAT_MINGW_NAME) #endif