diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2024-02-20 13:43:08 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-02-20 13:49:04 +0100 |
commit | 40a75722c43ae24cb9a99d6730a3b25b65819c49 (patch) | |
tree | a5e7292b13ed1a77a443f367ea0fd7b2e66b0742 /methods | |
parent | 04ea92054757272c344afdf8d8e68046c7678b37 (diff) |
Modernize standard library includes
This was automated with sed and git-clang-format, and then I had to
fix up the top of policy.cc by hand as git-clang-format accidentally
indented it by two spaces.
Diffstat (limited to 'methods')
-rw-r--r-- | methods/aptmethod.h | 4 | ||||
-rw-r--r-- | methods/basehttp.cc | 10 | ||||
-rw-r--r-- | methods/basehttp.h | 2 | ||||
-rw-r--r-- | methods/connect.cc | 6 | ||||
-rw-r--r-- | methods/connect.h | 2 | ||||
-rw-r--r-- | methods/ftp.cc | 14 | ||||
-rw-r--r-- | methods/ftp.h | 2 | ||||
-rw-r--r-- | methods/gpgv.cc | 12 | ||||
-rw-r--r-- | methods/http.cc | 10 | ||||
-rw-r--r-- | methods/rfc2553emu.cc | 6 | ||||
-rw-r--r-- | methods/rred.cc | 10 | ||||
-rw-r--r-- | methods/rsh.cc | 12 | ||||
-rw-r--r-- | methods/rsh.h | 2 | ||||
-rw-r--r-- | methods/store.cc | 2 |
14 files changed, 47 insertions, 47 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h index afc761cc5..26b8c0b55 100644 --- a/methods/aptmethod.h +++ b/methods/aptmethod.h @@ -16,7 +16,7 @@ #include <string> #include <vector> -#include <stdlib.h> +#include <cstdlib> #include <sys/stat.h> #include <sys/time.h> #include <sys/types.h> @@ -26,7 +26,7 @@ #include <apti18n.h> #ifdef HAVE_SECCOMP -#include <signal.h> +#include <csignal> #include <seccomp.h> #endif diff --git a/methods/basehttp.cc b/methods/basehttp.cc index 9ed308116..26b633cba 100644 --- a/methods/basehttp.cc +++ b/methods/basehttp.cc @@ -16,19 +16,19 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> +#include <cctype> +#include <csignal> +#include <cstdio> +#include <cstdlib> +#include <ctime> #include <iostream> #include <limits> #include <map> #include <string> #include <string_view> #include <vector> -#include <ctype.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> #include <sys/stat.h> #include <sys/time.h> -#include <time.h> #include <unistd.h> #include "basehttp.h" diff --git a/methods/basehttp.h b/methods/basehttp.h index 0f776b0a8..080ea527e 100644 --- a/methods/basehttp.h +++ b/methods/basehttp.h @@ -15,10 +15,10 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> +#include <ctime> #include <iostream> #include <memory> #include <string> -#include <time.h> using std::cout; using std::endl; diff --git a/methods/connect.cc b/methods/connect.cc index bc2fe1de5..110f2fc75 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -22,13 +22,13 @@ #include <gnutls/gnutls.h> #include <gnutls/x509.h> +#include <cerrno> +#include <cstdio> +#include <cstring> #include <list> #include <set> #include <sstream> #include <string> -#include <errno.h> -#include <stdio.h> -#include <string.h> #include <unistd.h> // Internet stuff diff --git a/methods/connect.h b/methods/connect.h index 413484aa3..5c7904950 100644 --- a/methods/connect.h +++ b/methods/connect.h @@ -9,9 +9,9 @@ #ifndef CONNECT_H #define CONNECT_H +#include <cstddef> #include <memory> #include <string> -#include <stddef.h> #include "aptmethod.h" diff --git a/methods/ftp.cc b/methods/ftp.cc index aa0c0692c..379bf32b6 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -22,14 +22,14 @@ #include <apt-pkg/hashes.h> #include <apt-pkg/strutl.h> +#include <cctype> +#include <cerrno> +#include <csignal> +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <iostream> -#include <ctype.h> -#include <errno.h> -#include <signal.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/stat.h> #include <sys/time.h> #include <unistd.h> diff --git a/methods/ftp.h b/methods/ftp.h index da9887bfd..953a1da86 100644 --- a/methods/ftp.h +++ b/methods/ftp.h @@ -13,10 +13,10 @@ #include "connect.h" #include <apt-pkg/strutl.h> +#include <ctime> #include <string> #include <sys/socket.h> #include <sys/types.h> -#include <time.h> class FTPConn { diff --git a/methods/gpgv.cc b/methods/gpgv.cc index 267b43e08..f89aa8d2e 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -7,12 +7,12 @@ #include <apt-pkg/gpgv.h> #include <apt-pkg/strutl.h> -#include <ctype.h> -#include <errno.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cctype> +#include <cerrno> +#include <cstddef> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <sys/wait.h> #include <unistd.h> diff --git a/methods/http.cc b/methods/http.cc index b4519a890..9b4550664 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -26,16 +26,16 @@ #include <apt-pkg/string_view.h> #include <apt-pkg/strutl.h> +#include <cerrno> #include <chrono> +#include <csignal> +#include <cstddef> +#include <cstdio> +#include <cstdlib> #include <cstring> #include <iostream> #include <sstream> #include <arpa/inet.h> -#include <errno.h> -#include <signal.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> #include <sys/select.h> #include <sys/stat.h> #include <sys/time.h> diff --git a/methods/rfc2553emu.cc b/methods/rfc2553emu.cc index 41aa7470e..f5a3fc922 100644 --- a/methods/rfc2553emu.cc +++ b/methods/rfc2553emu.cc @@ -16,11 +16,11 @@ #include <config.h> #include "rfc2553emu.h" +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <arpa/inet.h> #include <netinet/in.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #ifndef HAVE_GETADDRINFO // getaddrinfo - Resolve a hostname /*{{{*/ diff --git a/methods/rred.cc b/methods/rred.cc index 3453bd3bc..aeefea5a2 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -20,17 +20,17 @@ #include <apt-private/private-cmndline.h> +#include <cstddef> #include <iostream> #include <list> #include <string> #include <vector> -#include <stddef.h> #include <cassert> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cerrno> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <sys/stat.h> #include <sys/time.h> diff --git a/methods/rsh.cc b/methods/rsh.cc index f5e12795a..4432d5a5e 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -33,12 +33,12 @@ #include <apt-pkg/strutl.h> #include "rsh.h" -#include <errno.h> -#include <signal.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cerrno> +#include <csignal> +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <sys/stat.h> #include <sys/time.h> #include <unistd.h> diff --git a/methods/rsh.h b/methods/rsh.h index 7545d5815..82ac54319 100644 --- a/methods/rsh.h +++ b/methods/rsh.h @@ -9,8 +9,8 @@ #ifndef APT_RSH_H #define APT_RSH_H +#include <ctime> #include <string> -#include <time.h> #include <apt-pkg/strutl.h> diff --git a/methods/store.cc b/methods/store.cc index ef2008273..8b30efaf3 100644 --- a/methods/store.cc +++ b/methods/store.cc @@ -21,9 +21,9 @@ #include <apt-pkg/hashes.h> #include <apt-pkg/strutl.h> +#include <cstring> #include <string> #include <vector> -#include <string.h> #include <sys/stat.h> #include <sys/time.h> |