|
Boost : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2004-09-17 11:54:47
After some investigation I found the problem with the build failures for
xtime.cpp on CW platforms: http://tinyurl.com/5nwxo [1]
The issue is the placement of the definition of __STDC_CONSTANT_MACROS
to bring in the *INT*_C() constant macros from cstdint. Currently the
top of xtime.cpp looks like so:
===================================================================
#include <boost/thread/detail/config.hpp>
#include <boost/thread/xtime.hpp>
#if defined(BOOST_HAS_FTIME)
# include <windows.h>
# define __STDC_CONSTANT_MACROS
# include <boost/cstdint.hpp>
#elif defined(BOOST_HAS_GETTIMEOFDAY)
# include <sys/time.h>
#elif defined(BOOST_HAS_MPTASKS)
# include <DriverServices.h>
# include <boost/thread/detail/force_cast.hpp>
#endif
===================================================================
But that placement is not early enough as the <boost/cstdint.hpp> is
included from <boost/thread/xtime.hpp>. Moving the definition above the
<boost/thread/xtime.hpp> included fixes that problem:
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/xtime.cpp,v
retrieving revision 1.12
diff -u -r1.12 xtime.cpp
--- xtime.cpp 16 Sep 2004 20:39:49 -0000 1.12
+++ xtime.cpp 17 Sep 2004 16:51:04 -0000
@@ -11,11 +11,14 @@
#include <boost/thread/detail/config.hpp>
+#if defined(BOOST_HAS_FTIME)
+# define __STDC_CONSTANT_MACROS
+#endif
+
#include <boost/thread/xtime.hpp>
#if defined(BOOST_HAS_FTIME)
# include <windows.h>
-# define __STDC_CONSTANT_MACROS
# include <boost/cstdint.hpp>
#elif defined(BOOST_HAS_GETTIMEOFDAY)
# include <sys/time.h>
===================================================================
OK to commit??
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk