Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66118 - sandbox/chrono/boost/detail/win
From: vicente.botet_at_[hidden]
Date: 2010-10-20 12:58:52


Author: viboes
Date: 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
New Revision: 66118
URL: http://svn.boost.org/trac/boost/changeset/66118

Log:
Chrono: detail/win Cleanup
Text files modified:
   sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp | 6
   sandbox/chrono/boost/detail/win/GetCurrentThread.hpp | 2
   sandbox/chrono/boost/detail/win/GetLastError.hpp | 52 ++----------
   sandbox/chrono/boost/detail/win/GetProcessTimes.hpp | 2
   sandbox/chrono/boost/detail/win/GetThreadTimes.hpp | 2
   sandbox/chrono/boost/detail/win/LocalFree.hpp | 5
   sandbox/chrono/boost/detail/win/basic_types.hpp | 144 ++++++++++++++++--------------------
   sandbox/chrono/boost/detail/win/error_handling.hpp | 157 +++++++++++++++++----------------------
   sandbox/chrono/boost/detail/win/process.hpp | 20 ++++
   sandbox/chrono/boost/detail/win/system.hpp | 134 +++++++--------------------------
   sandbox/chrono/boost/detail/win/thread.hpp | 32 +++++++
   sandbox/chrono/boost/detail/win/time.hpp | 36 ++++++++
   sandbox/chrono/boost/detail/win/timers.hpp | 8 +
   13 files changed, 273 insertions(+), 327 deletions(-)

Modified: sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp (original)
+++ sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// GetCurrentProcess.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -6,8 +6,8 @@
 // See http://www.boost.org/LICENSE_1_0.txt
 
 
-#ifndef BOOST_DETAIL_WIN_GETCURRENT_PROCESS_HPP
-#define BOOST_DETAIL_WIN_GETCURRENT_PROCESS_HPP
+#ifndef BOOST_DETAIL_WIN_GETCURRENTPROCESS_HPP
+#define BOOST_DETAIL_WIN_GETCURRENTPROCESS_HPP
 
 #include <boost/detail/win/basic_types.hpp>
 

Modified: sandbox/chrono/boost/detail/win/GetCurrentThread.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/GetCurrentThread.hpp (original)
+++ sandbox/chrono/boost/detail/win/GetCurrentThread.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// GetCurrentThread.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 

Modified: sandbox/chrono/boost/detail/win/GetLastError.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/GetLastError.hpp (original)
+++ sandbox/chrono/boost/detail/win/GetLastError.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// GetLastError.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -11,47 +11,17 @@
 
 #include <boost/detail/win/basic_types.hpp>
 
+namespace boost {
+namespace detail {
+namespace win32 {
 #if defined( BOOST_USE_WINDOWS_H )
-# if !defined( BOOST_DETAIL_WIN_WINDOWS_H_INCLUDED )
-# include <windows.h>
-# define BOOST_DETAIL_WIN_WINDOWS_H_INCLUDED
-# endif
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
-
- using ::GetLastError;
-
- }
- }
-}
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
-
-// using ::GetLastError;
- __declspec(dllimport)
- DWORD_
- WINAPI
- GetLastError();
-
- }
- }
- }
-}
+ using ::GetLastError;
 #else
-# error "Win32 functions not available"
+ extern "C" __declspec(dllimport) DWORD_ WINAPI
+ GetLastError();
 #endif
+}
+}
+}
+
 #endif // BOOST_DETAIL_WIN_TIME_HPP

Modified: sandbox/chrono/boost/detail/win/GetProcessTimes.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/GetProcessTimes.hpp (original)
+++ sandbox/chrono/boost/detail/win/GetProcessTimes.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// GetProcessTimes.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 

Modified: sandbox/chrono/boost/detail/win/GetThreadTimes.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/GetThreadTimes.hpp (original)
+++ sandbox/chrono/boost/detail/win/GetThreadTimes.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// GetThreadTimes.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 

Modified: sandbox/chrono/boost/detail/win/LocalFree.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/LocalFree.hpp (original)
+++ sandbox/chrono/boost/detail/win/LocalFree.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// LocalFree.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -20,7 +20,8 @@
     using ::LocalFree;
 #else
     extern "C" typedef HANDLE_ HLOCAL_;
- extern "C" __declspec(dllimport) HLOCAL_ WINAPI LocalFree(HLOCAL_ hMem);
+ extern "C" __declspec(dllimport) HLOCAL_ WINAPI
+ LocalFree(HLOCAL_ hMem);
 #endif
 }
 }

Modified: sandbox/chrono/boost/detail/win/basic_types.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/basic_types.hpp (original)
+++ sandbox/chrono/boost/detail/win/basic_types.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// basic_types.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -12,45 +12,9 @@
 #include <cstdarg>
 
 #if defined( BOOST_USE_WINDOWS_H )
-# if !defined( BOOST_DETAIL_WIN_WINDOWS_H_INCLUDED )
-# include <windows.h>
-# define BOOST_DETAIL_WIN_WINDOWS_H_INCLUDED
-# endif
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- typedef BOOL BOOL_;
- typedef unsigned short WORD_;
- typedef DWORD DWORD_;
- typedef HANDLE HANDLE_;
- typedef LONG LONG_;
- typedef LONGLONG LONGLONG_;
- typedef LARGE_INTEGER LARGE_INTEGER_;
- typedef PLARGE_INTEGER PLARGE_INTEGER_;
- typedef void *PVOID_;
- typedef void *LPVOID_;
- typedef char CHAR_;
- typedef CHAR_ *LPSTR_;
- typedef const CHAR_ *LPCSTR_;
- typedef wchar_t WCHAR_;
- typedef WCHAR_ *LPWSTR_;
- typedef const WCHAR_ *LPCWSTR_;
-
-
-
-
- }
- }
-}
-
+# include <windows.h>
 #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
 # include <WinError.h>
-//# define WINAPI __stdcall
-
 // @FIXME Which condition must be tested
 # ifdef UNDER_CE
 # ifndef WINAPI
@@ -65,51 +29,73 @@
 # define WINAPI __stdcall
 # endif
 # endif
+#else
+# error "Win32 functions not available"
+#endif
 
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
- typedef int BOOL_;
- typedef unsigned short WORD_;
- typedef unsigned long DWORD_;
- typedef void* HANDLE_;
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ typedef ::BOOL BOOL_;
+ typedef ::WORD WORD_;
+ typedef ::DWORD DWORD_;
+ typedef ::HANDLE HANDLE_;
+ typedef ::LONG LONG_;
+ typedef ::LONGLONG LONGLONG_;
+ typedef ::ULONG_PTR ULONG_PTR_;
+ typedef ::LARGE_INTEGER LARGE_INTEGER_;
+ typedef ::PLARGE_INTEGER PLARGE_INTEGER_;
+ typedef ::PVOID PVOID_;
+ typedef ::LPVOID LPVOID_;
+ typedef ::CHAR CHAR_;
+ typedef ::LPSTR LPSTR_;
+ typedef ::LPCSTR *LPCSTR_;
+ typedef ::WCHAR WCHAR_;
+ typedef ::LPWSTR LPWSTR_;
+ typedef ::LPCWSTR LPCWSTR_;
+#else
+extern "C" {
+ typedef int BOOL_;
+ typedef unsigned short WORD_;
+ typedef unsigned long DWORD_;
+ typedef void* HANDLE_;
 
- typedef long LONG_;
+ typedef long LONG_;
 
 // @FIXME Which condition must be tested
-// #if !defined(_M_IX86)
- typedef __int64 LONGLONG_;
-// #else
-// typedef double LONGLONG_;
-// #endif
-
- typedef struct _LARGE_INTEGER {
- LONGLONG_ QuadPart;
- } LARGE_INTEGER_;
- typedef LARGE_INTEGER_ *PLARGE_INTEGER_;
-
- typedef void *PVOID_;
- typedef void *LPVOID_;
- typedef const void *LPCVOID_;
-
- typedef char CHAR_;
- typedef CHAR_ *LPSTR_;
- typedef const CHAR_ *LPCSTR_;
-
- typedef wchar_t WCHAR_;
- typedef WCHAR_ *LPWSTR_;
- typedef const WCHAR_ *LPCWSTR_;
-
- }
- }
- }
+// #if !defined(_M_IX86)
+ typedef __int64 LONGLONG_;
+// #else
+// typedef double LONGLONG_;
+// #endif
+
+# ifdef _WIN64
+ typedef unsigned __int64 ULONG_PTR_;
+# else
+ typedef unsigned long ULONG_PTR_;
+# endif
+
+ typedef struct _LARGE_INTEGER {
+ LONGLONG_ QuadPart;
+ } LARGE_INTEGER_;
+ typedef LARGE_INTEGER_ *PLARGE_INTEGER_;
+
+ typedef void *PVOID_;
+ typedef void *LPVOID_;
+ typedef const void *LPCVOID_;
+
+ typedef char CHAR_;
+ typedef CHAR_ *LPSTR_;
+ typedef const CHAR_ *LPCSTR_;
+
+ typedef wchar_t WCHAR_;
+ typedef WCHAR_ *LPWSTR_;
+ typedef const WCHAR_ *LPCWSTR_;
+
 }
-#else
-# error "Win32 functions not available"
 #endif
+}
+}
+}
 #endif // BOOST_DETAIL_WIN_TIME_HPP

Modified: sandbox/chrono/boost/detail/win/error_handling.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/error_handling.hpp (original)
+++ sandbox/chrono/boost/detail/win/error_handling.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// system.hpp --------------------------------------------------------------//
+// error_handling.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -12,97 +12,78 @@
 #include <boost/detail/win/basic_types.hpp>
 #include <boost/detail/win/GetCurrentThread.hpp>
 
-#if defined( BOOST_USE_WINDOWS_H )
 
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- using ::FormatMessageA;
- using ::FormatMessageW;
-
- const int FORMAT_MESSAGE_ALLOCATE_BUFFER_= FORMAT_MESSAGE_ALLOCATE_BUFFER;
- const int FORMAT_MESSAGE_IGNORE_INSERTS_= FORMAT_MESSAGE_IGNORE_INSERTS;
- const int FORMAT_MESSAGE_FROM_STRING_= FORMAT_MESSAGE_FROM_STRING;
- const int FORMAT_MESSAGE_FROM_HMODULE_= FORMAT_MESSAGE_FROM_HMODULE;
- const int FORMAT_MESSAGE_FROM_SYSTEM_= FORMAT_MESSAGE_FROM_SYSTEM;
- const int FORMAT_MESSAGE_ARGUMENT_ARRAY_= FORMAT_MESSAGE_ARGUMENT_ARRAY;
- const int FORMAT_MESSAGE_MAX_WIDTH_MASK_= FORMAT_MESSAGE_MAX_WIDTH_MASK;
-
- const char LANG_NEUTRAL_= LANG_NEUTRAL;
- const char LANG_INVARIANT_= LANG_INVARIANT;
-
- const char SUBLANG_DEFAULT_= SUBLANG_DEFAULT; // user default
- inline WORD_ MAKELANGID_(WORD_ p, WORD_ s) {
- return MAKELANGID(p,s);
- }
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ using ::FormatMessageA;
+ using ::FormatMessageW;
 
- }
+ const int FORMAT_MESSAGE_ALLOCATE_BUFFER_= FORMAT_MESSAGE_ALLOCATE_BUFFER;
+ const int FORMAT_MESSAGE_IGNORE_INSERTS_= FORMAT_MESSAGE_IGNORE_INSERTS;
+ const int FORMAT_MESSAGE_FROM_STRING_= FORMAT_MESSAGE_FROM_STRING;
+ const int FORMAT_MESSAGE_FROM_HMODULE_= FORMAT_MESSAGE_FROM_HMODULE;
+ const int FORMAT_MESSAGE_FROM_SYSTEM_= FORMAT_MESSAGE_FROM_SYSTEM;
+ const int FORMAT_MESSAGE_ARGUMENT_ARRAY_= FORMAT_MESSAGE_ARGUMENT_ARRAY;
+ const int FORMAT_MESSAGE_MAX_WIDTH_MASK_= FORMAT_MESSAGE_MAX_WIDTH_MASK;
+
+ const char LANG_NEUTRAL_= LANG_NEUTRAL;
+ const char LANG_INVARIANT_= LANG_INVARIANT;
+
+ const char SUBLANG_DEFAULT_= SUBLANG_DEFAULT; // user default
+ inline WORD_ MAKELANGID_(WORD_ p, WORD_ s) {
+ return MAKELANGID(p,s);
     }
-}
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
-
- // using ::FormatMessageA;
- __declspec(dllimport)
- DWORD_
- WINAPI
- FormatMessageA(
- DWORD_ dwFlags,
- LPCVOID_ lpSource,
- DWORD_ dwMessageId,
- DWORD_ dwLanguageId,
- LPSTR_ lpBuffer,
- DWORD_ nSize,
- va_list *Arguments
- );
-
- // using ::FormatMessageW;
- __declspec(dllimport)
- DWORD_
- WINAPI
- FormatMessageW(
- DWORD_ dwFlags,
- LPCVOID_ lpSource,
- DWORD_ dwMessageId,
- DWORD_ dwLanguageId,
- LPWSTR_ lpBuffer,
- DWORD_ nSize,
- va_list *Arguments
- );
-
- const int FORMAT_MESSAGE_ALLOCATE_BUFFER_= 0x00000100;
- const int FORMAT_MESSAGE_IGNORE_INSERTS_= 0x00000200;
- const int FORMAT_MESSAGE_FROM_STRING_= 0x00000400;
- const int FORMAT_MESSAGE_FROM_HMODULE_= 0x00000800;
- const int FORMAT_MESSAGE_FROM_SYSTEM_= 0x00001000;
- const int FORMAT_MESSAGE_ARGUMENT_ARRAY_= 0x00002000;
- const int FORMAT_MESSAGE_MAX_WIDTH_MASK_= 0x000000FF;
-
- const char LANG_NEUTRAL_= 0x00;
- const char LANG_INVARIANT_= 0x7f;
-
- const char SUBLANG_DEFAULT_= 0x01; // user default
- inline WORD_ MAKELANGID_(WORD_ p, WORD_ s) {
- return ((((WORD_ )(s)) << 10) | (WORD_ )(p));
- }
-
- }
- }
+#else
+extern "C" {
+ // using ::FormatMessageA;
+ __declspec(dllimport)
+ DWORD_
+ WINAPI
+ FormatMessageA(
+ DWORD_ dwFlags,
+ LPCVOID_ lpSource,
+ DWORD_ dwMessageId,
+ DWORD_ dwLanguageId,
+ LPSTR_ lpBuffer,
+ DWORD_ nSize,
+ va_list *Arguments
+ );
+
+ // using ::FormatMessageW;
+ __declspec(dllimport)
+ DWORD_
+ WINAPI
+ FormatMessageW(
+ DWORD_ dwFlags,
+ LPCVOID_ lpSource,
+ DWORD_ dwMessageId,
+ DWORD_ dwLanguageId,
+ LPWSTR_ lpBuffer,
+ DWORD_ nSize,
+ va_list *Arguments
+ );
+
+ const int FORMAT_MESSAGE_ALLOCATE_BUFFER_= 0x00000100;
+ const int FORMAT_MESSAGE_IGNORE_INSERTS_= 0x00000200;
+ const int FORMAT_MESSAGE_FROM_STRING_= 0x00000400;
+ const int FORMAT_MESSAGE_FROM_HMODULE_= 0x00000800;
+ const int FORMAT_MESSAGE_FROM_SYSTEM_= 0x00001000;
+ const int FORMAT_MESSAGE_ARGUMENT_ARRAY_= 0x00002000;
+ const int FORMAT_MESSAGE_MAX_WIDTH_MASK_= 0x000000FF;
+
+ const char LANG_NEUTRAL_= 0x00;
+ const char LANG_INVARIANT_= 0x7f;
+
+ const char SUBLANG_DEFAULT_= 0x01; // user default
+ inline WORD_ MAKELANGID_(WORD_ p, WORD_ s) {
+ return ((((WORD_ )(s)) << 10) | (WORD_ )(p));
     }
+
 }
-#else
-# error "Win32 functions not available"
 #endif
+}
+}
+}
 #endif // BOOST_DETAIL_WIN_ERROR_HANDLING_HPP

Modified: sandbox/chrono/boost/detail/win/process.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/process.hpp (original)
+++ sandbox/chrono/boost/detail/win/process.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// process.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -12,4 +12,22 @@
 #include <boost/detail/win/basic_types.hpp>
 #include <boost/detail/win/GetCurrentProcess.hpp>
 
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ using ::GetCurrentProcessId;
+#else
+# ifndef UNDER_CE
+extern "C" {
+ __declspec(dllimport) unsigned long __stdcall
+ GetCurrentProcessId(void);
+}
+# else
+ using ::GetCurrentProcessId;
+# endif
+#endif
+}
+}
+}
 #endif // BOOST_DETAIL_WIN_PROCESS_HPP

Modified: sandbox/chrono/boost/detail/win/system.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/system.hpp (original)
+++ sandbox/chrono/boost/detail/win/system.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -12,111 +12,39 @@
 #include <cstdarg>
 
 #include <boost/detail/win/basic_types.hpp>
+extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *);
 
+namespace boost {
+namespace detail {
+namespace win32 {
 #if defined( BOOST_USE_WINDOWS_H )
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- typedef HANDLE_ HLOCAL_;
-
- using ::LocalFree;
- using ::FormatMessageA;
- using ::FormatMessageW;
-
- const int FORMAT_MESSAGE_ALLOCATE_BUFFER_= FORMAT_MESSAGE_ALLOCATE_BUFFER;
- const int FORMAT_MESSAGE_IGNORE_INSERTS_= FORMAT_MESSAGE_IGNORE_INSERTS;
- const int FORMAT_MESSAGE_FROM_STRING_= FORMAT_MESSAGE_FROM_STRING;
- const int FORMAT_MESSAGE_FROM_HMODULE_= FORMAT_MESSAGE_FROM_HMODULE;
- const int FORMAT_MESSAGE_FROM_SYSTEM_= FORMAT_MESSAGE_FROM_SYSTEM;
- const int FORMAT_MESSAGE_ARGUMENT_ARRAY_= FORMAT_MESSAGE_ARGUMENT_ARRAY;
- const int FORMAT_MESSAGE_MAX_WIDTH_MASK_= FORMAT_MESSAGE_MAX_WIDTH_MASK;
-
- const char LANG_NEUTRAL_= LANG_NEUTRAL;
- const char LANG_INVARIANT_= LANG_INVARIANT;
-
- const char SUBLANG_DEFAULT_= SUBLANG_DEFAULT; // user default
- inline WORD_ MAKELANGID_(WORD_ p, WORD_ s) {
- return MAKELANGID(p,s);
- }
-
- }
- }
-}
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
- typedef HANDLE_ HLOCAL_;
-
-
- // using ::LocalFree;
- __declspec(dllimport)
- HLOCAL_
- WINAPI
- LocalFree(
- HLOCAL_ hMem
- );
-
- // using ::FormatMessageA;
- __declspec(dllimport)
- DWORD_
- WINAPI
- FormatMessageA(
- DWORD_ dwFlags,
- LPCVOID_ lpSource,
- DWORD_ dwMessageId,
- DWORD_ dwLanguageId,
- LPSTR_ lpBuffer,
- DWORD_ nSize,
- va_list *Arguments
- );
-
- // using ::FormatMessageW;
- __declspec(dllimport)
- DWORD_
- WINAPI
- FormatMessageW(
- DWORD_ dwFlags,
- LPCVOID_ lpSource,
- DWORD_ dwMessageId,
- DWORD_ dwLanguageId,
- LPWSTR_ lpBuffer,
- DWORD_ nSize,
- va_list *Arguments
- );
-
- const int FORMAT_MESSAGE_ALLOCATE_BUFFER_= 0x00000100;
- const int FORMAT_MESSAGE_IGNORE_INSERTS_= 0x00000200;
- const int FORMAT_MESSAGE_FROM_STRING_= 0x00000400;
- const int FORMAT_MESSAGE_FROM_HMODULE_= 0x00000800;
- const int FORMAT_MESSAGE_FROM_SYSTEM_= 0x00001000;
- const int FORMAT_MESSAGE_ARGUMENT_ARRAY_= 0x00002000;
- const int FORMAT_MESSAGE_MAX_WIDTH_MASK_= 0x000000FF;
-
- const char LANG_NEUTRAL_= 0x00;
- const char LANG_INVARIANT_= 0x7f;
-
- const char SUBLANG_DEFAULT_= 0x01; // user default
- inline WORD_ MAKELANGID_(WORD_ p, WORD_ s) {
- return ((((WORD_ )(s)) << 10) | (WORD_ )(p));
- }
-
- }
- }
- }
-}
+ typedef ::SYSTEM_INFO SYSTEM_INFO_;
 #else
-# error "Win32 functions not available"
+extern "C" {
+ typedef struct _SYSTEM_INFO {
+ union {
+ DWORD_ dwOemId;
+ struct {
+ WORD_ wProcessorArchitecture;
+ WORD_ wReserved;
+ } dummy;
+ } ;
+ DWORD_ dwPageSize;
+ LPVOID_ lpMinimumApplicationAddress;
+ LPVOID_ lpMaximumApplicationAddress;
+ DWORD_PTR_ dwActiveProcessorMask;
+ DWORD_ dwNumberOfProcessors;
+ DWORD_ dwProcessorType;
+ DWORD_ dwAllocationGranularity;
+ WORD_ wProcessorLevel;
+ WORD_ wProcessorRevision;
+ } SYSTEM_INFO_;
+
+ __declspec(dllimport) void __stdcall
+ GetSystemInfo (struct system_info *);
+}
 #endif
+}
+}
+}
 #endif // BOOST_DETAIL_WIN_TIME_HPP

Modified: sandbox/chrono/boost/detail/win/thread.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/thread.hpp (original)
+++ sandbox/chrono/boost/detail/win/thread.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// thread.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -12,4 +12,34 @@
 #include <boost/detail/win/basic_types.hpp>
 #include <boost/detail/win/GetCurrentThread.hpp>
 
+namespace boost
+{
+namespace detail
+{
+namespace win32
+{
+#if defined( BOOST_USE_WINDOWS_H )
+ using ::GetCurrentThreadId;
+ using ::SleepEx;
+ using ::Sleep;
+#else
+extern "C" {
+# ifndef UNDER_CE
+ __declspec(dllimport) unsigned long __stdcall
+ GetCurrentThreadId(void);
+ __declspec(dllimport) unsigned long __stdcall
+ SleepEx(unsigned long,int);
+ __declspec(dllimport) void __stdcall
+ Sleep(unsigned long);
+#else
+ using ::GetCurrentThreadId;
+ using ::SleepEx;
+ using ::Sleep;
+#endif
+}
+#endif
+}
+}
+}
+
 #endif // BOOST_DETAIL_WIN_THREAD_HPP

Modified: sandbox/chrono/boost/detail/win/time.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/time.hpp (original)
+++ sandbox/chrono/boost/detail/win/time.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -20,16 +20,46 @@
     typedef PFILETIME PFILETIME_;
     typedef LPFILETIME LPFILETIME_;
 
+ typedef SYSTEMTIME SYSTEMTIME_;
+ typedef SYSTEMTIME* PSYSTEMTIME_;
+
     using ::GetSystemTimeAsFileTime;
+ using ::FileTimeToLocalFileTime;
+ using ::GetSystemTime;
+ using ::SystemTimeToFileTime;
+ using ::GetTickCount;
+
 #else
- extern "C" typedef struct _FILETIME {
+extern "C" {
+ typedef struct _FILETIME {
         DWORD_ dwLowDateTime;
         DWORD_ dwHighDateTime;
     } FILETIME_, *PFILETIME_, *LPFILETIME_;
 
- extern "C" __declspec(dllimport) void WINAPI
- GetSystemTimeAsFileTime(FILETIME_* lpFileTime);
+ typedef struct _SYSTEMTIME {
+ WORD_ wYear;
+ WORD_ wMonth;
+ WORD_ wDayOfWeek;
+ WORD_ wDay;
+ WORD_ wHour;
+ WORD_ wMinute;
+ WORD_ wSecond;
+ WORD_ wMilliseconds;
+ } SYSTEMTIME_, *PSYSTEMTIME_;
 
+ __declspec(dllimport) void WINAPI
+ GetSystemTimeAsFileTime(FILETIME_* lpFileTime);
+ __declspec(dllimport) int WINAPI
+ FileTimeToLocalFileTime(const FILETIME_* lpFileTime,
+ FILETIME_* lpLocalFileTime);
+ __declspec(dllimport) void WINAPI
+ GetSystemTime(SYSTEMTIME_* lpSystemTime);
+ __declspec(dllimport) int WINAPI
+ SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime,
+ FILETIME_* lpFileTime);
+ __declspec(dllimport) unsigned long __stdcall
+ GetTickCount();
+}
 #endif
 }
 }

Modified: sandbox/chrono/boost/detail/win/timers.hpp
==============================================================================
--- sandbox/chrono/boost/detail/win/timers.hpp (original)
+++ sandbox/chrono/boost/detail/win/timers.hpp 2010-10-20 12:58:49 EDT (Wed, 20 Oct 2010)
@@ -1,4 +1,4 @@
-// time.hpp --------------------------------------------------------------//
+// timers.hpp --------------------------------------------------------------//
 
 // Copyright 2010 Vicente J. Botet Escriba
 
@@ -22,15 +22,17 @@
     using ::QueryPerformanceCounter;
     using ::QueryPerformanceFrequency;
 #else
- extern "C" __declspec(dllimport) BOOL_ WINAPI
+extern "C" {
+ __declspec(dllimport) BOOL_ WINAPI
         QueryPerformanceCounter(
             LARGE_INTEGER_ *lpPerformanceCount
         );
 
- extern "C" __declspec(dllimport) BOOL_ WINAPI
+ __declspec(dllimport) BOOL_ WINAPI
         QueryPerformanceFrequency(
             LARGE_INTEGER_ *lpFrequency
         );
+}
 #endif
 }
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk