Create prototype for IPC_CREATE macro on linux,

and change return type to pointer.
This commit is contained in:
Jim Norman 2006-04-24 18:47:56 +00:00
parent c6d199d3a5
commit ae815fe009
2 changed files with 198 additions and 192 deletions

View File

@ -34,7 +34,8 @@ int firstReadAfterWrite = 0;
*/ */
#ifdef SSCS_LINUX_PLAT_F #ifdef SSCS_LINUX_PLAT_F
int ipc_unx_create() void* ipc_unx_create()
{ {
int retVal = 0; int retVal = 0;
struct sockaddr_un servAddr; struct sockaddr_un servAddr;
@ -63,7 +64,7 @@ int ipc_unx_create()
else else
retVal = sockFd; retVal = sockFd;
}while(0); }while(0);
return retVal; return (void*)retVal;
} }
#else #else

View File

@ -42,6 +42,11 @@ typedef uint8_t Byte;
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
void* ipc_unx_create(void);
int ipc_unx_write(int fd, Byte *pData, int bytes);
int ipc_unx_read(int fd, Byte *pData, int bytes);
int ipc_unx_close(int fd);
#define IPC_CREATE(...) ipc_unx_create(__VA_ARGS__); #define IPC_CREATE(...) ipc_unx_create(__VA_ARGS__);
#define IPC_READ(...) ipc_unx_read(__VA_ARGS__); #define IPC_READ(...) ipc_unx_read(__VA_ARGS__);
#define IPC_WRITE(...) ipc_unx_write(__VA_ARGS__); #define IPC_WRITE(...) ipc_unx_write(__VA_ARGS__);