added more prototypes for C++

This commit is contained in:
Jeff Hill
1996-06-19 20:04:39 +00:00
parent db44eedef4
commit 093a0533c4

View File

@@ -11,12 +11,12 @@
#ifndef bsdProtInc
#define bsdProtInc
#if defined (SUNOS4) || defined(MULTINET)
#ifdef __cplusplus
extern "C" {
#endif
#if defined (SUNOS4) || defined(MULTINET)
#include <epicsTypes.h>
@@ -29,31 +29,55 @@ int ftruncate (int fd, long length);
#ifndef NOBSDNETPROTO
#ifndef __cplusplus
void bzero (char *b, int length);
int select (int width, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout);
int setsockopt (int socket, int level, int optname,
char *optval, int optlen);
int send (int socket, char *buf, int len, int flags);
int sendto (int socket, char *buf, int len,
int flags, struct sockaddr *to, int tolen);
int connect (int socket, struct sockaddr *name, int namelen);
unsigned long inet_addr (char *);
#endif
/*
* sun's CC defines at least a few of these under sunos4
*/
#if !defined(__SUNPRO_CC) && defined(SUNOS4)
int socket (int domain, int type, int protocol);
int bind (int socket, struct sockaddr *name, int namelen);
int listen (int socket, int backlog);
int accept (int socket, struct sockaddr *addr, int *addrlen);
int shutdown (int socket, int how);
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);
void bzero (char *b, int length);
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 socket (int domain, int type, int protocol);
int recvfrom (int socket, char *buf, int len,
int flags, struct sockaddr *from, int *fromlen);
int getpeername (int socket, struct sockaddr *name, int *namelen);
int getsockname (int socket, struct sockaddr *name, int *namelen);
/*
* from /usr/include/arpa/inet.h
* (which under sunos4 does not include arguments for C++)
* (__SUNPRO_CC supplies this file but g++ does not supply an ansi protottype)
*/
unsigned long inet_addr (char *);
char * inet_ntoa (struct in_addr in);
/*
* from /usr/include/netdb.h
* (which under sunos4 does not include arguments for C++)
* (__SUNPRO_CC supplies this file but g++ does not)
*/
struct hostent *gethostbyaddr(char *addr, int len, int type);
#endif /* !defined(__SUNPRO_CC) && defined(SUNOS4) */
#ifdef __SUNPRO_CC
#include <arpa/inet.h>
#endif
#if !defined (htonl) || defined(MULTINET)
epicsInt32 htonl (epicsInt32);
epicsInt16 htons (epicsInt16);
@@ -61,13 +85,13 @@ epicsInt32 ntohl (epicsInt32);
epicsInt16 ntohs (epicsInt16);
#endif
#endif /*BSDNETPROTO*/
#endif /* defined(SUNOS4) */
#endif /*NOBSDNETPROTO*/
#ifdef __cplusplus
}
#endif
#endif /* defined(SUNOS4) */
#endif /* bsdProtInc */