luasocket/src/usocket.h

45 lines
1.1 KiB
C
Raw Normal View History

2003-03-28 22:08:50 +01:00
/*=========================================================================*\
2003-05-25 03:54:13 +02:00
* Socket compatibilization module for Unix
2003-03-28 22:08:50 +01:00
*
* RCS ID: $Id$
\*=========================================================================*/
#ifndef USOCKET_H
#define USOCKET_H
2002-07-08 22:14:09 +02:00
/*=========================================================================*\
* BSD include files
\*=========================================================================*/
/* error codes */
#include <errno.h>
/* close function */
#include <unistd.h>
/* fnctnl function and associated constants */
#include <fcntl.h>
/* struct timeval and CLK_TCK */
#include <sys/time.h>
/* times function and struct tms */
#include <sys/times.h>
/* struct sockaddr */
#include <sys/types.h>
/* socket function */
#include <sys/socket.h>
/* gethostbyname and gethostbyaddr functions */
#include <netdb.h>
/* sigpipe handling */
#include <signal.h>
2003-03-21 02:07:23 +01:00
/* IP stuff*/
2002-07-08 22:14:09 +02:00
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef __APPLE__
/* for some reason socklen_t is not defined in mac os x */
typedef int socklen_t;
#endif
2003-05-25 03:54:13 +02:00
typedef int t_sock;
typedef t_sock *p_sock;
2002-07-08 22:14:09 +02:00
2003-05-25 03:54:13 +02:00
#define SOCK_INVALID (-1)
2002-07-08 22:14:09 +02:00
#endif /* USOCKET_H */