|
Packit Service |
fa4841 |
/**
|
|
Packit Service |
fa4841 |
* WinPR: Windows Portable Runtime
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit Service |
fa4841 |
* you may not use this file except in compliance with the License.
|
|
Packit Service |
fa4841 |
* You may obtain a copy of the License at
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit Service |
fa4841 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit Service |
fa4841 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit Service |
fa4841 |
* See the License for the specific language governing permissions and
|
|
Packit Service |
fa4841 |
* limitations under the License.
|
|
Packit Service |
fa4841 |
*/
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#ifndef WINPR_H
|
|
Packit Service |
fa4841 |
#define WINPR_H
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#include <winpr/platform.h>
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#ifdef WINPR_DLL
|
|
Packit Service |
fa4841 |
#if defined _WIN32 || defined __CYGWIN__
|
|
Packit Service |
fa4841 |
#ifdef WINPR_EXPORTS
|
|
Packit Service |
fa4841 |
#ifdef __GNUC__
|
|
Packit Service |
fa4841 |
#define WINPR_API __attribute__((dllexport))
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#define WINPR_API __declspec(dllexport)
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#ifdef __GNUC__
|
|
Packit Service |
fa4841 |
#define WINPR_API __attribute__((dllimport))
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#define WINPR_API __declspec(dllimport)
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#if __GNUC__ >= 4
|
|
Packit Service |
b1ea74 |
#define WINPR_API __attribute__((visibility("default")))
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#define WINPR_API
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
#else /* WINPR_DLL */
|
|
Packit Service |
b1ea74 |
#define WINPR_API
|
|
Packit Service |
b1ea74 |
#endif
|
|
Packit Service |
b1ea74 |
|
|
Packit Service |
b1ea74 |
#if defined(WIN32) && !defined(__CYGWIN__)
|
|
Packit Service |
b1ea74 |
#define WINPR_DEPRECATED(obj) __declspec(deprecated) obj
|
|
Packit Service |
b1ea74 |
#elif defined(__GNUC__)
|
|
Packit Service |
b1ea74 |
#define WINPR_DEPRECATED(obj) obj __attribute__((deprecated))
|
|
Packit Service |
b1ea74 |
#else
|
|
Packit Service |
b1ea74 |
#define WINPR_DEPRECATED(obj) obj
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
/* Thread local storage keyword define */
|
|
Packit Service |
fa4841 |
#if defined _WIN32 || defined __CYGWIN__
|
|
Packit Service |
fa4841 |
#ifdef __GNUC__
|
|
Packit Service |
fa4841 |
#define WINPR_TLS __thread
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#define WINPR_TLS __declspec(thread)
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
#elif !defined(__IOS__)
|
|
Packit Service |
fa4841 |
#define WINPR_TLS __thread
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
fa4841 |
#warning "Target iOS does not support Thread Local Storage!"
|
|
Packit Service |
fa4841 |
#warning "Multi Instance support is disabled!"
|
|
Packit Service |
fa4841 |
#define WINPR_TLS
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#ifdef _WIN32
|
|
Packit Service |
b1ea74 |
#define INLINE __inline
|
|
Packit Service |
fa4841 |
#else
|
|
Packit Service |
b1ea74 |
#define INLINE inline
|
|
Packit Service |
fa4841 |
#endif
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
WINPR_API void winpr_get_version(int* major, int* minor, int* revision);
|
|
Packit Service |
fa4841 |
WINPR_API const char* winpr_get_version_string(void);
|
|
Packit Service |
fa4841 |
WINPR_API const char* winpr_get_build_date(void);
|
|
Packit Service |
fa4841 |
WINPR_API const char* winpr_get_build_revision(void);
|
|
Packit Service |
fa4841 |
WINPR_API const char* winpr_get_build_config(void);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#define WINPR_UNUSED(x) (void)(x)
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#endif /* WINPR_H */
|