2008-01-28 21:37:16 +00:00
|
|
|
/* source: xioconfig.h */
|
2008-01-27 12:00:08 +00:00
|
|
|
/* Copyright Gerhard Rieger 2001-2007 */
|
|
|
|
/* Published under the GNU General Public License V.2, see file COPYING */
|
|
|
|
|
|
|
|
#ifndef __xioconfig_h_included
|
|
|
|
#define __xioconfig_h_included 1
|
|
|
|
|
|
|
|
/* ensure some dependencies between configure WITH defines. must be included
|
|
|
|
past config.h */
|
|
|
|
|
|
|
|
#if WITH_STDIO || WITH_FDNUM
|
|
|
|
# define WITH_FD 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_FILE || WITH_GOPEN || WITH_CREAT || WITH_PIPE
|
|
|
|
# define WITH_OPEN 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_OPEN || WITH_PIPE || WITH_UNIX || WITH_PTY
|
|
|
|
# define WITH_NAMED 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_SOCKS4A
|
2008-02-17 13:59:16 +00:00
|
|
|
# define _WITH_SOCKS4 1
|
2008-01-27 12:00:08 +00:00
|
|
|
#endif
|
|
|
|
|
2008-02-17 13:59:16 +00:00
|
|
|
#if WITH_SOCKS4 || WITH_SOCKS5 || WITH_PROXY
|
|
|
|
# define _WITH_TCP 1
|
|
|
|
# define _WITH_IP4 1 /* currently this socks implementation does not work
|
2008-01-27 12:00:08 +00:00
|
|
|
with IP6 */
|
|
|
|
#endif
|
|
|
|
|
2008-02-17 13:59:16 +00:00
|
|
|
#if 0
|
|
|
|
#if !defined(HAVE_NETINET_IP6_H)
|
|
|
|
# undef WITH_IP6
|
|
|
|
#endif
|
2008-01-27 12:00:08 +00:00
|
|
|
#endif
|
|
|
|
|
2008-02-17 13:59:16 +00:00
|
|
|
#if WITH_OPENSSL
|
|
|
|
# define _WITH_TCP 1
|
|
|
|
# define _WITH_IP4 1
|
|
|
|
# if WITH_IP6
|
|
|
|
# define _WITH_IP6 1
|
2008-01-27 12:00:08 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !WITH_IP4 && !WITH_IP6
|
|
|
|
# if WITH_TCP || WITH_UDP || WITH_RAWIP
|
|
|
|
# define WITH_IP4 1
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2008-02-17 13:59:16 +00:00
|
|
|
#if WITH_UNIX || HAVE_SYS_UN_H
|
|
|
|
# define _WITH_UNIX 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_IP4 || WITH_IP6 || WITH_SOCKS4 || WITH_RAWIP || _WITH_UNIX
|
2008-01-27 12:00:08 +00:00
|
|
|
# define WITH_SOCKET 1
|
|
|
|
#else
|
|
|
|
# undef WITH_SOCKET
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !WITH_SOCKET
|
|
|
|
# undef WITH_LISTEN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !WITH_LISTEN
|
|
|
|
# undef WITH_LIBWRAP
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_SOCKET || WITH_TUN
|
|
|
|
# define _WITH_SOCKET 1
|
|
|
|
#endif
|
|
|
|
|
2008-02-17 13:59:16 +00:00
|
|
|
#if WITH_TCP
|
|
|
|
# define _WITH_TCP 1
|
|
|
|
# define _WITH_IP4 1
|
|
|
|
# if WITH_IP6
|
|
|
|
# define _WITH_IP6 1
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2008-01-27 12:00:08 +00:00
|
|
|
#if WITH_IP4 || WITH_TUN
|
|
|
|
# define _WITH_IP4 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_IP6 || WITH_TUN
|
|
|
|
# define _WITH_IP6 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_NAMED || WITH_TUN
|
|
|
|
# define _WITH_NAMED 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if WITH_FILE || WITH_TUN
|
|
|
|
# define _WITH_FILE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if HAVE_DEV_PTMX && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_PTSNAME
|
|
|
|
#else
|
|
|
|
# undef HAVE_DEV_PTMX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_DEV_PTC /* && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_PTSNAME */
|
|
|
|
#else
|
|
|
|
# undef HAVE_DEV_PTC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* MacOS does not seem to have any pty implementation */
|
|
|
|
#if WITH_PTY && (HAVE_DEV_PTC || HAVE_DEV_PTMX || HAVE_OPENPTY)
|
|
|
|
# define HAVE_PTY 1
|
|
|
|
#else
|
|
|
|
# undef HAVE_PTY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_TYPE_SOCKLEN
|
|
|
|
typedef int socklen_t;
|
|
|
|
#endif /* !defined(HAVE_TYPE_SOCKLEN) */
|
|
|
|
|
|
|
|
#ifndef HAVE_TYPE_UINT8
|
|
|
|
typedef unsigned char uint8_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_TYPE_UINT16
|
|
|
|
typedef unsigned short uint16_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_TYPE_UINT32
|
|
|
|
typedef unsigned int uint32_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* !defined(__xioconfig_h_included) */
|