Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66053 - sandbox/chrono/boost/detail/win
From: vicente.botet_at_[hidden]
Date: 2010-10-17 17:06:22


Author: viboes
Date: 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
New Revision: 66053
URL: http://svn.boost.org/trac/boost/changeset/66053

Log:
Chrono: Reorganize the filess following http://msdn.microsoft.com/en-us/library/ee663300%28v=VS.85%29.aspx

Added:
   sandbox/chrono/boost/detail/win/GetProcessTimes.hpp (contents, props changed)
   sandbox/chrono/boost/detail/win/GetThreadTimes.hpp (contents, props changed)
   sandbox/chrono/boost/detail/win/LocalFree.hpp (contents, props changed)
   sandbox/chrono/boost/detail/win/error_handling.hpp (contents, props changed)
   sandbox/chrono/boost/detail/win/process.hpp (contents, props changed)
   sandbox/chrono/boost/detail/win/thread.hpp (contents, props changed)
   sandbox/chrono/boost/detail/win/timers.hpp (contents, props changed)
Text files modified:
   sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp | 49 +++--------------
   sandbox/chrono/boost/detail/win/GetCurrentThread.hpp | 53 +++---------------
   sandbox/chrono/boost/detail/win/GetLastError.hpp | 3
   sandbox/chrono/boost/detail/win/system.hpp | 4 -
   sandbox/chrono/boost/detail/win/time.hpp | 112 +++++++--------------------------------
   5 files changed, 41 insertions(+), 180 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-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -8,49 +8,18 @@
 
 #ifndef BOOST_DETAIL_WIN_GETCURRENT_PROCESS_HPP
 #define BOOST_DETAIL_WIN_GETCURRENT_PROCESS_HPP
-#include <boost/config.hpp>
-#include <cstdarg>
+
 #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 ::GetCurrentProcess;
- }
- }
-}
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
-
-// using ::GetCurrentProcess;
- __declspec(dllimport)
- HANDLE_
- WINAPI
- GetCurrentProcess();
-
- }
- }
- }
-}
+ using ::GetCurrentProcess;
 #else
-# error "Win32 functions not available"
+ extern "C" __declspec(dllimport) HANDLE_ WINAPI GetCurrentProcess();
 #endif
+}
+}
+}
 #endif // BOOST_DETAIL_WIN_TIME_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-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -8,52 +8,19 @@
 
 #ifndef BOOST_DETAIL_WIN_GETCURRENTTHREAD_HPP
 #define BOOST_DETAIL_WIN_GETCURRENTTHREAD_HPP
-#include <boost/config.hpp>
-#include <cstdarg>
+
 #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 ::GetCurrentThread;
-
- }
- }
-}
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
-
-// using ::GetCurrentThread;
- __declspec(dllimport)
- HANDLE_
- WINAPI
- GetCurrentThread();
-
-
- }
- }
- }
-}
+ using ::GetCurrentThread;
 #else
-# error "Win32 functions not available"
+ extern "C" __declspec(dllimport) HANDLE_ WINAPI GetCurrentThread();
 #endif
+}
+}
+}
+
 #endif // BOOST_DETAIL_WIN_TIME_HPP

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-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -8,8 +8,7 @@
 
 #ifndef BOOST_DETAIL_WIN_GETLASTERROR_HPP
 #define BOOST_DETAIL_WIN_GETLASTERROR_HPP
-#include <boost/config.hpp>
-#include <cstdarg>
+
 #include <boost/detail/win/basic_types.hpp>
 
 #if defined( BOOST_USE_WINDOWS_H )

Added: sandbox/chrono/boost/detail/win/GetProcessTimes.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/GetProcessTimes.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,33 @@
+// time.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_GETPROCESSTIMES_HPP
+#define BOOST_DETAIL_WIN_GETPROCESSTIMES_HPP
+
+#include <boost/detail/win/time.hpp>
+
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ using ::GetProcessTimes;
+#else
+ extern "C" __declspec(dllimport) BOOL_ WINAPI
+ GetProcessTimes(
+ HANDLE_ hProcess,
+ LPFILETIME_ lpCreationTime,
+ LPFILETIME_ lpExitTime,
+ LPFILETIME_ lpKernelTime,
+ LPFILETIME_ lpUserTime
+ );
+#endif
+}
+}
+}
+
+#endif // BOOST_DETAIL_WIN_GETPROCESSTIMES_HPP

Added: sandbox/chrono/boost/detail/win/GetThreadTimes.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/GetThreadTimes.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,33 @@
+// time.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_GETTHREADTIMES_HPP
+#define BOOST_DETAIL_WIN_GETTHREADTIMES_HPP
+
+#include <boost/detail/win/time.hpp>
+
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ using ::GetThreadTimes;
+#else
+ extern "C" __declspec(dllimport) BOOL_ WINAPI
+ GetThreadTimes(
+ HANDLE_ hThread,
+ LPFILETIME_ lpCreationTime,
+ LPFILETIME_ lpExitTime,
+ LPFILETIME_ lpKernelTime,
+ LPFILETIME_ lpUserTime
+ );
+#endif
+}
+}
+}
+
+#endif // BOOST_DETAIL_WIN_GETTHREADTIMES_HPP

Added: sandbox/chrono/boost/detail/win/LocalFree.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/LocalFree.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,28 @@
+// time.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_LOCALFREE_HPP
+#define BOOST_DETAIL_WIN_LOCALFREE_HPP
+
+#include <boost/detail/win/basic_types.hpp>
+
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ typedef HANDLE_ HLOCAL_;
+
+ using ::LocalFree;
+#else
+ extern "C" typedef HANDLE_ HLOCAL_;
+ extern "C" __declspec(dllimport) HLOCAL_ WINAPI LocalFree(HLOCAL_ hMem);
+#endif
+}
+}
+}
+#endif // BOOST_DETAIL_WIN_LOCALFREE_HPP

Added: sandbox/chrono/boost/detail/win/error_handling.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/error_handling.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,108 @@
+// system.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_ERROR_HANDLING_HPP
+#define BOOST_DETAIL_WIN_ERROR_HANDLING_HPP
+
+#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);
+ }
+
+ }
+ }
+}
+
+#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
+# error "Win32 functions not available"
+#endif
+#endif // BOOST_DETAIL_WIN_ERROR_HANDLING_HPP

Added: sandbox/chrono/boost/detail/win/process.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/process.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,15 @@
+// time.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_PROCESS_HPP
+#define BOOST_DETAIL_WIN_PROCESS_HPP
+
+#include <boost/detail/win/basic_types.hpp>
+#include <boost/detail/win/GetCurrentProcess.hpp>
+
+#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-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -14,10 +14,6 @@
 #include <boost/detail/win/basic_types.hpp>
 
 #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
 {

Added: sandbox/chrono/boost/detail/win/thread.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/thread.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,15 @@
+// time.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_THREAD_HPP
+#define BOOST_DETAIL_WIN_THREAD_HPP
+
+#include <boost/detail/win/basic_types.hpp>
+#include <boost/detail/win/GetCurrentThread.hpp>
+
+#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-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -8,101 +8,31 @@
 
 #ifndef BOOST_DETAIL_WIN_TIME_HPP
 #define BOOST_DETAIL_WIN_TIME_HPP
-#include <boost/config.hpp>
-#include <cstdarg>
+
 #include <boost/detail/win/basic_types.hpp>
 
-#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 FILETIME FILETIME_;
- typedef PFILETIME PFILETIME_;
-
- using ::GetProcessTimes;
- using ::GetSystemTimeAsFileTime;
- using ::GetThreadTimes;
-
- using ::QueryPerformanceCounter;
- using ::QueryPerformanceFrequency;
- }
- }
-}
 
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+namespace boost {
+namespace detail {
+namespace win32 {
+#if defined( BOOST_USE_WINDOWS_H )
+ typedef FILETIME FILETIME_;
+ typedef PFILETIME PFILETIME_;
+ typedef LPFILETIME LPFILETIME_;
 
-namespace boost
-{
- namespace detail
- {
- namespace win32
- {
- extern "C"
- {
-
- typedef struct _FILETIME {
- DWORD_ dwLowDateTime;
- DWORD_ dwHighDateTime;
- } FILETIME_, *PFILETIME_, *LPFILETIME_;
-
-// using ::GetProcessTimes;
- __declspec(dllimport)
- BOOL_
- WINAPI
- GetProcessTimes(
- HANDLE_ hProcess,
- LPFILETIME_ lpCreationTime,
- LPFILETIME_ lpExitTime,
- LPFILETIME_ lpKernelTime,
- LPFILETIME_ lpUserTime
- );
-
-// using ::GetSystemTimeAsFileTime;
- __declspec(dllimport)
- void
- WINAPI
- GetSystemTimeAsFileTime(FILETIME_* lpFileTime);
-
-// using ::GetThreadTimes;
- __declspec(dllimport)
- BOOL_
- WINAPI
- GetThreadTimes(
- HANDLE_ hThread,
- LPFILETIME_ lpCreationTime,
- LPFILETIME_ lpExitTime,
- LPFILETIME_ lpKernelTime,
- LPFILETIME_ lpUserTime
- );
-
-// using ::QueryPerformanceCounter;
- __declspec(dllimport)
- BOOL_
- WINAPI
- QueryPerformanceCounter(
- LARGE_INTEGER_ *lpPerformanceCount
- );
-
-// using ::QueryPerformanceFrequency;
- __declspec(dllimport)
- BOOL_
- WINAPI
- QueryPerformanceFrequency(
- LARGE_INTEGER_ *lpFrequency
- );
- }
- }
- }
-}
+ using ::GetSystemTimeAsFileTime;
 #else
-# error "Win32 functions not available"
+ extern "C" typedef struct _FILETIME {
+ DWORD_ dwLowDateTime;
+ DWORD_ dwHighDateTime;
+ } FILETIME_, *PFILETIME_, *LPFILETIME_;
+
+ extern "C" __declspec(dllimport) void WINAPI
+ GetSystemTimeAsFileTime(FILETIME_* lpFileTime);
+
 #endif
+}
+}
+}
+
 #endif // BOOST_DETAIL_WIN_TIME_HPP

Added: sandbox/chrono/boost/detail/win/timers.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/timers.hpp 2010-10-17 17:06:16 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,39 @@
+// time.hpp --------------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WIN_TIMERS_HPP
+#define BOOST_DETAIL_WIN_TIMERS_HPP
+
+#include <boost/detail/win/basic_types.hpp>
+
+
+namespace boost
+{
+namespace detail
+{
+namespace win32
+{
+#if defined( BOOST_USE_WINDOWS_H )
+ using ::QueryPerformanceCounter;
+ using ::QueryPerformanceFrequency;
+#else
+ extern "C" __declspec(dllimport) BOOL_ WINAPI
+ QueryPerformanceCounter(
+ LARGE_INTEGER_ *lpPerformanceCount
+ );
+
+ extern "C" __declspec(dllimport) BOOL_ WINAPI
+ QueryPerformanceFrequency(
+ LARGE_INTEGER_ *lpFrequency
+ );
+#endif
+}
+}
+}
+
+#endif // BOOST_DETAIL_WIN_TIMERS_HPP


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