tor/src/common/compat.h
Nick Mathewson 4e11c2ca6c Extract getpass to a new lib/term library
(Term is short for terminal)
2018-06-29 12:21:52 -04:00

92 lines
2.2 KiB
C

/* Copyright (c) 2003-2004, Roger Dingledine
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#ifndef TOR_COMPAT_H
#define TOR_COMPAT_H
#include "orconfig.h"
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#ifndef SIO_IDEAL_SEND_BACKLOG_QUERY
#define SIO_IDEAL_SEND_BACKLOG_QUERY 0x4004747b
#endif
#endif
#include "lib/cc/torint.h"
#include "lib/testsupport/testsupport.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <stdarg.h>
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET6_IN6_H
#include <netinet6/in6.h>
#endif
#include "lib/cc/compat_compiler.h"
#include "lib/arch/bytes.h"
#include "lib/time/compat_time.h"
#include "lib/string/compat_ctype.h"
#include "lib/string/compat_string.h"
#include "lib/string/printf.h"
#include "lib/log/win32err.h"
#include "lib/net/socket.h"
#include "lib/net/ipv4.h"
#include "lib/net/ipv6.h"
#include "lib/net/resolve.h"
#include "lib/fs/files.h"
#include "lib/fs/mmap.h"
#include "lib/fs/userdb.h"
#include "lib/wallclock/timeval.h"
#include "lib/intmath/cmp.h"
#include <stdio.h>
#include <errno.h>
/* ===== Time compatibility */
/* ===== File compatibility */
/* ===== Net compatibility */
/** Specified SOCKS5 status codes. */
typedef enum {
SOCKS5_SUCCEEDED = 0x00,
SOCKS5_GENERAL_ERROR = 0x01,
SOCKS5_NOT_ALLOWED = 0x02,
SOCKS5_NET_UNREACHABLE = 0x03,
SOCKS5_HOST_UNREACHABLE = 0x04,
SOCKS5_CONNECTION_REFUSED = 0x05,
SOCKS5_TTL_EXPIRED = 0x06,
SOCKS5_COMMAND_NOT_SUPPORTED = 0x07,
SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED = 0x08,
} socks5_reply_status_t;
/* ===== OS compatibility */
/* This needs some of the declarations above so we include it here. */
#include "lib/thread/threads.h"
#endif /* !defined(TOR_COMPAT_H) */