diff options
Diffstat (limited to 'cpp/src/qpid/sys')
| -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 |
6 files changed, 100 insertions, 2 deletions
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*/ |
