From e269044ce0434489d2e8e9d65953c7519f4ffd64 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 29 Jun 2018 10:51:15 -0400 Subject: Remove compat.c and util.c --- src/common/compat.c | 108 ---------------------------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 src/common/compat.c (limited to 'src/common/compat.c') diff --git a/src/common/compat.c b/src/common/compat.c deleted file mode 100644 index c159e65c79..0000000000 --- a/src/common/compat.c +++ /dev/null @@ -1,108 +0,0 @@ -/* 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 */ - -/** - * \file compat.c - * \brief Wrappers to make calls more portable. This code defines - * functions such as tor_snprintf, get/set various data types, - * renaming, setting socket options, switching user IDs. It is basically - * where the non-portable items are conditionally included depending on - * the platform. - **/ - -#define COMPAT_PRIVATE -#include "common/compat.h" - -#ifdef _WIN32 -#include -#include -#include -#endif - -#ifdef HAVE_UNAME -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SYSCTL_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_UTIME_H -#include -#endif -#ifdef HAVE_SYS_UTIME_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_FCNTL_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_GRP_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_SYS_STATVFS_H -#include -#endif -#ifdef HAVE_SYS_CAPABILITY_H -#include -#endif - -/* Includes for the process attaching prevention */ -#if defined(HAVE_SYS_PRCTL_H) && defined(__linux__) -/* Only use the linux prctl; the IRIX prctl is totally different */ -#include -#elif defined(__APPLE__) -#include -#endif /* defined(HAVE_SYS_PRCTL_H) && defined(__linux__) || ... */ - -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include /* FreeBSD needs this to know what version it is */ -#endif -#include -#include -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_MMAP -#include -#endif -#ifdef HAVE_SYS_SYSLIMITS_H -#include -#endif -#ifdef HAVE_SYS_FILE_H -#include -#endif - -#include "lib/log/torlog.h" -#include "common/util.h" -#include "lib/container/smartlist.h" -#include "lib/wallclock/tm_cvt.h" -#include "lib/net/address.h" -#include "lib/sandbox/sandbox.h" - -/* - * Process control - */ -- cgit v1.2.3-54-g00ecf