modernize replace deprecated headers (#897)
This commit is contained in:
parent
48298e1670
commit
e801d2e6de
@ -104,7 +104,7 @@ bool sleep_and_input(int* c, int sleep)
|
||||
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
|
||||
struct set_keypress
|
||||
{
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
#include "print.hpp"
|
||||
|
||||
#include <stdlib.h> // for atoi
|
||||
#include <string.h> // for strlen
|
||||
#include <cstdlib> // for atoi
|
||||
#include <cstring> // for strlen
|
||||
#include <cmath>
|
||||
#include <algorithm> // for std::min
|
||||
#include <iterator> // for back_inserter
|
||||
|
@ -39,7 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <kernel/OS.h>
|
||||
#include <stdlib.h> // malloc/free
|
||||
#elif !defined TORRENT_WINDOWS
|
||||
#include <stdlib.h> // posix_memalign/free
|
||||
#include <cstdlib> // posix_memalign/free
|
||||
#include <unistd.h> // _SC_PAGESIZE
|
||||
#endif
|
||||
|
||||
|
@ -50,7 +50,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdarg>
|
||||
#include <cstdio> // for snprintf
|
||||
#include <cinttypes> // for PRId64 et.al.
|
||||
@ -118,9 +118,9 @@ std::string demangle(char const* name)
|
||||
std::string demangle(char const* name) { return name; }
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <csignal>
|
||||
#include "libtorrent/version.hpp"
|
||||
|
||||
#if TORRENT_USE_EXECINFO
|
||||
|
@ -39,7 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <stdlib.h> // for wcstombscstombs
|
||||
#include <cstdlib> // for wcstombscstombs
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
@ -50,7 +50,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#if TORRENT_USE_SYSCTL
|
||||
|
@ -85,7 +85,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h> // for IOV_MAX
|
||||
#include <climits> // for IOV_MAX
|
||||
|
||||
#ifdef TORRENT_WINDOWS
|
||||
// windows part
|
||||
@ -112,7 +112,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#include <dirent.h>
|
||||
|
||||
#ifdef TORRENT_LINUX
|
||||
|
@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <cctype>
|
||||
#include <algorithm>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
|
@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include <stdlib.h> // free and calloc
|
||||
#include <cstdlib> // free and calloc
|
||||
#include <new> // for bad_alloc
|
||||
#include "libtorrent/packet_buffer.hpp"
|
||||
#include "libtorrent/assert.hpp"
|
||||
|
@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/bt_peer_connection.hpp"
|
||||
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
#include <stdarg.h> // for va_start, va_end
|
||||
#include <cstdarg> // for va_start, va_end
|
||||
#endif
|
||||
|
||||
namespace libtorrent
|
||||
|
@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "libtorrent/performance_counters.hpp"
|
||||
#include "libtorrent/assert.hpp"
|
||||
#include <string.h> // for memset
|
||||
#include <cstring> // for memset
|
||||
|
||||
namespace libtorrent {
|
||||
|
||||
|
@ -74,7 +74,7 @@ type width assuptions in the comment above.
|
||||
// this whole file is just preserved and warnings are suppressed
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
|
||||
#include <csetjmp> /* for setjmp(), longjmp(), and jmp_buf */
|
||||
#include <cstdint> /* for types with size guarantees */
|
||||
#include "libtorrent/puff.hpp" /* prototype for puff() */
|
||||
|
||||
|
@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/aux_/time.hpp" // for aux::time_now()
|
||||
#include "libtorrent/debug.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||
|
||||
|
@ -49,7 +49,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#define TORRENT_UT_SEQ 1
|
||||
|
||||
#if TORRENT_UTP_LOG
|
||||
#include <stdarg.h>
|
||||
#include <cstdarg>
|
||||
#include <cinttypes> // for PRId64 et.al.
|
||||
#include "libtorrent/socket_io.hpp"
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
#include <functional>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
|
@ -39,7 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio> // for snprintf
|
||||
#include <cinttypes> // for PRId64 et.al.
|
||||
|
||||
|
@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <libtorrent/enum_net.hpp>
|
||||
#include <libtorrent/socket.hpp>
|
||||
#include <libtorrent/broadcast_socket.hpp>
|
||||
|
@ -33,8 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <iostream>
|
||||
#include <boost/config.hpp>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // for exit()
|
||||
#include <cstdio>
|
||||
#include <cstdlib> // for exit()
|
||||
#include "libtorrent/address.hpp"
|
||||
#include "libtorrent/socket.hpp"
|
||||
#include "setup_transfer.hpp" // for _g_test_failures
|
||||
@ -46,7 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "libtorrent/assert.hpp"
|
||||
#include "libtorrent/file.hpp"
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h> // fot SetErrorMode
|
||||
|
@ -65,7 +65,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <spawn.h>
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#endif
|
||||
|
||||
#define DEBUG_WEB_SERVER 0
|
||||
|
@ -45,7 +45,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "test.hpp"
|
||||
#include "libtorrent/bitfield.hpp"
|
||||
#include "libtorrent/aux_/cpuid.hpp"
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
|
@ -38,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/kademlia/dht_observer.hpp"
|
||||
#include "libtorrent/error_code.hpp"
|
||||
#include "libtorrent/socket_io.hpp" // for print_endpoint
|
||||
#include <stdarg.h>
|
||||
#include <cstdarg>
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
|
@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include "test.hpp"
|
||||
#include "libtorrent/part_file.hpp"
|
||||
#include "libtorrent/file.hpp"
|
||||
|
@ -45,7 +45,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "setup_transfer.hpp"
|
||||
#include <vector>
|
||||
#include <memory> // for shared_ptr
|
||||
#include <stdarg.h>
|
||||
#include <cstdarg>
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
|
@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/hex.hpp"
|
||||
#include "libtorrent/string_util.hpp"
|
||||
#include <iostream>
|
||||
#include <string.h> // for strcmp
|
||||
#include <cstring> // for strcmp
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
|
@ -34,8 +34,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/io.hpp"
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <cerrno>
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <cstdio>
|
||||
#include <cinttypes> // for PRId64 et.al.
|
||||
|
Loading…
x
Reference in New Issue
Block a user