1 /* @(#) define OS-specific types/constants
3 * Copyright 2008-2011 Pavel V. Cherenkov (pcherenkov@gmail.com) (pcherenkov@gmail.com)
5 * This file is part of udpxy.
7 * udpxy is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * udpxy is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with udpxy. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef UDPXY_OSDEFH_0101082158
22 #define UDPXY_OSDEFH_0101082158
24 #include <sys/socket.h>
26 /* define OS-specific types/constants
31 #define HAS_SETLINEBUF
38 #define NO_SOCKADDR_SA_LEN
41 #if defined(__CYGWIN__)
42 #define NO_INET6_SUPPORT
43 #define NO_SOCKADDR_SA_LEN
47 #define NO_SOCKADDR_SA_LEN
51 typedef int a_socklen_t
;
53 typedef socklen_t a_socklen_t
;
56 #ifndef HAS_SETLINEBUF
57 #define Setlinebuf(a) setvbuf(a, NULL, _IOLBF, BUFSIZ)
59 #define Setlinebuf(a) setlinebuf(a)
62 #if defined(HAS_VARRUN)
63 #define PIDFILE_DIR "/var/run"
64 #elif defined(HAS_VARTMP)
65 #define PIDFILE_DIR "/var/tmp"
68 #endif /* UDPXY_OSDEFH_0101082158 */