cmpi/cmpios.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * $Id: cmpios.h,v 1.5 2011/05/18 03:47:04 tyreld Exp $
00004  *
00005  * (C) Copyright IBM Corp. 2003, 2005, 2006, 2008
00006  *
00007  * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
00008  * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
00009  * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
00010  *
00011  * You can obtain a current copy of the Eclipse Public License from
00012  * http://www.opensource.org/licenses/eclipse-1.0.txt
00013  *
00014  * Author:        Adrian Schuur <schuur@de.ibm.com>
00015  * Contributors:
00016  *
00017  * Description: CMPI OS Specific Definions
00018  *
00019  */
00020 
00021 /* ------------------------------------------------------------------------- */
00022 /*                                                                           */
00023 /* Copyright (c) 2006 The Open Group                                         */
00024 /*                                                                           */
00025 /* Permission is hereby granted, free of charge, to any person obtaining a   */
00026 /* copy of this software (the "Software"), to deal in the Software without   */
00027 /* restriction, including without limitation the rights to use, copy,        */
00028 /* modify, merge, publish, distribute, sublicense, and/or sell copies of     */
00029 /* the Software, and to permit persons to whom the Software is furnished     */
00030 /* to do so, subject to the following conditions:                            */
00031 /*                                                                           */
00032 /* The above copyright notice and this permission notice shall be included   */
00033 /* in all copies or substantial portions of the Software.                    */
00034 /*                                                                           */
00035 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   */
00036 /* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                */
00037 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.    */
00038 /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY      */
00039 /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
00040 /* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR  */
00041 /* THE USE OR OTHER DEALINGS IN THE SOFTWARE.                                */
00042 /*                                                                           */
00043 /* ------------------------------------------------------------------------- */
00044 
00045 #ifndef _CMPIOS_H_
00046 #   define _CMPIOS_H_
00047 
00048 #   include "cmpipl.h"
00049 #   include <stdlib.h>          // To get the size_t
00050 #   define CMPI_THREAD_RETURN      void*
00051 #   define CMPI_THREAD_TYPE        void*
00052 #   define CMPI_MUTEX_TYPE         void*
00053 #   define CMPI_COND_TYPE          void*
00054 
00055 #   if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
00056 #      define CMPI_THREAD_CDECL    __stdcall
00057 #      define CMPI_THREAD_KEY_TYPE unsigned long int
00058 
00059 #   ifndef HAVE_STRUCT_TIMESPEC
00060 #       define HAVE_STRUCT_TIMESPEC
00061             struct timespec
00062             {
00063                         long tv_sec;
00064                         long tv_nsec;
00065             };
00066 #   endif /* HAVE_STRUCT_TIMESPEC */
00067 
00068 #   elif defined(CMPI_PLATFORM_ZOS_ZSERIES_IBM)
00069 #      ifndef __cplusplus
00070 #      include <pthread.h>
00071 #         define CMPI_THREAD_CDECL
00072 #      else
00073 #         define CMPI_THREAD_CDECL    __cdecl
00074 #      endif
00075 #      define CMPI_THREAD_KEY_TYPE  pthread_key_t
00076 #   elif defined(CMPI_PLATFORM_LINUX_GENERIC_GNU)
00077 #      include <pthread.h>
00078 #      define CMPI_THREAD_CDECL
00079 #      define CMPI_THREAD_KEY_TYPE pthread_key_t
00080 #   else
00081 #      define CMPI_THREAD_CDECL
00082 #      define CMPI_THREAD_KEY_TYPE unsigned long int
00083 #   endif
00084 
00085 /* Define CMPI_EXPORT */
00086 #   if defined(CMPI_PLATFORM_WIN32_IX86_MSVC)
00087 #      define CMPI_EXPORT __declspec(dllexport)
00088 #   elif defined(CMPI_PLATFORM_LINUX_GENERIC_GNU) && (__GNUC__ >= 4)
00089 #      define CMPI_EXPORT __attribute__((visibility("default")))
00090 #   else
00091 #      define CMPI_EXPORT /* empty */
00092 #   endif
00093 
00094 /* Define CMPI_EXTERN_C */
00095 #   ifdef __cplusplus
00096 #      define CMPI_EXTERN_C extern "C" CMPI_EXPORT
00097 #   else
00098 #      define CMPI_EXTERN_C CMPI_EXPORT
00099 #   endif
00100 
00101 #endif

Generated on Sat Feb 26 13:04:34 2022 for cmpi by  doxygen 1.4.6