Added BOOST_HAS_LONG_LONG config option.

[SVN r11392]
This commit is contained in:
John Maddock
2001-10-16 11:40:19 +00:00
parent 5e28fcc6ab
commit b70903dca0
5 changed files with 51 additions and 1 deletions

View File

@ -35,6 +35,11 @@
//
#define BOOST_HAS_THREADS
//
// long long support: always turn this on here?
//
#define BOOST_HAS_LONG_LONG
#define BOOST_COMPILER "GNU C++ version " BOOST_STRINGIZE(__GNUC__) "." BOOST_STRINGIZE(__GNUC_MINOR__)
//

View File

@ -21,6 +21,15 @@
# define BOOST_DECL // default for compilers not needing this decoration.
# endif
//
// look for long long by looking for the appropriate macros in <climits>
//
#include <climits>
# if !defined(BOOST_MSVC) && !defined(__BORLANDC__) \
&& (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# define BOOST_HAS_LONG_LONG
#endif
//
// Assume any extensions are in namespace std:: unless stated otherwise:
//

View File

@ -0,0 +1,28 @@
// (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_LONG_LONG
// TITLE: long long
// DESCRIPTION: The platform supports long long.
#include <cstdlib>
namespace boost_has_long_long{
int test()
{
long long int lli = 0LL;
unsigned long long int ulli = 0uLL;
(void)lli;
(void)ulli;
return 0;
}
}

View File

@ -10,7 +10,7 @@
// Do not edit this file, it was generated automatically by
// ../tools/generate from boost_*.cxx on
// Thu Oct 11 12:24:39 2001
// Tue Oct 16 12:34:33 2001
#include <boost/config.hpp>
#define BOOST_INCLUDE_MAIN
@ -237,6 +237,11 @@ namespace boost_has_gettimeofday = empty_boost;
#else
namespace boost_has_hash = empty_boost;
#endif
#ifdef BOOST_HAS_LONG_LONG
#include "boost_has_long_long.cxx"
#else
namespace boost_has_long_long = empty_boost;
#endif
#ifdef BOOST_HAS_MACRO_USE_FACET
#include "boost_has_macro_use_facet.cxx"
#else
@ -368,6 +373,7 @@ int test_main( int, char *[] )
BOOST_TEST(0 == boost_has_nl_types_h::test());
BOOST_TEST(0 == boost_has_nanosleep::test());
BOOST_TEST(0 == boost_has_macro_use_facet::test());
BOOST_TEST(0 == boost_has_long_long::test());
BOOST_TEST(0 == boost_has_hash::test());
BOOST_TEST(0 == boost_has_gettimeofday::test());
BOOST_TEST(0 == boost_has_ftime::test());

View File

@ -93,6 +93,8 @@ run libs/config/test/has_gettimeofday_pass.cpp
link-fail libs/config/test/has_gettimeofday_fail.cpp
run libs/config/test/has_hash_pass.cpp
link-fail libs/config/test/has_hash_fail.cpp
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_nanosleep_pass.cpp