CMPI 2.1.0 API
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
cmpios.h
Go to the documentation of this file.
1
/* ------------------------------------------------------------------------- */
2
/* */
3
/* Copyright (c) 2006-2015 The Open Group */
4
/* */
5
/* Permission is hereby granted, free of charge, to any person obtaining a */
6
/* copy of this software (the "Software"), to deal in the Software without */
7
/* restriction, including without limitation the rights to use, copy, */
8
/* modify, merge, publish, distribute, sublicense, and/or sell copies of */
9
/* the Software, and to permit persons to whom the Software is furnished */
10
/* to do so, subject to the following conditions: */
11
/* */
12
/* The above copyright notice and this permission notice shall be included */
13
/* in all copies or substantial portions of the Software. */
14
/* */
15
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
16
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
17
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
18
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
19
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
20
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR */
21
/* THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
22
/* */
23
/* ------------------------------------------------------------------------- */
24
41
#ifndef _CMPIOS_H_
42
#define _CMPIOS_H_
43
44
#include <
cmpipl.h
>
45
46
#include <stdlib.h>
// To get size_t
47
56
#define CMPI_THREAD_TYPE void*
57
71
#if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
72
# define CMPI_THREAD_RETURN unsigned
73
#else // all other compile platforms
74
# define CMPI_THREAD_RETURN void*
75
#endif
76
90
#if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
91
# define CMPI_THREAD_CDECL __stdcall
92
#elif defined(CMPI_PLATFORM_ZOS_ZSERIES_IBM)
93
# ifdef __cplusplus
94
# define CMPI_THREAD_CDECL __cdecl
95
# else
96
# define CMPI_THREAD_CDECL
97
# endif
98
#else // all other compile platforms
99
# define CMPI_THREAD_CDECL
100
#endif
101
115
#if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
116
# define CMPI_THREAD_KEY_TYPE unsigned int
117
#elif defined(CMPI_PLATFORM_ZOS_ZSERIES_IBM)
118
# include <pthread.h>
119
# define CMPI_THREAD_KEY_TYPE pthread_key_t
120
#else // all other compile platforms
121
# define CMPI_THREAD_KEY_TYPE unsigned int
122
#endif
123
133
#define CMPI_MUTEX_TYPE void*
134
144
#define CMPI_COND_TYPE void*
145
150
#if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
151
# ifndef HAVE_STRUCT_TIMESPEC
152
# define HAVE_STRUCT_TIMESPEC
153
struct
timespec {
154
long
tv_sec;
// seconds
155
long
tv_nsec;
// nanoseconds
156
};
157
# endif // HAVE_STRUCT_TIMESPEC
158
#endif
159
180
#if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
181
# define CMPI_EXPORT __declspec(dllexport)
182
#elif defined(CMPI_PLATFORM_LINUX_GENERIC_GNU) && (__GNUC__ >= 4)
183
# define CMPI_EXPORT __attribute__((visibility("default")))
184
#else // all other compile platforms
185
# define CMPI_EXPORT
186
#endif
187
209
#if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
210
# define CMPI_IMPORT __declspec(dllimport)
211
#elif defined(CMPI_PLATFORM_LINUX_GENERIC_GNU) && (__GNUC__ >= 4)
212
# define CMPI_IMPORT __attribute__((visibility("default")))
213
#else // all other compile platforms
214
# define CMPI_IMPORT
215
#endif
216
239
#ifdef __cplusplus
240
# define CMPI_EXTERN_C extern "C" CMPI_EXPORT
241
#else
242
# define CMPI_EXTERN_C CMPI_EXPORT
243
#endif
244
249
#endif // _CMPIOS_H_
cmpipl.h
Verifies that a valid compile platform has been defined.
Generated on Mon Oct 5 2015 14:53:27 for CMPI 2.1.0 API by
1.8.6