[clang-tidy] C to C++ headers

Found with modernize-deprecated-headers

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2019-11-18 17:11:16 -08:00 committed by ridiculousfish
parent 0dfa7421f3
commit 8d54e928cd
32 changed files with 86 additions and 98 deletions

View file

@ -19,11 +19,11 @@
#include "builtin.h"
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <algorithm>
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <cwchar>
#include <memory>

View file

@ -5,11 +5,10 @@
#include "builtin_argparse.h"
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <cerrno>
#include <cstddef>
#include <cstdint>
#include <cwchar>
#include <memory>
#include <string>

View file

@ -3,9 +3,8 @@
#include "builtin_bg.h"
#include <errno.h>
#include <stdlib.h>
#include <cerrno>
#include <cstdlib>
#include <memory>
#include <vector>

View file

@ -3,9 +3,8 @@
#include "builtin_bind.h"
#include <errno.h>
#include <stddef.h>
#include <cerrno>
#include <cstddef>
#include <memory>
#include <set>
#include <string>

View file

@ -3,7 +3,7 @@
#include "builtin_block.h"
#include <stddef.h>
#include <cstddef>
#include "builtin.h"
#include "common.h"

View file

@ -3,9 +3,8 @@
#include "builtin.h"
#include <stddef.h>
#include <algorithm>
#include <cstddef>
#include <string>
#include "builtin_builtin.h"

View file

@ -3,10 +3,11 @@
#include "builtin_cd.h"
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <cerrno>
#include "builtin.h"
#include "common.h"
#include "env.h"

View file

@ -1,10 +1,9 @@
// Functions used for implementing the commandline builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
#include <cerrno>
#include <cstddef>
#include <cstdlib>
#include <cwchar>
#include "builtin.h"
@ -129,7 +128,7 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
const wchar_t *current_buffer = 0;
// What the commandline builtin considers to be the current cursor position.
size_t current_cursor_pos = static_cast<size_t>(-1);
auto current_cursor_pos = static_cast<size_t>(-1);
wchar_t *cmd = argv[0];
int buffer_part = 0;

View file

@ -1,8 +1,7 @@
// Functions used for implementing the complete builtin.
#include "config.h" // IWYU pragma: keep
#include <stddef.h>
#include <cstddef>
#include <cwchar>
#include <memory>
#include <string>

View file

@ -3,9 +3,8 @@
#include "builtin_disown.h"
#include <errno.h>
#include <signal.h>
#include <cerrno>
#include <csignal>
#include <set>
#include "builtin.h"

View file

@ -3,8 +3,8 @@
#include "builtin_echo.h"
#include <limits.h>
#include <stddef.h>
#include <climits>
#include <cstddef>
#include "builtin.h"
#include "common.h"

View file

@ -1,8 +1,8 @@
// Functions for executing the eval builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stddef.h>
#include <cerrno>
#include <cstddef>
#include "builtin.h"
#include "common.h"

View file

@ -3,8 +3,8 @@
#include "builtin_exit.h"
#include <errno.h>
#include <stddef.h>
#include <cerrno>
#include <cstddef>
#include "builtin.h"
#include "common.h"

View file

@ -3,10 +3,9 @@
#include "builtin_fg.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cwchar>
#include "builtin.h"

View file

@ -3,11 +3,11 @@
#include "builtin_function.h"
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <cerrno>
#include <cstddef>
#include <cstdlib>
#include <memory>
#include <string>
#include <vector>

View file

@ -3,10 +3,10 @@
#include "builtin_functions.h"
#include <stddef.h>
#include <unistd.h>
#include <algorithm>
#include <cstddef>
#include <cwchar>
#include <map>
#include <memory>

View file

@ -3,10 +3,9 @@
#include "builtin_history.h"
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <cerrno>
#include <cstddef>
#include <cstdint>
#include <cwchar>
#include <string>
#include <vector>

View file

@ -1,10 +1,11 @@
// Functions for executing the jobs builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stddef.h>
#include <sys/time.h>
#include <cerrno>
#include <cstddef>
#include "builtin.h"
#include "common.h"
#include "fallback.h" // IWYU pragma: keep

View file

@ -3,11 +3,10 @@
#include "builtin_math.h"
#include <errno.h>
#include <stddef.h>
#include <algorithm>
#include <cerrno>
#include <cmath>
#include <cstddef>
#include <cstring>
#include <limits>
#include <string>

View file

@ -50,18 +50,18 @@
// This file has been imported from source code of printf command in GNU Coreutils version 6.9.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <wctype.h>
#include <cerrno>
#include <climits>
#include <clocale>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <cwchar>
#include <cwctype>
#include "builtin.h"
#include "common.h"

View file

@ -3,10 +3,9 @@
#include "builtin_random.h"
#include <errno.h>
#include <stdint.h>
#include <algorithm>
#include <cerrno>
#include <cstdint>
#include <cwchar>
#include <random>

View file

@ -3,14 +3,14 @@
#include "builtin_read.h"
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <algorithm>
#include <cerrno>
#include <climits>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cwchar>
#include <memory>

View file

@ -3,9 +3,8 @@
#include "builtin_realpath.h"
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cwchar>

View file

@ -3,8 +3,8 @@
#include "builtin_return.h"
#include <errno.h>
#include <stddef.h>
#include <cerrno>
#include <cstddef>
#include "builtin.h"
#include "common.h"

View file

@ -1,13 +1,13 @@
// Functions used for implementing the set builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <algorithm>
#include <cerrno>
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <cwchar>
#include <iterator>

View file

@ -1,8 +1,8 @@
// Functions used for implementing the set_color builtin.
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <cstddef>
#include <cstdlib>
#if HAVE_CURSES_H
#include <curses.h>

View file

@ -3,8 +3,7 @@
#include "builtin_status.h"
#include <stddef.h>
#include <cstddef>
#include <cwchar>
#include <string>

View file

@ -5,15 +5,13 @@
#ifdef _WIN32
#define PCRE2_STATIC
#endif
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <wctype.h>
#include <algorithm>
#include <cerrno>
#include <climits>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cwchar>
#include <cwctype>
#include <iterator>

View file

@ -5,16 +5,16 @@
#include "builtin.h"
#include <errno.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <wctype.h>
#include <cerrno>
#include <cmath>
#include <cstdarg>
#include <cstring>
#include <cwchar>
#include <cwctype>
#include <memory>
#include <string>
#include <type_traits>

View file

@ -1,10 +1,11 @@
// Functions used for implementing the ulimit builtin.
#include "config.h" // IWYU pragma: keep
#include <errno.h>
#include <stddef.h>
#include <sys/resource.h>
#include <cerrno>
#include <cstddef>
#include "builtin.h"
#include "common.h"
#include "fallback.h" // IWYU pragma: keep

View file

@ -3,10 +3,9 @@
#include "color.h"
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cwchar> // IWYU pragma: keep
#include "common.h"

View file

@ -1,12 +1,13 @@
// fish_test_helper is a little program with no fish dependencies that acts like certain other
// programs, allowing fish to test its behavior.
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <cstring>
static void become_foreground_then_print_stderr() {
if (tcsetpgrp(STDOUT_FILENO, getpgrp()) < 0) {
perror("tcsetgrp");