spporting.hpp
865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright 2008 Stephen Liu
* For license terms, see the file COPYING along with this library.
*/
#ifndef __spporting_hpp__
#define __spporting_hpp__
#ifdef WIN32
#include "spwin32port.hpp"
#else
#include <unistd.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <syslog.h>
#include <unistd.h>
#include <sys/time.h>
#include <signal.h>
#include <sys/resource.h>
#define sp_syslog syslog
#define sp_openlog openlog
#define sp_closelog closelog
#define sp_inet_aton inet_aton
#define sp_close close
#define sp_writev writev
#define sp_socketpair socketpair
#define sp_gettimeofday gettimeofday
inline int sp_initsock()
{
return 0;
}
#ifndef LOG_PERROR
#define LOG_PERROR 0
#endif
#endif
#endif