|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66042 - sandbox/chrono/boost/detail/win
From: vicente.botet_at_[hidden]
Date: 2010-10-17 15:39:20
Author: viboes
Date: 2010-10-17 15:39:17 EDT (Sun, 17 Oct 2010)
New Revision: 66042
URL: http://svn.boost.org/trac/boost/changeset/66042
Log:
Chrono: Split boost/detail/win/time.hpp is several files
Added:
sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp (contents, props changed)
sandbox/chrono/boost/detail/win/GetCurrentThread.hpp (contents, props changed)
sandbox/chrono/boost/detail/win/GetLastError.hpp (contents, props changed)
sandbox/chrono/boost/detail/win/basic_types.hpp (contents, props changed)
sandbox/chrono/boost/detail/win/system.hpp (contents, props changed)
Text files modified:
sandbox/chrono/boost/detail/win/time.hpp | 72 +++------------------------------------
1 files changed, 6 insertions(+), 66 deletions(-)
Added: sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/GetCurrentProcess.hpp 2010-10-17 15:39:17 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,83 @@
+// 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_GETCURRENT_PROCESS_HPP
+#define BOOST_DETAIL_WIN_GETCURRENT_PROCESS_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
+ {
+ using ::GetCurrentProcess;
+ }
+ }
+}
+
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+# include <WinError.h>
+//# define WINAPI __stdcall
+
+// @FIXME Which condition must be tested
+# ifdef UNDER_CE
+# ifndef WINAPI
+# ifndef _WIN32_WCE_EMULATION
+# define WINAPI __cdecl // Note this doesn't match the desktop definition
+# else
+# define WINAPI __stdcall
+# endif
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+
+# ifdef __cplusplus
+}
+# endif
+# else
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
+# endif
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ extern "C"
+ {
+
+// using ::GetCurrentProcess;
+ __declspec(dllimport)
+ HANDLE_
+ WINAPI
+ GetCurrentProcess();
+
+ }
+ }
+ }
+}
+#else
+# error "Win32 functions not available"
+#endif
+#endif // BOOST_DETAIL_WIN_TIME_HPP
Added: sandbox/chrono/boost/detail/win/GetCurrentThread.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/GetCurrentThread.hpp 2010-10-17 15:39:17 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,86 @@
+// 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_GETCURRENTTHREAD_HPP
+#define BOOST_DETAIL_WIN_GETCURRENTTHREAD_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
+ {
+
+ using ::GetCurrentThread;
+
+ }
+ }
+}
+
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+# include <WinError.h>
+//# define WINAPI __stdcall
+
+// @FIXME Which condition must be tested
+# ifdef UNDER_CE
+# ifndef WINAPI
+# ifndef _WIN32_WCE_EMULATION
+# define WINAPI __cdecl // Note this doesn't match the desktop definition
+# else
+# define WINAPI __stdcall
+# endif
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+
+# ifdef __cplusplus
+}
+# endif
+# else
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
+# endif
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ extern "C"
+ {
+
+// using ::GetCurrentThread;
+ __declspec(dllimport)
+ HANDLE_
+ WINAPI
+ GetCurrentThread();
+
+
+ }
+ }
+ }
+}
+#else
+# error "Win32 functions not available"
+#endif
+#endif // BOOST_DETAIL_WIN_TIME_HPP
Added: sandbox/chrono/boost/detail/win/GetLastError.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/GetLastError.hpp 2010-10-17 15:39:17 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,85 @@
+// 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_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 )
+# 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__ )
+# include <WinError.h>
+//# define WINAPI __stdcall
+
+// @FIXME Which condition must be tested
+# ifdef UNDER_CE
+# ifndef WINAPI
+# ifndef _WIN32_WCE_EMULATION
+# define WINAPI __cdecl // Note this doesn't match the desktop definition
+# else
+# define WINAPI __stdcall
+# endif
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+
+# ifdef __cplusplus
+}
+# endif
+# else
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
+# endif
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ extern "C"
+ {
+
+// using ::GetLastError;
+ __declspec(dllimport)
+ DWORD_
+ WINAPI
+ GetLastError();
+
+ }
+ }
+ }
+}
+#else
+# error "Win32 functions not available"
+#endif
+#endif // BOOST_DETAIL_WIN_TIME_HPP
Added: sandbox/chrono/boost/detail/win/basic_types.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/basic_types.hpp 2010-10-17 15:39:17 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,136 @@
+// 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_BASIC_TYPES_HPP
+#define BOOST_DETAIL_WIN_BASIC_TYPES_HPP
+#include <boost/config.hpp>
+#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_;
+
+
+
+
+ }
+ }
+}
+
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+# include <WinError.h>
+//# define WINAPI __stdcall
+
+// @FIXME Which condition must be tested
+# ifdef UNDER_CE
+# ifndef WINAPI
+# ifndef _WIN32_WCE_EMULATION
+# define WINAPI __cdecl // Note this doesn't match the desktop definition
+# else
+# define WINAPI __stdcall
+# endif
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+
+# ifdef __cplusplus
+}
+# endif
+# else
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
+# endif
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ extern "C"
+ {
+ typedef int BOOL_;
+ typedef unsigned short WORD_;
+ typedef unsigned long DWORD_;
+ typedef void* HANDLE_;
+
+ typedef long LONG_;
+
+// @FIXME Which condition must be tested
+// #if !defined(_M_IX86)
+ typedef __int64 LONGLONG_;
+// #else
+// typedef double LONGLONG_;
+// #endif
+
+// typedef union _LARGE_INTEGER_ {
+//// struct {
+//// DWORD_ LowPart;
+//// LONG_ HighPart;
+//// } ;
+// struct {
+// DWORD_ LowPart;
+// LONG_ HighPart;
+// } u;
+// LONGLONG_ QuadPart;
+// } LARGE_INTEGER_, *PLARGE_INTEGER_;
+ 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
Added: sandbox/chrono/boost/detail/win/system.hpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/boost/detail/win/system.hpp 2010-10-17 15:39:17 EDT (Sun, 17 Oct 2010)
@@ -0,0 +1,153 @@
+// 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_SYSTEM_HPP
+#define BOOST_DETAIL_WIN_SYSTEM_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 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__ )
+# include <WinError.h>
+//# define WINAPI __stdcall
+
+// @FIXME Which condition must be tested
+# ifdef UNDER_CE
+# ifndef WINAPI
+# ifndef _WIN32_WCE_EMULATION
+# define WINAPI __cdecl // Note this doesn't match the desktop definition
+# else
+# define WINAPI __stdcall
+# endif
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+
+# ifdef __cplusplus
+}
+# endif
+# else
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
+# endif
+
+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));
+ }
+
+ }
+ }
+ }
+}
+#else
+# error "Win32 functions not available"
+#endif
+#endif // BOOST_DETAIL_WIN_TIME_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 15:39:17 EDT (Sun, 17 Oct 2010)
@@ -9,6 +9,8 @@
#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 )
@@ -22,29 +24,16 @@
{
namespace win32
{
- typedef BOOL BOOL_;
- typedef DWORD DWORD_;
- typedef HANDLE HANDLE_;
- typedef LONG LONG_;
- typedef LONGLONG LONGLONG_;
- typedef LARGE_INTEGER LARGE_INTEGER_;
- typedef PLARGE_INTEGER PLARGE_INTEGER_;
typedef FILETIME FILETIME_;
typedef PFILETIME PFILETIME_;
-
- using ::GetLastError;
- using ::GetCurrentProcess;
- using ::GetCurrentThread;
-
+
using ::GetProcessTimes;
using ::GetSystemTimeAsFileTime;
using ::GetThreadTimes;
using ::QueryPerformanceCounter;
using ::QueryPerformanceFrequency;
-
- static const DWORD ERROR_NOT_SUPPORTED_ = ERROR_NOT_SUPPORTED;
-
+
}
}
}
@@ -86,60 +75,12 @@
{
extern "C"
{
- typedef int BOOL_;
-
- typedef unsigned long DWORD_;
-
- typedef void* HANDLE_;
-
- typedef long LONG_;
-
-// @FIXME Which condition must be tested
-// #if !defined(_M_IX86)
- typedef __int64 LONGLONG_;
-// #else
-// typedef double LONGLONG_;
-// #endif
-
-// typedef union _LARGE_INTEGER_ {
-//// struct {
-//// DWORD_ LowPart;
-//// LONG_ HighPart;
-//// } ;
-// struct {
-// DWORD_ LowPart;
-// LONG_ HighPart;
-// } u;
-// LONGLONG_ QuadPart;
-// } LARGE_INTEGER_, *PLARGE_INTEGER_;
- typedef struct _LARGE_INTEGER {
- LONGLONG_ QuadPart;
- } LARGE_INTEGER_;
- typedef LARGE_INTEGER_ *PLARGE_INTEGER_;
typedef struct _FILETIME {
DWORD_ dwLowDateTime;
DWORD_ dwHighDateTime;
} FILETIME_, *PFILETIME_, *LPFILETIME_;
-// using ::GetLastError;
- __declspec(dllimport)
- DWORD_
- WINAPI
- GetLastError();
-
-// using ::GetCurrentProcess;
- __declspec(dllimport)
- HANDLE_
- WINAPI
- GetCurrentProcess();
-
-// using ::GetCurrentThread;
- __declspec(dllimport)
- HANDLE_
- WINAPI
- GetCurrentThread();
-
// using ::GetProcessTimes;
__declspec(dllimport)
BOOL_
@@ -170,7 +111,6 @@
LPFILETIME_ lpUserTime
);
-
// using ::QueryPerformanceCounter;
__declspec(dllimport)
BOOL_
@@ -185,8 +125,8 @@
WINAPI
QueryPerformanceFrequency(
LARGE_INTEGER_ *lpFrequency
- );
-
+ );
+
}
}
}
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