diff options
Diffstat (limited to 'cpp/src/qpid')
| -rw-r--r-- | cpp/src/qpid/amqp_0_10/built_in_types.h | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/client/SessionImpl.cpp | 1 | ||||
| -rw-r--r-- | cpp/src/qpid/framing/amqp_types.h | 15 | ||||
| -rwxr-xr-x | cpp/src/qpid/sys/IntegerTypes.h | 31 | ||||
| -rw-r--r-- | cpp/src/qpid/sys/ProtocolFactory.h | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/sys/Socket.h | 1 | ||||
| -rw-r--r-- | cpp/src/qpid/sys/Time.h | 2 | ||||
| -rwxr-xr-x | cpp/src/qpid/sys/posix/IntegerTypes.h | 26 | ||||
| -rwxr-xr-x | cpp/src/qpid/sys/windows/IntegerTypes.h | 40 |
9 files changed, 105 insertions, 15 deletions
diff --git a/cpp/src/qpid/amqp_0_10/built_in_types.h b/cpp/src/qpid/amqp_0_10/built_in_types.h index 7665d91736..769bedd54e 100644 --- a/cpp/src/qpid/amqp_0_10/built_in_types.h +++ b/cpp/src/qpid/amqp_0_10/built_in_types.h @@ -23,6 +23,7 @@ #include "qpid/Serializer.h" #include "qpid/framing/Uuid.h" +#include "qpid/sys/IntegerTypes.h" #include "qpid/sys/Time.h" #include "Decimal.h" #include "SerializableString.h" @@ -31,7 +32,6 @@ #include <string> #include <ostream> #include <vector> -#include <stdint.h> /**@file Mapping from built-in AMQP types to C++ types */ diff --git a/cpp/src/qpid/client/SessionImpl.cpp b/cpp/src/qpid/client/SessionImpl.cpp index 4575c45a35..3d73d92bd4 100644 --- a/cpp/src/qpid/client/SessionImpl.cpp +++ b/cpp/src/qpid/client/SessionImpl.cpp @@ -34,6 +34,7 @@ #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/log/Statement.h" +#include "qpid/sys/IntegerTypes.h" #include <boost/bind.hpp> diff --git a/cpp/src/qpid/framing/amqp_types.h b/cpp/src/qpid/framing/amqp_types.h index 8b10aa3069..97b889a7ca 100644 --- a/cpp/src/qpid/framing/amqp_types.h +++ b/cpp/src/qpid/framing/amqp_types.h @@ -26,17 +26,8 @@ * in AMQP messages. */ +#include "qpid/sys/IntegerTypes.h" #include <string> -#ifdef _WINDOWS -#include "windows.h" -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned __int64 uint64_t; -#endif -#ifndef _WINDOWS -#include <stdint.h> -#endif namespace qpid { namespace framing { @@ -53,7 +44,7 @@ typedef uint16_t ReplyCode; class Content; class FieldTable; class SequenceNumberSet; -class Uuid; +struct Uuid; // Useful constants @@ -66,7 +57,7 @@ class FramingContent; class FieldTable; class SequenceNumberSet; class SequenceSet; -class Uuid; +struct Uuid; }} // namespace qpid::framing #endif diff --git a/cpp/src/qpid/sys/IntegerTypes.h b/cpp/src/qpid/sys/IntegerTypes.h new file mode 100755 index 0000000000..89635f033e --- /dev/null +++ b/cpp/src/qpid/sys/IntegerTypes.h @@ -0,0 +1,31 @@ +#ifndef QPID_SYS_INTEGERTYPES_H +#define QPID_SYS_INTEGERTYPES_H + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * 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 + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +#if (defined(_WINDOWS) || defined (WIN32)) && defined(_MSC_VER) +#include "qpid/sys/windows/IntegerTypes.h" +#endif +#if !defined _WINDOWS && !defined WIN32 +#include "qpid/sys/posix/IntegerTypes.h" +#endif + +#endif /*!QPID_SYS_INTEGERTYPES_H*/ diff --git a/cpp/src/qpid/sys/ProtocolFactory.h b/cpp/src/qpid/sys/ProtocolFactory.h index 4aa14d2cf6..2a77adc9c4 100644 --- a/cpp/src/qpid/sys/ProtocolFactory.h +++ b/cpp/src/qpid/sys/ProtocolFactory.h @@ -22,7 +22,7 @@ * */ -#include <stdint.h> +#include "qpid/sys/IntegerTypes.h" #include "qpid/SharedObject.h" #include "ConnectionCodec.h" #include <boost/function.hpp> diff --git a/cpp/src/qpid/sys/Socket.h b/cpp/src/qpid/sys/Socket.h index dd7ef9a96d..ae48b8104d 100644 --- a/cpp/src/qpid/sys/Socket.h +++ b/cpp/src/qpid/sys/Socket.h @@ -23,6 +23,7 @@ */ #include "IOHandle.h" +#include "qpid/sys/IntegerTypes.h" #include <string> diff --git a/cpp/src/qpid/sys/Time.h b/cpp/src/qpid/sys/Time.h index 6501cd0806..27839e8eb3 100644 --- a/cpp/src/qpid/sys/Time.h +++ b/cpp/src/qpid/sys/Time.h @@ -22,7 +22,7 @@ * */ -#include <stdint.h> +#include "qpid/sys/IntegerTypes.h" #include <limits> #include <iosfwd> diff --git a/cpp/src/qpid/sys/posix/IntegerTypes.h b/cpp/src/qpid/sys/posix/IntegerTypes.h new file mode 100755 index 0000000000..ce97f7bde8 --- /dev/null +++ b/cpp/src/qpid/sys/posix/IntegerTypes.h @@ -0,0 +1,26 @@ +#ifndef QPID_SYS_POSIX_INTEGERTYPES_H +#define QPID_SYS_POSIX_INTEGERTYPES_H + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * 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 + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +#include <stdint.h> + +#endif /*!QPID_SYS_INTEGERTYPES_H*/ diff --git a/cpp/src/qpid/sys/windows/IntegerTypes.h b/cpp/src/qpid/sys/windows/IntegerTypes.h new file mode 100755 index 0000000000..80168fab88 --- /dev/null +++ b/cpp/src/qpid/sys/windows/IntegerTypes.h @@ -0,0 +1,40 @@ +#ifndef QPID_SYS_WINDOWS_INTEGERTYPES_H +#define QPID_SYS_WINDOWS_INTEGERTYPES_H + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * 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 + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +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; +typedef unsigned __int64 uint64_t; +typedef __int64 int64_t; + +// Visual Studio doesn't define other common types, so set them up here too. +typedef int pid_t; +typedef int socklen_t; +typedef unsigned int size_t; +typedef int ssize_t; +typedef unsigned int uint; + +#endif /*!QPID_SYS_WINDOWS_INTEGERTYPES_H*/ |
