/*************************************************************************\ * 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. \*************************************************************************/ /* * Linux specific socket include * * Under Linux if we dont define _POSIX_C_SOURCE or _XOPEN_SOURCE * then none of the POSIX stuff (such as signals) can be used * with cc -v. However if one of _POSIX_C_SOURCE or _XOPEN_SOURCE * are defined then we cant use the socket library. Therefore I * have been adding the following in order to use POSIX signals * and also sockets on Linux with cc -v. What a pain.... * * #ifdef linux * #define __EXTENSIONS__ * #endif */ #ifndef osdSockH #define osdSockH #ifdef __cplusplus extern "C" { #endif #include #include #include /* for MAXHOSTNAMELEN */ #include #include #include /*#include #include */ #include #include #include #include #include #include /* close() and others */ #ifdef __cplusplus } #endif typedef int SOCKET; #define INVALID_SOCKET (-1) #define SOCKERRNO errno #define socket_ioctl(A,B,C) ioctl(A,B,C) typedef int osiSockIoctl_t; typedef socklen_t osiSocklen_t; #define FD_IN_FDSET(FD) ((FD)ifr_name)) #endif /*osdSockH*/