diff options
| author | Stephen D. Huston <shuston@apache.org> | 2011-10-21 01:19:00 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2011-10-21 01:19:00 +0000 |
| commit | ebfd9ff053b04ab379acfc0fefedee5a31b6d8a5 (patch) | |
| tree | dcfb94e75656c6c239fc3dcb754cd2015126424d /cpp/include/qpid/sys | |
| parent | 5eb354b338bb8d8fcd35b6ac3fb33f8103e757c3 (diff) | |
| download | qpid-python-ebfd9ff053b04ab379acfc0fefedee5a31b6d8a5.tar.gz | |
Undo bad merge from trunk - merged at wrong level.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-2519@1187150 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include/qpid/sys')
| -rw-r--r-- | cpp/include/qpid/sys/ExceptionHolder.h | 13 | ||||
| -rwxr-xr-x | cpp/include/qpid/sys/IntegerTypes.h | 2 | ||||
| -rw-r--r-- | cpp/include/qpid/sys/Runnable.h | 2 | ||||
| -rw-r--r-- | cpp/include/qpid/sys/Thread.h | 6 | ||||
| -rw-r--r-- | cpp/include/qpid/sys/Time.h | 5 | ||||
| -rwxr-xr-x | cpp/include/qpid/sys/windows/IntegerTypes.h | 6 |
6 files changed, 13 insertions, 21 deletions
diff --git a/cpp/include/qpid/sys/ExceptionHolder.h b/cpp/include/qpid/sys/ExceptionHolder.h index 4bc934cf75..9eff1d64c7 100644 --- a/cpp/include/qpid/sys/ExceptionHolder.h +++ b/cpp/include/qpid/sys/ExceptionHolder.h @@ -10,9 +10,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,11 +42,14 @@ class ExceptionHolder : public Raisable { public: ExceptionHolder() {} // Use default copy & assign. - + /** Take ownership of ex */ template <class Ex> ExceptionHolder(Ex* ex) { wrap(ex); } - template <class Ex> ExceptionHolder& operator=(Ex* ex) { wrap(ex); return *this; } + template <class Ex> ExceptionHolder(const boost::shared_ptr<Ex>& ex) { wrap(ex.release()); } + template <class Ex> ExceptionHolder& operator=(Ex* ex) { wrap(ex); return *this; } + template <class Ex> ExceptionHolder& operator=(boost::shared_ptr<Ex> ex) { wrap(ex.release()); return *this; } + void raise() const { if (wrapper.get()) wrapper->raise() ; } std::string what() const { return wrapper.get() ? wrapper->what() : std::string(); } bool empty() const { return !wrapper.get(); } @@ -63,7 +66,7 @@ class ExceptionHolder : public Raisable { template <class Ex> void wrap(Ex* ex) { wrapper.reset(new Wrapper<Ex>(ex)); } boost::shared_ptr<Raisable> wrapper; }; - + }} // namespace qpid::sys diff --git a/cpp/include/qpid/sys/IntegerTypes.h b/cpp/include/qpid/sys/IntegerTypes.h index 75fa921de0..89635f033e 100755 --- a/cpp/include/qpid/sys/IntegerTypes.h +++ b/cpp/include/qpid/sys/IntegerTypes.h @@ -21,7 +21,7 @@ * */ -#if (defined(_WINDOWS) || defined (WIN32)) +#if (defined(_WINDOWS) || defined (WIN32)) && defined(_MSC_VER) #include "qpid/sys/windows/IntegerTypes.h" #endif #if !defined _WINDOWS && !defined WIN32 diff --git a/cpp/include/qpid/sys/Runnable.h b/cpp/include/qpid/sys/Runnable.h index fed7663cb6..0f1243a277 100644 --- a/cpp/include/qpid/sys/Runnable.h +++ b/cpp/include/qpid/sys/Runnable.h @@ -30,7 +30,7 @@ namespace sys { /** * Interface for objects that can be run, e.g. in a thread. */ -class QPID_COMMON_CLASS_EXTERN Runnable +class Runnable { public: /** Type to represent a runnable as a Functor */ diff --git a/cpp/include/qpid/sys/Thread.h b/cpp/include/qpid/sys/Thread.h index f556612908..45a39e796f 100644 --- a/cpp/include/qpid/sys/Thread.h +++ b/cpp/include/qpid/sys/Thread.h @@ -25,11 +25,7 @@ #include "qpid/CommonImportExport.h" #ifdef _WIN32 -# ifdef _MSC_VER -# define QPID_TSS __declspec(thread) -# else -# define QPID_TSS __thread -# endif +# define QPID_TSS __declspec(thread) #elif defined (__GNUC__) # define QPID_TSS __thread #elif defined (__SUNPRO_CC) diff --git a/cpp/include/qpid/sys/Time.h b/cpp/include/qpid/sys/Time.h index 9c5ac66e9a..d3ab832229 100644 --- a/cpp/include/qpid/sys/Time.h +++ b/cpp/include/qpid/sys/Time.h @@ -119,7 +119,7 @@ class Duration { friend class AbsTime; public: - QPID_COMMON_INLINE_EXTERN inline Duration(int64_t time0 = 0); + QPID_COMMON_EXTERN inline Duration(int64_t time0 = 0); QPID_COMMON_EXTERN explicit Duration(const AbsTime& start, const AbsTime& finish); inline operator int64_t() const; }; @@ -167,9 +167,6 @@ QPID_COMMON_EXTERN void usleep(uint64_t usecs); /** Output formatted date/time for now*/ void outputFormattedNow(std::ostream&); -/** Output unformatted nanosecond-resolution time for now */ -void outputHiresNow(std::ostream&); - }} #endif /*!_sys_Time_h*/ diff --git a/cpp/include/qpid/sys/windows/IntegerTypes.h b/cpp/include/qpid/sys/windows/IntegerTypes.h index 28b82da1a0..ece1a618e9 100755 --- a/cpp/include/qpid/sys/windows/IntegerTypes.h +++ b/cpp/include/qpid/sys/windows/IntegerTypes.h @@ -22,17 +22,13 @@ */ typedef unsigned char uint8_t; +typedef char int8_t; typedef unsigned short uint16_t; typedef short int16_t; typedef unsigned int uint32_t; typedef int int32_t; -#if defined(_MSC_VER) -typedef signed char int8_t; typedef unsigned __int64 uint64_t; typedef __int64 int64_t; -#else -#include <stdint.h> -#endif // Visual Studio doesn't define other common types, so set them up here too. typedef unsigned int uint; |
