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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
/*
---------------------------------------------------------------------------
platform.h,v 1.10 2004/06/29 15:06:12 jpdionne Exp
---------------------------------------------------------------------------
* This source code copyright (c) Hexago Inc. 2002-2004.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) Version 2,
* June 1991 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file GPL_LICENSE.txt. If not, write
* to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
---------------------------------------------------------------------------
*/
/* Linux */
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
#ifdef _USES_SYS_TIME_H_
#include <sys/time.h>
#define GETTIMEOFDAY(A, B) \
gettimeofday(A, B)
#endif
#ifdef _USES_NETDB_H_
#include <netdb.h>
#endif
#ifdef _USES_SYS_IOCTL_H_
#include <sys/ioctl.h>
#endif
#ifdef _USES_SYS_SOCKET_H_
#include <sys/socket.h>
#define SOCKET int
#endif
#ifdef _USES_NETINET_IN_H_
#include <netinet/in.h>
#endif
#ifdef _USES_NETINET_IP6_H_
#include <netinet/ip6.h>
#endif
#ifdef _USES_NETINET_ICMP6_H_
#include <netinet/icmp6.h>
#endif
#ifdef _USES_NET_IF_H_
#include <net/if.h>
#endif
#ifdef _USES_ARPA_INET_H_
#include <arpa/inet.h>
#define INET_PTON(A, B, C)\
inet_pton(A, B, C)
#endif
#ifdef _USES_SYSLOG_H_
#include <syslog.h>
#define SYSLOG(A,B)\
syslog(A, B)
#define OPENLOG(A,B,C)\
openlog(A, B, C)
#define CLOSELOG\
closelog
#endif
#define SLEEP(A)\
sleep(A)
#define RANDOM \
rand
#define SRANDOM \
srand
#define SCRIPT_TMP_FILE "/tmp/tspc-tmp.log"
#endif
|