Added new config macro BOOST_HAS_MS_INT64 to detect presence of __int64 data type.

Modified boost source to use BOOST_HAS_LONG_LONG and BOOST_HAS_MS_INT64
   where appropriate to do so.


[SVN r13714]
This commit is contained in:
John Maddock
2002-05-07 11:24:29 +00:00
parent 6b5a580456
commit 9e02db296c
12 changed files with 1091 additions and 375 deletions

1329
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -46,6 +46,10 @@
#include <float.h>
#endif
#if __BORLANDC__ >= 0x530
# define BOOST_HAS_MS_INT64
#endif
//
// check for exception handling support:
#ifndef _CPPUNWIND

View File

@ -22,6 +22,11 @@
# define BOOST_NO_VOID_RETURNS
# endif
# if defined(_MSC_VER) && (_MSC_VER >= 1200)
# define BOOST_HAS_MS_INT64
# endif
#endif
#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)

View File

@ -52,6 +52,9 @@
# ifndef _NATIVE_WCHAR_T_DEFINED
# define BOOST_NO_INTRINSIC_WCHAR_T
# endif
# if _MSC_VER >= 1200
# define BOOST_HAS_MS_INT64
# endif
# define BOOST_NO_SWPRINTF
#endif

View File

@ -73,6 +73,20 @@
# define BOOST_NO_EXCEPTIONS
#endif
//
// __int64 support:
//
#if _MSC_VER >= 1200
# define BOOST_HAS_MS_INT64
#endif
//
// long long support:
//
#if _MSC_VER >= 1301
# define BOOST_HAS_LONG_LONG
#endif
#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(_MSC_VER)

View File

@ -32,6 +32,9 @@
&& (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# define BOOST_HAS_LONG_LONG
#endif
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_INTEGRAL_INT64_T)
# define BOOST_NO_INTEGRAL_INT64_T
#endif
// GCC 3.x will clean up all of those nasty macro definitions that
// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine

View File

@ -0,0 +1,29 @@
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// MACRO: BOOST_HAS_MS_INT64
// TITLE: __int64
// DESCRIPTION: The platform supports Microsoft style __int64.
#include <cstdlib>
namespace boost_has_ms_int64{
int test()
{
__int64 lli = 0i64;
unsigned __int64 ulli = 0ui64;
(void)lli;
(void)ulli;
return 0;
}
}

View File

@ -829,6 +829,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_HAS_HASH);
PRINT_MACRO(BOOST_HAS_LONG_LONG);
PRINT_MACRO(BOOST_HAS_MACRO_USE_FACET);
PRINT_MACRO(BOOST_HAS_MS_INT64);
PRINT_MACRO(BOOST_HAS_NANOSLEEP);
PRINT_MACRO(BOOST_HAS_NL_TYPES_H);
PRINT_MACRO(BOOST_HAS_PTHREAD_DELAY_NP);
@ -884,6 +885,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_STD_WSTRING);
PRINT_MACRO(BOOST_NO_STDC_NAMESPACE);
PRINT_MACRO(BOOST_NO_STRINGSTREAM);
PRINT_MACRO(BOOST_NO_SWPRINTF);
PRINT_MACRO(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION);
PRINT_MACRO(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS);
PRINT_MACRO(BOOST_DISABLE_THREADS);

View File

@ -10,7 +10,7 @@
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_*.cxx on
// Fri Feb 8 11:29:25 2002
// Mon May 6 12:58:50 BST 2002
#include <boost/config.hpp>
#define BOOST_INCLUDE_MAIN
@ -400,3 +400,4 @@ int test_main( int, char *[] )
BOOST_TEST(0 == boost_has_two_arg_use_facet::test());
return 0;
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_HAS_MS_INT64
// This file should not compile, if it does then
// BOOST_HAS_MS_INT64 may be defined.
// see boost_has_ms_int64.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_has_ms_int64.cxx on
// Mon May 6 12:26:03 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifndef BOOST_HAS_MS_INT64
#include "boost_has_ms_int64.cxx"
#else
#error "this file should not compile"
#endif
int cpp_main( int, char *[] )
{
return boost_has_ms_int64::test();
}

View File

@ -0,0 +1,36 @@
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// Test file for macro BOOST_HAS_MS_INT64
// This file should compile, if it does not then
// BOOST_HAS_MS_INT64 should not be defined.
// see boost_has_ms_int64.cxx for more details
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_has_ms_int64.cxx on
// Mon May 6 12:26:03 2002
// Must not have BOOST_ASSERT_CONFIG set; it defeats
// the objective of this file:
#ifdef BOOST_ASSERT_CONFIG
# undef BOOST_ASSERT_CONFIG
#endif
#include <boost/config.hpp>
#include <boost/test/cpp_main.cpp>
#include "test.hpp"
#ifdef BOOST_HAS_MS_INT64
#include "boost_has_ms_int64.cxx"
#else
namespace boost_has_ms_int64 = empty_boost;
#endif
int cpp_main( int, char *[] )
{
return boost_has_ms_int64::test();
}

View File

@ -101,6 +101,8 @@ run libs/config/test/has_long_long_pass.cpp
link-fail libs/config/test/has_long_long_fail.cpp
run libs/config/test/has_macro_use_facet_pass.cpp
link-fail libs/config/test/has_macro_use_facet_fail.cpp
run libs/config/test/has_ms_int64_pass.cpp
link-fail libs/config/test/has_ms_int64_fail.cpp
run libs/config/test/has_nanosleep_pass.cpp
link-fail libs/config/test/has_nanosleep_fail.cpp
run libs/config/test/has_nl_types_h_pass.cpp