/*
Copyright (c) 1993 Xerox Corporation.  All rights reserved.
*/
/*
$Id$

$Date$
 */

/*
 * sockets
 *
 * NOT POSIX.1 ...
 */

#ifndef	←←PCR←socket←h
#define ←←PCR←socket←h 1


#ifndef ←←PCR←IOSocket←h
#   include <io/PCR←IOSocket.h>
#endif


#if (PCR←IOSocket←IMPL)

extern int
PCR←accept(int s, struct sockaddr *addr, int *addrlen);

extern int
PCR←bind(int s, struct sockaddr *name, int namelen);

extern int
PCR←connect(int s, struct sockaddr *name, int namelen);

extern int
PCR←getpeername(int s, struct sockaddr *name, int *namelen);

extern int
PCR←getsockname(int s, struct sockaddr *name, int *namelen);

extern int
PCR←getsockopt(
    int s, int level, int optname, char *optval, int *optlen
);

extern int
PCR←listen(int s, int backlog);

extern int
PCR←recv(int s, char *buf, int len, int flags);

extern int
PCR←recvfrom(
    int s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen
);

extern int
PCR←recvmsg(int s, struct msghdr *msg, int flags);

extern int
PCR←send(int s, char *msg, int len, int flags);

extern int
PCR←sendto(
    int s, char *msg, int len, int flags, struct sockaddr *to, int tolen
);

extern int
PCR←sendmsg(int s, struct msghdr *msg, int flags);

extern int
PCR←setsockopt(
    int s, int level, int optname, char *optval, int optlen
);

extern int
PCR←shutdown(int s, int how);

extern int
PCR←socket(int domain, int type, int protocol);

extern int
PCR←socketpair(int domain, int type, int protocol, int sv[2]);


#ifndef PCR←NO←RENAME

#   undef accept
#   undef bind
#   undef connect
#   undef getpeername
#   undef getsockname
#   undef getsockopt
#   undef listen
#   undef recv
#   undef recvfrom
#   undef recvmsg
#   undef send
#   undef sendto
#   undef sendmsg
#   undef setsockopt
#   undef shutdown
#   undef socket
#   undef socketpair


#   define accept	PCR←accept
#   define bind		PCR←bind
#   define connect	PCR←connect
#   define getpeername	PCR←getpeername
#   define getsockname	PCR←getsockname
#   define getsockopt	PCR←getsockopt
#   define listen	PCR←listen
#   define recv		PCR←recv
#   define recvfrom	PCR←recvfrom
#   define recvmsg	PCR←recvmsg
#   define send		PCR←send
#   define sendto	PCR←sendto
#   define sendmsg	PCR←sendmsg
#   define setsockopt	PCR←setsockopt
#   define shutdown	PCR←shutdown
#   define socket	PCR←socket
#   define socketpair	PCR←socketpair

#endif /* PCR←NO←RENAME */


#elif defined(PCR←NO←HOSTDEP←ERR)
    /* ... */
#else
#   error sockets unimplemented for this host / os
#endif /* PCR←IOSocket←IMPL */

#endif /* !←←PCR←socket←h */

/*
$Log$
*/