Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-30 23:49:26


Hello,
  Here's a compatibility patch to <boost/cstdint.hpp> that gets it closer to
working on FreeBSD 3.4 and 4.5RC1. There are still some unresolved issues
with 64-bit integer support on the platform, but they appear to be problems
with GCC 3.0.3's standard library not recognizing that long long support is
available.
  Okay to commit?

        Doug

Index: cstdint.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/cstdint.hpp,v
retrieving revision 1.23
diff -c -3 -p -r1.23 cstdint.hpp
*** cstdint.hpp 2001/11/04 21:53:21 1.23
--- cstdint.hpp 2002/01/31 04:42:53
*************** namespace boost
*** 80,85 ****
--- 80,129 ----
  } // namespace boost

+ #elif defined(__FreeBSD__) && (__FreeBSD__ <= 4)
+ // FreeBSD has an <inttypes.h> that contains much of what we need
+ # include <inttypes.h>
+
+ namespace boost {
+ using ::int8_t;
+ typedef int8_t int_least8_t;
+ typedef int8_t int_fast8_t;
+ using ::uint8_t;
+ typedef uint8_t uint_least8_t;
+ typedef uint8_t uint_fast8_t;
+
+ using ::int16_t;
+ typedef int16_t int_least16_t;
+ typedef int16_t int_fast16_t;
+ using ::uint16_t;
+ typedef uint16_t uint_least16_t;
+ typedef uint16_t uint_fast16_t;
+
+ using ::int32_t;
+ typedef int32_t int_least32_t;
+ typedef int32_t int_fast32_t;
+ using ::uint32_t;
+ typedef uint32_t uint_least32_t;
+ typedef uint32_t uint_fast32_t;
+
+ # ifndef BOOST_NO_INT64_T
+
+ using ::int64_t;
+ typedef int64_t int_least64_t;
+ typedef int64_t int_fast64_t;
+ using ::uint64_t;
+ typedef uint64_t uint_least64_t;
+ typedef uint64_t uint_fast64_t;
+
+ typedef int64_t intmax_t;
+ typedef uint64_t uintmax_t;
+
+ # else
+
+ typedef
+ # endif
+ }
+
  #else // BOOST_HAS_STDINT_H


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk