summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorks.madhusudan <ks.madhusudan>2007-04-19 16:16:57 +0000
committerks.madhusudan <ks.madhusudan>2007-04-19 16:16:57 +0000
commitd930b8954c0200d2d16b0e6337cb0ee2106583c2 (patch)
tree3ec7f6a476ae9ab1bd18661167704f9ab1b2f3c5
parentd2a6ca03dc223bbbf978ca4f90664c7cb0478c44 (diff)
downloadtog-pegasus-TASK-Bug2102_RCMPIWindows-branch.zip
tog-pegasus-TASK-Bug2102_RCMPIWindows-branch.tar.gz
tog-pegasus-TASK-Bug2102_RCMPIWindows-branch.tar.xz
TITLE: Remote CMPI on Windows
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/cmpir_common.h58
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/daemon/daemon.c4
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/io.c8
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/proxy_comm.c4
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/tool.c3
5 files changed, 21 insertions, 56 deletions
diff --git a/src/Pegasus/ProviderManager2/CMPIR/cmpir_common.h b/src/Pegasus/ProviderManager2/CMPIR/cmpir_common.h
index b1f1255..e3cb4f4 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/cmpir_common.h
+++ b/src/Pegasus/ProviderManager2/CMPIR/cmpir_common.h
@@ -31,6 +31,9 @@
//
//%/////////////////////////////////////////////////////////////////////////////
+/* This files contains Macro's for platform / os specific system calls and c
+functions with different names */
+
#ifndef _CMPIR_PROXY_PROVIDER_H_
#define _CMPIR_PROXY_PROVIDER_H_
@@ -38,12 +41,12 @@
#include <Pegasus/Common/Config.h>
#ifdef PEGASUS_OS_TYPE_UNIX
-#define lloonngg long long int
+#define lloonngg long long int
#define CMPIR_THREAD_CDECL CMPI_THREAD_CDECL
#define PEGASUS_CMPIR_ATOL(x) atoll(x)
#define PEGASUS_CMPIR_CDECL
-#define PEGASUS_CMPIR_CHAR void
+#define PEGASUS_CMPIR_IO_BUFPTR_TYPE void
#define PEGASUS_CMPIR_CLOSESOCKET(socket_hdl) close(socket_hdl)
#define PEGASUS_CMPIR_ERROR(h_error) hstrerror(h_errno)
#define PEGASUS_CMPIR_FREELIBRARY(libhandle) dlclose(libhandle)
@@ -51,9 +54,14 @@
#define PEGASUS_CMPIR_GETPID() getpid()
#define PEGASUS_CMPIR_GETUID() getuid()
#define PEGASUS_CMPIR_GETPROCADDRESS(hLibrary, function) dlsym(hLibrary, function)
-#define PEGASUS_CMPIR_INT time_t
#define PEGASUS_CMPIR_INVALID_SOCKET (-1)
+
+#ifndef PEGASUS_PLATFORM_HPUX_PARISC_ACC
#define PEGASUS_CMPIR_LIBTYPE "lib%s.so"
+#else
+#define PEGASUS_CMPIR_LIBTYPE "lib%s.sl"
+#endif
+
#define PEGASUS_CMPIR_LOADLIBRARY(filename,mode) dlopen (filename, mode)
#define PEGASUS_CMPIR_RECV(a,b,c,d) read(a,b,c)
#define PEGASUS_CMPIR_SEND(a,b,c,d) write(a,b,c)
@@ -77,7 +85,7 @@
#define CMPIR_THREAD_CDECL
#define PEGASUS_CMPIR_ATOL(x) _atoi64(x)
#define PEGASUS_CMPIR_CDECL __cdecl
-#define PEGASUS_CMPIR_CHAR int
+#define PEGASUS_CMPIR_IO_BUFPTR_TYPE int
#define PEGASUS_CMPIR_CLOSESOCKET(socket_hdl) closesocket(socket_hdl)
#define PEGASUS_CMPIR_ERROR(h_error) "error"
#define PEGASUS_CMPIR_LIBTYPE "%s.dll"
@@ -87,7 +95,6 @@
#define PEGASUS_CMPIR_GETPID() _getpid()
#define PEGASUS_CMPIR_GETPROCADDRESS(hLibrary,function) GetProcAddress(hLibrary, function)
#define PEGASUS_CMPIR_GETUID() 1
-#define PEGASUS_CMPIR_INT int
#define PEGASUS_CMPIR_INVALID_SOCKET INVALID_SOCKET
#define PEGASUS_CMPIR_RECV(a,b,c,d) recv(a,b,c,d)
#define PEGASUS_CMPIR_SEND(a,b,c,d) send(a,b,c,d)
@@ -111,45 +118,4 @@ int gettimeofday (struct timeval *t,void * );
#define atoll(X) strtoll(X, NULL, 10)
#endif
-/*
-// Do not delete unless and untill tested on z-OS
-#ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
-#include <errno.h>
-#include <strings.h>
-#include <dll.h>
-#include <arpa/inet.h>
-#include <stddef.h>
-#include <pthread.h>
-
-#define atoll(X) strtoll(X, NULL, 10)
-#define PEGASUS_CMPIR_LIBTYPE "lib%s.so"
-#define PEGASUS_CMPIR_LOADLIBRARY(filename,mode) dllload( filename )
-#define PEGASUS_CMPIR_GETPROCADDRESS(hLibrary, function ) dllqueryfn ( (dllhandle *) hLibrary, function )
-#define PEGASUS_CMPIR_ERROR_AT_LINE(status, errno, __FILE__, __LINE__,msg,value) \
- error_at_line( status, errno, __FILE__, __LINE__,msg,value)
-#define PEGASUS_CMPIR_INTERNAL
-#define PEGASUS_CMPIR_VSPRINTF(a, b, c,d) vsnprintf(a,b,c,d)
-#define PEGAUSUS_CMPIR_GETPID() getpid()
-#define PEGASUS_CMPIR_GETUID() getuid()
-#define lloonngg long long int
-#define PEGASUS_CMPIR_CLOSESOCKET(socket_hdl) close(socket_hdl)
-#define PEGASUS_CMPIR_CDECL
-#define PEGASUS_CMPIR_EXTERNAL
-#define PEGASUS_CMPIR_STDCALL
-#define PEGASUS_CMPIR_GETGID() getgid()
-#define PEGASUS_CMPIR_FREELIBRARY(libhandle) dllfree((dllhandle *) libhandle )
-#define atoll(X) strtoll(X, NULL, 10)
-#define PEGASUS_CMPIR_SLEEP(duration) sleep(duration)
-#define PEGASUS_CMPIR_RECV (a,b,c,d) read(a,b,c)
-#define PEGASUS_CMPIR_SEND(a,b,c,d ) write(a,b,c)
-#define PEGASUS_CMPIR_CHAR void
-#define _XOPEN_SOURCE_EXTENDED 1
-#define PEGASUS_CMPIR_WSAGETLASTERROR errno
-#define PEGASUS_CMPIR_ERROR(h_error) strerror( h_errno )
-#define IPPROTO_TCP 0
-#define PEGASUS_CMPIR_SOCKET(family,stream,protocol) socket(family,stream,protocol)
-
-#endif
-*/
-
#endif // End of cmpir_comm.h
diff --git a/src/Pegasus/ProviderManager2/CMPIR/daemon/daemon.c b/src/Pegasus/ProviderManager2/CMPIR/daemon/daemon.c
index 04b39fa..672cda0 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/daemon/daemon.c
+++ b/src/Pegasus/ProviderManager2/CMPIR/daemon/daemon.c
@@ -55,7 +55,7 @@
#include <process.h>
#include <windows.h>
#elif defined PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
-#include <dll.h>
+#include <dlfcn.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
@@ -142,7 +142,7 @@ static void __init_remote_comm_lib ( comm_lib * comm )
}
}
-#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined (PEGASUS_OS_TYPE_WINDOWS)
+#if defined (PEGASUS_OS_TYPE_WINDOWS)
fprintf( stderr, "%s\n", strerror(errno) );
#else
fprintf ( stderr, "%s\n", dlerror () );
diff --git a/src/Pegasus/ProviderManager2/CMPIR/io.c b/src/Pegasus/ProviderManager2/CMPIR/io.c
index 710c050..0daf016 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/io.c
+++ b/src/Pegasus/ProviderManager2/CMPIR/io.c
@@ -62,7 +62,9 @@
\return zero on success.
*/
- int io_read_fixed_length ( int fd, PEGASUS_CMPIR_CHAR * buf, size_t count )
+int io_read_fixed_length ( int fd,
+ PEGASUS_CMPIR_IO_BUFPTR_TYPE * buf,
+ size_t count )
{
ssize_t bytes;
@@ -113,7 +115,9 @@
\return zero on success.
*/
- int io_write_fixed_length ( int fd, const PEGASUS_CMPIR_CHAR * buf, size_t count )
+int io_write_fixed_length ( int fd,
+ const PEGASUS_CMPIR_IO_BUFPTR_TYPE * buf,
+ size_t count )
{
ssize_t bytes;
diff --git a/src/Pegasus/ProviderManager2/CMPIR/proxy_comm.c b/src/Pegasus/ProviderManager2/CMPIR/proxy_comm.c
index 0b6d46f..28ccf7d 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/proxy_comm.c
+++ b/src/Pegasus/ProviderManager2/CMPIR/proxy_comm.c
@@ -49,9 +49,7 @@
#include "tool.h"
#include "debug.h"
-#ifdef PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
-#include <dll.h>
-#elif defined PEGASUS_OS_TYPE_WINDOWS
+#if defined PEGASUS_OS_TYPE_WINDOWS
#include <winsock2.h>
#include <Winbase.h>
#include <Windows.h>
diff --git a/src/Pegasus/ProviderManager2/CMPIR/tool.c b/src/Pegasus/ProviderManager2/CMPIR/tool.c
index 536f002..58d69a5 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/tool.c
+++ b/src/Pegasus/ProviderManager2/CMPIR/tool.c
@@ -44,9 +44,6 @@
#ifdef PEGASUS_OS_TYPE_UNIX
#include <dlfcn.h>
#include <strings.h>
-#elif defined PEGASUS_PLATFORM_ZOS_ZSERIES_IBM
-#include <dll.h>
-#include <errno.h>
#elif defined PEGASUS_OS_TYPE_WINDOWS
#include <winsock2.h>
#include <Winbase.h>