1 /* CVS socket client stuff.
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details. */
13 #ifndef SOCKET_CLIENT_H__
14 #define SOCKET_CLIENT_H__ 1
18 struct buffer *socket_buffer_initialize
19 (int, int, void (*) (struct buffer *));
21 # if defined(AUTH_CLIENT_SUPPORT) || defined(HAVE_KERBEROS) || defined(HAVE_GSSAPI) || defined(SOCK_ERRNO) || defined(SOCK_STRERROR)
22 # ifdef HAVE_WINSOCK_H
24 # else /* No winsock.h */
25 # include <sys/socket.h>
26 # include <netinet/in.h>
27 # include <arpa/inet.h>
29 # endif /* No winsock.h */
32 /* If SOCK_ERRNO is defined, then send()/recv() and other socket calls
33 do not set errno, but that this macro should be used to obtain an
34 error code. This probably doesn't make sense unless
35 NO_SOCKET_TO_FD is also defined. */
37 # define SOCK_ERRNO errno
40 /* If SOCK_STRERROR is defined, then the error codes returned by
41 socket operations are not known to strerror, and this macro must be
42 used instead to convert those error codes to strings. */
43 # ifndef SOCK_STRERROR
44 # define SOCK_STRERROR strerror
51 extern char *strerror (int);
53 # endif /* ! SOCK_STRERROR */
55 struct hostent *init_sockaddr (struct sockaddr_in *, char *, unsigned int);
57 #endif /* SOCKET_CLIENT_H__ */