(file) Return to cmpir_common.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / CMPIR

  1 ks.madhusudan 1.1.4.2 //%2006////////////////////////////////////////////////////////////////////////
  2                       //
  3                       // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4                       // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5                       // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6                       // IBM Corp.; EMC Corporation, The Open Group.
  7                       // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8                       // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9                       // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10                       // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11                       // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12                       // EMC Corporation; Symantec Corporation; The Open Group.
 13                       //
 14                       // Permission is hereby granted, free of charge, to any person obtaining a copy
 15                       // of this software and associated documentation files (the "Software"), to
 16                       // deal in the Software without restriction, including without limitation the
 17                       // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18                       // sell copies of the Software, and to permit persons to whom the Software is
 19                       // furnished to do so, subject to the following conditions:
 20                       //
 21                       // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 ks.madhusudan 1.1.4.2 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23                       // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24                       // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25                       // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26                       // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27                       // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28                       // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29                       //
 30                       //==============================================================================
 31                       //
 32                       //%/////////////////////////////////////////////////////////////////////////////
 33                       
 34                       #ifndef _CMPIR_PROXY_PROVIDER_H_
 35                       #define _CMPIR_PROXY_PROVIDER_H_
 36                       
 37                       #include <Pegasus/Provider/CMPI/cmpios.h>
 38                       #include <Pegasus/Common/Config.h>
 39                       
 40                       #ifdef PEGASUS_OS_TYPE_UNIX
 41                       #define lloonngg long long int
 42                       
 43 ks.madhusudan 1.1.4.2 #define CMPIR_THREAD_CDECL CMPI_THREAD_CDECL
 44                       #define PEGASUS_CMPIR_ATOL(x) atoll(x)
 45                       #define PEGASUS_CMPIR_CDECL
 46                       #define PEGASUS_CMPIR_CHAR void
 47                       #define PEGASUS_CMPIR_CLOSESOCKET(socket_hdl) close(socket_hdl)
 48                       #define PEGASUS_CMPIR_ERROR(h_error) hstrerror(h_errno)
 49                       #define PEGASUS_CMPIR_ERROR_AT_LINE  error_at_line
 50                       #define PEGASUS_CMPIR_FREELIBRARY(libhandle) dlclose(libhandle)
 51                       #define PEGAUSUS_CMPIR_GETGID() getgid()
 52                       #define PEGASUS_CMPIR_GETPID() getpid()
 53                       #define PEGASUS_CMPIR_GETUID() getuid()
 54                       #define PEGASUS_CMPIR_GETPROCADDRESS(hLibrary, function) dlsym(hLibrary, function)
 55                       #define PEGASUS_CMPIR_INT time_t
 56                       #define PEGASUS_CMPIR_INVALID_SOCKET (-1)
 57                       #define PEGASUS_CMPIR_LIBTYPE "lib%s.so"
 58                       #define PEGASUS_CMPIR_LOADLIBRARY(filename,mode) dlopen (filename, mode)
 59                       #define PEGASUS_CMPIR_RECV(a,b,c,d) read(a,b,c)
 60                       #define PEGASUS_CMPIR_SEND(a,b,c,d)  write(a,b,c)
 61                       #define PEGASUS_CMPIR_SLEEP(duration) sleep(duration)
 62                       #define PEGASUS_CMPIR_SOCKET(family,stream,protocol) socket(family,stream,protocol)
 63                       #define PEGASUS_CMPIR_STDCALL
 64 ks.madhusudan 1.1.4.2 #define PEGASUS_CMPIR_VSPRINTF(a,b,c,d) vsnprintf(a,b,c,d)
 65                       #define PEGASUS_CMPIR_WSAGETLASTERROR errno
 66                       #endif
 67                       
 68                       #ifdef PEGASUS_OS_TYPE_WINDOWS
 69                       
 70                       #define lloonngg __int64
 71                       #define ssize_t size_t
 72                       
 73                       #ifndef FD_SETSIZE
 74                       #define FD_SETSIZE 1024
 75                       #endif
 76                       
 77                       #define CMPIR_THREAD_CDECL
 78 ks.madhusudan 1.1.4.3 #define PEGASUS_CMPIR_ATOL(x) _atoi64(x)
 79 ks.madhusudan 1.1.4.2 #define PEGASUS_CMPIR_CDECL  __cdecl
 80                       #define PEGASUS_CMPIR_CHAR int
 81                       #define PEGASUS_CMPIR_CLOSESOCKET(socket_hdl) closesocket(socket_hdl)
 82                       #define PEGASUS_CMPIR_ERROR(h_error) "error"
 83                       #define PEGASUS_CMPIR_LIBTYPE  "%s.dll"
 84                       #define PEGASUS_CMPIR_LOADLIBRARY(filename,mode)  LoadLibrary(filename)
 85                       #define PEGASUS_CMPIR_FREELIBRARY(libhandle) FreeLibrary(libhandle)
 86                       #define PEGAUSUS_CMPIR_GETGID() 1
 87                       #define PEGASUS_CMPIR_GETPID() _getpid()
 88                       #define PEGASUS_CMPIR_GETPROCADDRESS(hLibrary,function)  GetProcAddress(hLibrary, function)
 89                       #define PEGASUS_CMPIR_GETUID() 1
 90                       #define PEGASUS_CMPIR_INT int
 91                       #define PEGASUS_CMPIR_INVALID_SOCKET INVALID_SOCKET
 92                       #define PEGASUS_CMPIR_ERROR_AT_LINE(status,errno, __FILE__, \
 93                           __LINE__,format,value)  error_at_line(status, errno, __FILE__, __LINE__,format,value)
 94                       #define PEGASUS_CMPIR_RECV(a,b,c,d) recv(a,b,c,d)
 95                       #define PEGASUS_CMPIR_SEND(a,b,c,d) send(a,b,c,d)
 96                       #define PEGASUS_CMPIR_SLEEP(duration) Sleep(duration)
 97                       #define PEGASUS_CMPIR_SOCKET(family,stream,protocol) socket(family,stream,protocol)
 98                       #define PEGASUS_CMPIR_STDCALL __stdcall
 99                       #define PEGASUS_CMPIR_VSPRINTF(a, b, c,d)  vsprintf(a,c,d)
100 ks.madhusudan 1.1.4.2 #define PEGASUS_CMPIR_WSAGETLASTERROR WSAGetLastError()
101                       
102                       typedef unsigned char Uint8;
103                       typedef unsigned int  Uint32;
104                       typedef size_t socklen_t;
105                       
106                       int gettimeofday (struct timeval *t,void * );
107                       int strcasecmp(const char* s1, const char* s2);
108                       
109                       #endif
110                       
111                       
112                       #ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
113                       #define atoll(X) strtoll(X, NULL, 10)
114                       #endif
115                       
116                       /*
117                       // Do not delete unless and untill tested on z-OS
118                       #ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
119                       #include <errno.h>
120                       #include <strings.h>
121 ks.madhusudan 1.1.4.2 #include <dll.h>
122                       #include <arpa/inet.h>
123                       #include <stddef.h>
124                       #include <pthread.h>
125                       
126                       #define atoll(X) strtoll(X, NULL, 10)
127                       #define PEGASUS_CMPIR_LIBTYPE "lib%s.so"
128                       #define PEGASUS_CMPIR_LOADLIBRARY(filename,mode) dllload( filename )
129                       #define PEGASUS_CMPIR_GETPROCADDRESS(hLibrary, function ) dllqueryfn ( (dllhandle *) hLibrary, function )
130                       #define PEGASUS_CMPIR_ERROR_AT_LINE(status, errno, __FILE__, __LINE__,msg,value) \
131                           error_at_line( status, errno, __FILE__, __LINE__,msg,value)
132                       #define PEGASUS_CMPIR_INTERNAL
133                       #define PEGASUS_CMPIR_VSPRINTF(a, b, c,d)  vsnprintf(a,b,c,d)
134                       #define PEGAUSUS_CMPIR_GETPID() getpid()
135                       #define PEGASUS_CMPIR_GETUID() getuid()
136                       #define lloonngg long long int
137                       #define PEGASUS_CMPIR_CLOSESOCKET(socket_hdl) close(socket_hdl)
138                       #define PEGASUS_CMPIR_CDECL
139                       #define PEGASUS_CMPIR_EXTERNAL
140                       #define PEGASUS_CMPIR_STDCALL
141                       #define PEGAUSUS_CMPIR_GETGID() getgid()
142 ks.madhusudan 1.1.4.2 #define PEGASUS_CMPIR_FREELIBRARY(libhandle) dllfree((dllhandle *) libhandle )
143                       #define atoll(X) strtoll(X, NULL, 10)
144                       #define PEGASUS_CMPIR_SLEEP(duration) sleep(duration)
145                       #define PEGASUS_CMPIR_RECV (a,b,c,d) read(a,b,c)
146                       #define PEGASUS_CMPIR_SEND(a,b,c,d )  write(a,b,c)
147                       #define PEGASUS_CMPIR_CHAR void
148                       #define _XOPEN_SOURCE_EXTENDED 1
149                       #define PEGASUS_CMPIR_WSAGETLASTERROR errno
150                       #define PEGASUS_CMPIR_ERROR(h_error) strerror( h_errno )
151                       #define IPPROTO_TCP 0
152                       #define PEGASUS_CMPIR_SOCKET(family,stream,protocol) socket(family,stream,protocol)
153                       
154                       #endif
155                       */
156                       
157                       #endif // End of cmpir_comm.h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2