From 466317b23f9e637a1112ec8b7cca654378ff790e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 24 Apr 2009 19:53:01 +0000 Subject: [PATCH] We haven't supported VMS for YONKS... --- src/libCom/osi/os/VMS/epicsMath.h | 29 ----- src/libCom/osi/os/VMS/osdProcess.c | 130 ------------------- src/libCom/osi/os/VMS/osdSock.h | 173 -------------------------- src/libCom/osi/os/VMS/osdTime.cpp | 51 -------- src/libCom/osi/os/VMS/osdTime.h | 28 ----- src/libCom/osi/os/VMS/osdWireFormat.h | 138 -------------------- src/libCom/osi/os/VMS/osiFileName.h | 22 ---- src/libCom/osi/os/VMS/osiSock.h | 164 ------------------------ src/libCom/osi/os/VMS/ucx.h | 101 --------------- 9 files changed, 836 deletions(-) delete mode 100644 src/libCom/osi/os/VMS/epicsMath.h delete mode 100644 src/libCom/osi/os/VMS/osdProcess.c delete mode 100644 src/libCom/osi/os/VMS/osdSock.h delete mode 100644 src/libCom/osi/os/VMS/osdTime.cpp delete mode 100644 src/libCom/osi/os/VMS/osdTime.h delete mode 100644 src/libCom/osi/os/VMS/osdWireFormat.h delete mode 100644 src/libCom/osi/os/VMS/osiFileName.h delete mode 100644 src/libCom/osi/os/VMS/osiSock.h delete mode 100644 src/libCom/osi/os/VMS/ucx.h diff --git a/src/libCom/osi/os/VMS/epicsMath.h b/src/libCom/osi/os/VMS/epicsMath.h deleted file mode 100644 index 03b7cf4ba..000000000 --- a/src/libCom/osi/os/VMS/epicsMath.h +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -#ifndef epicsMathh -#define epicsMathh - -#include -#include - -#define isinf(D) (!finite((D)) && !(isnan((D)))) - -#ifdef __cplusplus -extern "C" { -#endif - -epicsShareExtern float epicsNAN; -epicsShareExtern float epicsINF; - -#ifdef __cplusplus -} -#endif - -#endif /* epicsMathh */ diff --git a/src/libCom/osi/os/VMS/osdProcess.c b/src/libCom/osi/os/VMS/osdProcess.c deleted file mode 100644 index ff0c035a0..000000000 --- a/src/libCom/osi/os/VMS/osdProcess.c +++ /dev/null @@ -1,130 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -/* - * $Id$ - * - * Operating System Dependent Implementation of osiProcess.h - * - * Author: Jeff Hill - * - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#define epicsExportSharedSymbols -#include "osiProcess.h" - -epicsShareFunc osiGetUserNameReturn epicsShareAPI osiGetUserName (char *pBuf, unsigned bufSizeIn) -{ - struct { - short buffer_length; - short item_code; - void *pBuf; - void *pRetSize; - } item_list[3]; - unsigned length; - char pName[12]; /* the size of VMS user names */ - short nameLength; - char *psrc; - char *pdest; - int status; - char jobType; - short jobTypeSize; - char *pTmp; - - item_list[0].buffer_length = sizeof (pName); - item_list[0].item_code = JPI$_USERNAME; /* fetch the user name */ - item_list[0].pBuf = pName; - item_list[0].pRetSize = &nameLength; - - item_list[1].buffer_length = sizeof (jobType); - item_list[1].item_code = JPI$_JOBTYPE; /* fetch the job type */ - item_list[1].pBuf = &jobType; - item_list[1].pRetSize = &jobTypeSize; - - item_list[2].buffer_length = 0; - item_list[2].item_code = 0; /* none */ - item_list[2].pBuf = 0; - item_list[2].pRetSize = 0; - - status = sys$getjpiw ( - NULL, - NULL, - NULL, - &item_list, - NULL, - NULL, - NULL); - if ( status != SS$_NORMAL ) { - return osiGetUserNameFail; - } - - if ( jobTypeSize != sizeof (jobType) ) { - return osiGetUserNameFail; - } - - /* - * parse the user name string - */ - psrc = pName; - length = 0; - while ( psrc<&pName[nameLength] && !isspace(*psrc) ) { - length++; - psrc++; - } - - if ( length + 1 >= bufSizeIn ) { - return osiGetUserNameFail; - } - - strncpy ( pBuf, pName, length ); - pBuf[length] = '\0'; - - return osiGetUserNameSuccess; -} - -epicsShareFunc osiSpawnDetachedProcessReturn epicsShareAPI osiSpawnDetachedProcess - (const char *pProcessName, const char *pBaseExecutableName) -{ - static $DESCRIPTOR (io, "EPICS_LOG_DEVICE"); - auto $DESCRIPTOR (image, pBaseExecutableName); - auto $DESCRIPTOR (name, pProcessName); - int status; - unsigned long pid; - - status = sys$creprc ( - &pid, - &image, - NULL, /* input (none) */ - &io, /* output */ - &io, /* error */ - NULL, /* use parents privs */ - NULL, /* use default quotas */ - &name, - 4, /* base priority */ - NULL, - NULL, - PRC$M_DETACH); - if (status != SS$_NORMAL){ - lib$signal (status); - return osiSpawnDetachedProcessFail; - } -} diff --git a/src/libCom/osi/os/VMS/osdSock.h b/src/libCom/osi/os/VMS/osdSock.h deleted file mode 100644 index 2716b1a8a..000000000 --- a/src/libCom/osi/os/VMS/osdSock.h +++ /dev/null @@ -1,173 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* - * vms specific socket include - */ - -#ifndef osdSockH -#define osdSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#if defined(MULTINET) && defined(__cplusplus) - struct iovec; -#endif - -#include -#include -#include -#if defined(UCX) /* GeG 09-DEC-1992 */ -# include -# include -# include -# include -#elif defined(MULTINET) -# if defined(__DECCXX) -# define __DECC 1 -# define __DECC_VER 999999999 -# include -# include -# undef __DECC -# undef __DECC_VER -# else -# include -# include -# endif -# if defined(__cplusplus) - struct ifaddr; - struct mbuf; -# endif -# include -# include -# include -# include -# include -#endif - -/* - * MULTINET defines none of these (if not using C++) - */ -#if defined(MULTINET) && defined(MULTINET_NO_PROTOTYPES) -int gettimeofday (struct timeval *tp, struct timezone *tzp); -int gethostname (char *name, int namelen); -int getpeername (int socket, struct sockaddr *name, int *namelen); -int connect (int socket, struct sockaddr *name, int namelen); -int setsockopt (int socket, int level, int optname, - char *optval, int optlen); -int sendto (int socket, const char *buf, int len, - int flags, struct sockaddr *to, int tolen); -int select (int width, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout); - -int bind (int socket, struct sockaddr *name, int namelen); -int send (int socket, const char *buf, int len, int flags); -int recv (int socket, char *buf, int len, int flags); -int getsockopt (int socket, int level, int optname, - char *optval, int *optlen); -int recvfrom (int socket, char *buf, int len, - int flags, struct sockaddr *from, int *fromlen); -int getsockname (int socket, struct sockaddr *name, int *namelen); -int listen (int socket, int backlog); -int shutdown (int socket, int how); -int socket (int domain, int type, int protocol); - -#endif /* defined(MULTINET) && defined(MULTINET_NO_PROTOTYPES) */ - -#ifdef MULTINET -# include -#else - char * inet_ntoa (struct in_addr in); - unsigned long inet_addr (const char *); -#endif - -#if 0 -struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ -#define h_addr h_addr_list[0] /* address, for backward compatiblity */ -}; -struct hostent *gethostbyaddr(char *addr, int len, int type); -#endif - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define INADDR_LOOPBACK ((u_long)0x7f000001) - -#ifndef INADDR_NONE -# define INADDR_NONE (0xffffffff) -#endif - -/* - * (the VAXC runtime lib has its own close - */ -#if defined(WINTCP) /* Wallangong */ -# define socket_close(S) netclose(S) -# define socket_ioctl(A,B,C) ioctl(A,B,C) -#endif -#if defined(UCX) /* GeG 09-DEC-1992 */ -# define socket_close(S) close(S) -# define socket_ioctl(A,B,C) ioctl(A,B,C) -#endif -typedef int osiSockIoctl_t; -typedef int osiSocklen_t; - -#if defined(WINTCP) /* Wallangong */ - extern int uerrno; -# define SOCKERRNO uerrno -#elif defined(MULTINET) -# define SOCKERRNO socket_errno -#else -# define SOCKERRNO errno /* UCX and others? */ -#endif - -#define MAXHOSTNAMELEN 75 - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE -#define SOCK_SHUTDOWN ESHUTDOWN -#define SOCK_ENOTSOCK ENOTSOCK -#define SOCK_EBADF EBADF - -/* - * Under MULTINET FD_SETSIZE does not apply - * (can only guess about the others) - */ -#ifdef MULTINET -# define FD_IN_FDSET(FD) (1) -#else -# define FD_IN_FDSET(FD) ((FD)=0) -#endif - -#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name)) - -#endif /*osdSockH*/ - diff --git a/src/libCom/osi/os/VMS/osdTime.cpp b/src/libCom/osi/os/VMS/osdTime.cpp deleted file mode 100644 index 947f1e0d4..000000000 --- a/src/libCom/osi/os/VMS/osdTime.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -// -// should move the gettimeofday() proto for VMS -// into a different header -// -#include "osiSock.h" - -#define epicsExportSharedSymbols -#include "epicsTime.h" -#include "generalTimeSup.h" - -// -// epicsTime::osdGetCurrent () -// -int osdTimeGetCurrent (epicsTimeStamp *pDest) -{ - int status; -#if defined(CLOCK_REALTIME) - struct timespec t; - status = clock_gettime(CLOCK_REALTIME, &t); -#else - struct timeval t; - status = gettimeofday(&t, NULL); -#endif - if (status) { - return epicsTimeERROR; - } - *pDest = epicsTime(t); - return epicsTimeOK; -} - -static int timeRegister(void) -{ -#if defined (CLOCK_REALTIME) - const char *name = "gettimeofday"; -#else - const char *name = "clock_gettime"; -#endif - - generalTimeCurrentTpRegister(name, 150, osdTimeGetCurrent); - return 1; -} -static int done = timeRegister(); diff --git a/src/libCom/osi/os/VMS/osdTime.h b/src/libCom/osi/os/VMS/osdTime.h deleted file mode 100644 index dc6b0c453..000000000 --- a/src/libCom/osi/os/VMS/osdTime.h +++ /dev/null @@ -1,28 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -/* - * $Id$ - * - * Author: Jeff Hill - */ - -#ifndef osdTimeh -#define osdTimeh - -/* - * I assume that this is never defined on VMS ? - */ -struct timespec { - time_t tv_sec; /* seconds since some epoch */ - long tv_nsec; /* nanoseconds within the second */ -}; - -#endif /* ifndef osdTimeh */ \ No newline at end of file diff --git a/src/libCom/osi/os/VMS/osdWireFormat.h b/src/libCom/osi/os/VMS/osdWireFormat.h deleted file mode 100644 index 1d18e219d..000000000 --- a/src/libCom/osi/os/VMS/osdWireFormat.h +++ /dev/null @@ -1,138 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -// VMS specific wire formatting functions - -// -// We still use a big endian wire format for CA consistent with the internet, -// but inconsistent with the vast majority of CPUs -// - -#ifndef osdWireFormat -#define osdWireFormat - -#include - -#define EPICS_LITTLE_ENDIAN -#define EPICS_CONVERSION_REQUIRED - -template <> -inline void WireGet < epicsFloat32 > ( - const epicsUInt8 * pWireSrc, epicsFloat32 & dst ) -{ - cvt$convert_float ( pWireSrc, CVT$K_IEEE_S, & dst, CVT$K_VAX_F, CVT$M_BIG_ENDIAN ); -} - -template <> -inline void WireGet < epicsFloat64 > ( - const epicsUInt8 * pWireSrc, epicsFloat64 & dst ) -{ -# if defined ( __G_FLOAT ) && ( __G_FLOAT == 1 ) - cvt$convert_float ( pWireSrc, CVT$K_IEEE_T, & dst, CVT$K_VAX_G, CVT$M_BIG_ENDIAN ); -# else - cvt$convert_float ( pWireSrc, CVT$K_IEEE_T, & dst, CVT$K_VAX_D, CVT$M_BIG_ENDIAN ); -# endif -} - -inline void WireGet ( - const epicsUInt8 * pWireSrc, epicsOldString & dst ) -{ - memcpy ( dst, pWireSrc, sizeof ( dst ) ); -} - -template <> -inline void WireSet < epicsFloat32 > ( - const epicsFloat32 & src, epicsUInt8 * pWireDst ) -{ - cvt$convert_float ( & src, CVT$K_VAX_F , pWireDst, CVT$K_IEEE_S, CVT$M_BIG_ENDIAN ); -} - -template <> -inline void WireSet < epicsFloat64 > ( - const epicsFloat64 & src, epicsUInt8 * pWireDst ) -{ -# if defined ( __G_FLOAT ) && ( __G_FLOAT == 1 ) - cvt$convert_float ( & src, CVT$K_VAX_G , pWireDst, CVT$K_IEEE_T, CVT$M_BIG_ENDIAN ); -# else - cvt$convert_float ( & src, CVT$K_VAX_D , pWireDst, CVT$K_IEEE_T, CVT$M_BIG_ENDIAN ); -# endif -} - -inline void WireSet ( - const epicsOldString & src, epicsUInt8 * pWireDst ) -{ - memcpy ( pWireDst, src, sizeof ( src ) ); -} - -template <> -inline void AlignedWireGet < epicsUInt16 > ( - const epicsUInt16 & src, epicsUInt16 & dst ) -{ - dst = byteSwap ( src ); -} - -template <> -inline void AlignedWireGet < epicsUInt32 > ( - const epicsUInt32 & src, epicsUInt32 & dst ) -{ - dst = byteSwap ( src ); -} - -template <> -inline void AlignedWireGet < epicsFloat32 > ( - const epicsFloat32 & src, epicsFloat32 & dst ) -{ - cvt$convert_float ( & src, CVT$K_IEEE_S, & dst, CVT$K_VAX_F, CVT$M_BIG_ENDIAN ); -} - -template <> -inline void AlignedWireGet < epicsFloat64 > ( - const epicsFloat64 & src, epicsFloat64 & dst ) -{ -# if defined ( __G_FLOAT ) && ( __G_FLOAT == 1 ) - cvt$convert_float ( & src, CVT$K_IEEE_T, & dst, CVT$K_VAX_G, CVT$M_BIG_ENDIAN ); -# else - cvt$convert_float ( & src, CVT$K_IEEE_T, & dst, CVT$K_VAX_D, CVT$M_BIG_ENDIAN ); -# endif -} - -template <> -inline void AlignedWireSet < epicsUInt16 > ( - const epicsUInt16 & src, epicsUInt16 & dst ) -{ - dst = byteSwap ( src ); -} - -template <> -inline void AlignedWireSet < epicsUInt32 > ( - const epicsUInt32 & src, epicsUInt32 & dst ) -{ - dst = byteSwap ( src ); -} - -template <> -inline void AlignedWireSet < epicsFloat32 > ( - const epicsFloat32 & src, epicsFloat32 & dst ) -{ - cvt$convert_float ( & src, CVT$K_VAX_F , & dst, CVT$K_IEEE_S, CVT$M_BIG_ENDIAN ); -} - -template <> -inline void AlignedWireSet < epicsFloat64 > ( - const epicsFloat64 & src, epicsFloat64 & dst ) -{ -# if defined ( __G_FLOAT ) && ( __G_FLOAT == 1 ) - cvt$convert_float ( & src, CVT$K_VAX_G , & dst, CVT$K_IEEE_T, CVT$M_BIG_ENDIAN ); -# else - cvt$convert_float ( & src, CVT$K_VAX_D , & dst, CVT$K_IEEE_T, CVT$M_BIG_ENDIAN ); -# endif -} - -#endif // osdWireFormat \ No newline at end of file diff --git a/src/libCom/osi/os/VMS/osiFileName.h b/src/libCom/osi/os/VMS/osiFileName.h deleted file mode 100644 index 7db51fc04..000000000 --- a/src/libCom/osi/os/VMS/osiFileName.h +++ /dev/null @@ -1,22 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#define OSI_PATH_LIST_SEPARATOR "," -#define OSI_PATH_SEPARATOR "." - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/libCom/osi/os/VMS/osiSock.h b/src/libCom/osi/os/VMS/osiSock.h deleted file mode 100644 index 905c1f96d..000000000 --- a/src/libCom/osi/os/VMS/osiSock.h +++ /dev/null @@ -1,164 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* - * vms specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#if defined(MULTINET) && defined(__cplusplus) - struct iovec; -#endif - -#include -#include -#include -#if defined(UCX) /* GeG 09-DEC-1992 */ -# include -# include -# include -# include -#elif defined(MULTINET) -# if defined(__DECCXX) -# define __DECC 1 -# define __DECC_VER 999999999 -# include -# include -# undef __DECC -# undef __DECC_VER -# else -# include -# include -# endif -# if defined(__cplusplus) - struct ifaddr; - struct mbuf; -# endif -# include -# include -# include -# include -# include -#endif - -/* - * MULTINET defines none of these (if not using C++) - */ -#if defined(MULTINET) && defined(MULTINET_NO_PROTOTYPES) -int gettimeofday (struct timeval *tp, struct timezone *tzp); -int gethostname (char *name, int namelen); -int getpeername (int socket, struct sockaddr *name, int *namelen); -int connect (int socket, struct sockaddr *name, int namelen); -int setsockopt (int socket, int level, int optname, - char *optval, int optlen); -int sendto (int socket, const char *buf, int len, - int flags, struct sockaddr *to, int tolen); -int select (int width, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout); - -int bind (int socket, struct sockaddr *name, int namelen); -int send (int socket, const char *buf, int len, int flags); -int recv (int socket, char *buf, int len, int flags); -int getsockopt (int socket, int level, int optname, - char *optval, int *optlen); -int recvfrom (int socket, char *buf, int len, - int flags, struct sockaddr *from, int *fromlen); -int getsockname (int socket, struct sockaddr *name, int *namelen); -int listen (int socket, int backlog); -int shutdown (int socket, int how); -int socket (int domain, int type, int protocol); - -#endif /* defined(MULTINET) && defined(MULTINET_NO_PROTOTYPES) */ - -#ifdef MULTINET -# include -#else - char * inet_ntoa (struct in_addr in); - unsigned long inet_addr (const char *); -#endif - -#if 0 -struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ -#define h_addr h_addr_list[0] /* address, for backward compatiblity */ -}; -struct hostent *gethostbyaddr(char *addr, int len, int type); -#endif - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define INADDR_LOOPBACK ((u_long)0x7f000001) - - -/* - * (the VAXC runtime lib has its own close - */ -#if defined(WINTCP) /* Wallangong */ -# define socket_close(S) netclose(S) -# define socket_ioctl(A,B,C) ioctl(A,B,C) -#endif -#if defined(UCX) /* GeG 09-DEC-1992 */ -# define socket_close(S) close(S) -# define socket_ioctl(A,B,C) ioctl(A,B,C) -#endif -typedef int osiSockIoctl_t; - -#if defined(WINTCP) /* Wallangong */ - extern int uerrno; -# define SOCKERRNO uerrno -#elif defined(MULTINET) -# define SOCKERRNO socket_errno -#else -# define SOCKERRNO errno /* UCX and others? */ -#endif - -#define MAXHOSTNAMELEN 75 - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -/* - * Under MULTINET FD_SETSIZE does not apply - * (can only guess about the others) - */ -#ifdef MULTINET -# define FD_IN_FDSET(FD) (1) -#else -# define FD_IN_FDSET(FD) ((FD)=0) -#endif - -#endif /*osiSockH*/ - diff --git a/src/libCom/osi/os/VMS/ucx.h b/src/libCom/osi/os/VMS/ucx.h deleted file mode 100644 index 8541cc547..000000000 --- a/src/libCom/osi/os/VMS/ucx.h +++ /dev/null @@ -1,101 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* - * - * U C X . H - * UNIX ioctl structures and defines used for VAX/UCX - * - */ -#ifndef _UCX_H_ -#define _UCX_H_ -#ifdef UCX - -#define IFF_UP 0x1 /* interface is up */ -#define IFF_BROADCAST 0x2 /* broadcast address valid */ -#define IFF_LOOPBACK 0x8 /* is a loopback net */ -#define IFF_POINTOPOINT 0x10 /* interface is point to point */ -/* - * Interface request structure used for socket - * ioctl's. All interface ioctl's must have parameter - * definitions which begin with ifr_name. The - * remainder may be interface specific. - */ -struct ifreq { -#define IFNAMSIZ 16 - char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_broadaddr; - short ifru_flags; - int ifru_metric; - caddr_t ifru_data; - } ifr_ifru; -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ -}; - -/* Structure used in SIOCGIFCONF request. - * Used to retrieve interface configuration - * for machine (useful for programs which - * must know all networks accessible). - */ -struct ifconf { - int ifc_len; /* size of associated buffer */ - union { - caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; -#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ -}; - -#ifndef NBBY -#define NBBY 8 -#endif - -#ifndef FD_SETSIZE -#define FD_SETSIZE 256 -#endif - -typedef long fd_mask ; -#define NFDBITS (sizeof (fd_mask) * NBBY ) /* bits per mask */ -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -/* - * Both DEC C and VAX C only allow 32 fd's at once - */ -typedef int fd_set ; - -#define FD_SET(n, p) (*(p) |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) (*(p) &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) (*(p) & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((char *)(p), 0, sizeof (*(p))) - -#include -#define IO$_RECEIVE (IO$_WRITEVBLK) - -struct timezone { - int tz_minuteswest ; /* minutes west of Greenwich */ - int tz_dsttime ; /* type of dst correction */ -}; - -#define TWOPOWER32 4294967296.0 -#define TWOPOWER31 2147483648.0 -#define UNIX_EPOCH_AS_MJD 40587.0 -#endif -#endif -