diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-03-27 10:02:48 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-03-27 10:02:48 +0000 |
| commit | 79e940e10ce8e62cbbbba1f52e9e03e090fd51bc (patch) | |
| tree | 372a280d63bab86ec9ffddc76ec28b27a7a1b3ee | |
| parent | d3f5f326fc058b244ce08af69c4c7ed0e97d84b8 (diff) | |
| download | busybox-w32-79e940e10ce8e62cbbbba1f52e9e03e090fd51bc.tar.gz busybox-w32-79e940e10ce8e62cbbbba1f52e9e03e090fd51bc.tar.bz2 busybox-w32-79e940e10ce8e62cbbbba1f52e9e03e090fd51bc.zip | |
s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
git-svn-id: svn://busybox.net/trunk/busybox@8663 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | archival/bunzip2.c | 4 | ||||
| -rw-r--r-- | archival/cpio.c | 2 | ||||
| -rw-r--r-- | archival/gunzip.c | 8 | ||||
| -rw-r--r-- | archival/libunarchive/data_extract_to_stdout.c | 2 | ||||
| -rw-r--r-- | archival/rpm2cpio.c | 4 | ||||
| -rw-r--r-- | archival/tar.c | 4 | ||||
| -rw-r--r-- | archival/uncompress.c | 8 | ||||
| -rw-r--r-- | archival/unzip.c | 2 | ||||
| -rw-r--r-- | coreutils/ls.c | 8 | ||||
| -rw-r--r-- | coreutils/md5_sha1_sum.c | 2 | ||||
| -rw-r--r-- | libbb/dump.c | 2 | ||||
| -rw-r--r-- | libbb/print_file.c | 2 | ||||
| -rw-r--r-- | networking/ftpgetput.c | 4 | ||||
| -rw-r--r-- | networking/nc.c | 2 | ||||
| -rw-r--r-- | networking/tftp.c | 2 | ||||
| -rw-r--r-- | networking/wget.c | 4 | ||||
| -rw-r--r-- | patches/tftp_timeout_multicast.diff | 2 | ||||
| -rw-r--r-- | shell/cmdedit.c | 2 | ||||
| -rw-r--r-- | shell/hush.c | 2 | ||||
| -rw-r--r-- | shell/lash.c | 2 | ||||
| -rw-r--r-- | util-linux/more.c | 2 |
21 files changed, 35 insertions, 35 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c index e2c3ca91d..ba422723c 100644 --- a/archival/bunzip2.c +++ b/archival/bunzip2.c | |||
| @@ -52,7 +52,7 @@ int bunzip2_main(int argc, char **argv) | |||
| 52 | /* Open input file */ | 52 | /* Open input file */ |
| 53 | src_fd = bb_xopen(compressed_name, O_RDONLY); | 53 | src_fd = bb_xopen(compressed_name, O_RDONLY); |
| 54 | } else { | 54 | } else { |
| 55 | src_fd = fileno(stdin); | 55 | src_fd = STDIN_FILENO; |
| 56 | opt |= BUNZIP2_OPT_STDOUT; | 56 | opt |= BUNZIP2_OPT_STDOUT; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| @@ -62,7 +62,7 @@ int bunzip2_main(int argc, char **argv) | |||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | if (opt & BUNZIP2_OPT_STDOUT) { | 64 | if (opt & BUNZIP2_OPT_STDOUT) { |
| 65 | dst_fd = fileno(stdout); | 65 | dst_fd = STDOUT_FILENO; |
| 66 | } else { | 66 | } else { |
| 67 | int len = strlen(compressed_name) - 4; | 67 | int len = strlen(compressed_name) - 4; |
| 68 | if (strcmp(compressed_name + len, ".bz2") != 0) { | 68 | if (strcmp(compressed_name + len, ".bz2") != 0) { |
diff --git a/archival/cpio.c b/archival/cpio.c index aff6a55f9..0fbe7b8e5 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
| @@ -47,7 +47,7 @@ extern int cpio_main(int argc, char **argv) | |||
| 47 | 47 | ||
| 48 | /* Initialise */ | 48 | /* Initialise */ |
| 49 | archive_handle = init_handle(); | 49 | archive_handle = init_handle(); |
| 50 | archive_handle->src_fd = fileno(stdin); | 50 | archive_handle->src_fd = STDIN_FILENO; |
| 51 | archive_handle->seek = seek_by_char; | 51 | archive_handle->seek = seek_by_char; |
| 52 | archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE; | 52 | archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE; |
| 53 | 53 | ||
diff --git a/archival/gunzip.c b/archival/gunzip.c index dec53f660..2c4dc49a4 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
| @@ -98,7 +98,7 @@ extern int gunzip_main(int argc, char **argv) | |||
| 98 | optind++; | 98 | optind++; |
| 99 | 99 | ||
| 100 | if (old_path == NULL || strcmp(old_path, "-") == 0) { | 100 | if (old_path == NULL || strcmp(old_path, "-") == 0) { |
| 101 | src_fd = fileno(stdin); | 101 | src_fd = STDIN_FILENO; |
| 102 | opt |= GUNZIP_OPT_STDOUT; | 102 | opt |= GUNZIP_OPT_STDOUT; |
| 103 | } else { | 103 | } else { |
| 104 | src_fd = bb_xopen(old_path, O_RDONLY); | 104 | src_fd = bb_xopen(old_path, O_RDONLY); |
| @@ -119,7 +119,7 @@ extern int gunzip_main(int argc, char **argv) | |||
| 119 | if (opt & GUNZIP_OPT_TEST) { | 119 | if (opt & GUNZIP_OPT_TEST) { |
| 120 | dst_fd = bb_xopen("/dev/null", O_WRONLY); /* why does test use filenum 2 ? */ | 120 | dst_fd = bb_xopen("/dev/null", O_WRONLY); /* why does test use filenum 2 ? */ |
| 121 | } else if (opt & GUNZIP_OPT_STDOUT) { | 121 | } else if (opt & GUNZIP_OPT_STDOUT) { |
| 122 | dst_fd = fileno(stdout); | 122 | dst_fd = STDOUT_FILENO; |
| 123 | } else { | 123 | } else { |
| 124 | char *extension; | 124 | char *extension; |
| 125 | 125 | ||
| @@ -178,10 +178,10 @@ extern int gunzip_main(int argc, char **argv) | |||
| 178 | delete_path = new_path; | 178 | delete_path = new_path; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | if (dst_fd != fileno(stdout)) { | 181 | if (dst_fd != STDOUT_FILENO) { |
| 182 | close(dst_fd); | 182 | close(dst_fd); |
| 183 | } | 183 | } |
| 184 | if (src_fd != fileno(stdin)) { | 184 | if (src_fd != STDIN_FILENO) { |
| 185 | close(src_fd); | 185 | close(src_fd); |
| 186 | } | 186 | } |
| 187 | 187 | ||
diff --git a/archival/libunarchive/data_extract_to_stdout.c b/archival/libunarchive/data_extract_to_stdout.c index 7c4e7c78b..d4137a1a8 100644 --- a/archival/libunarchive/data_extract_to_stdout.c +++ b/archival/libunarchive/data_extract_to_stdout.c | |||
| @@ -18,5 +18,5 @@ | |||
| 18 | 18 | ||
| 19 | extern void data_extract_to_stdout(archive_handle_t *archive_handle) | 19 | extern void data_extract_to_stdout(archive_handle_t *archive_handle) |
| 20 | { | 20 | { |
| 21 | bb_copyfd_size(archive_handle->src_fd, fileno(stdout), archive_handle->file_header->size); | 21 | bb_copyfd_size(archive_handle->src_fd, STDOUT_FILENO, archive_handle->file_header->size); |
| 22 | } | 22 | } |
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c index 7b5059518..5314e5300 100644 --- a/archival/rpm2cpio.c +++ b/archival/rpm2cpio.c | |||
| @@ -73,7 +73,7 @@ extern int rpm2cpio_main(int argc, char **argv) | |||
| 73 | unsigned char magic[2]; | 73 | unsigned char magic[2]; |
| 74 | 74 | ||
| 75 | if (argc == 1) { | 75 | if (argc == 1) { |
| 76 | rpm_fd = fileno(stdin); | 76 | rpm_fd = STDIN_FILENO; |
| 77 | } else { | 77 | } else { |
| 78 | rpm_fd = bb_xopen(argv[1], O_RDONLY); | 78 | rpm_fd = bb_xopen(argv[1], O_RDONLY); |
| 79 | } | 79 | } |
| @@ -96,7 +96,7 @@ extern int rpm2cpio_main(int argc, char **argv) | |||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | check_header_gzip(rpm_fd); | 98 | check_header_gzip(rpm_fd); |
| 99 | if (inflate_gunzip(rpm_fd, fileno(stdout)) != 0) { | 99 | if (inflate_gunzip(rpm_fd, STDOUT_FILENO) != 0) { |
| 100 | bb_error_msg("Error inflating"); | 100 | bb_error_msg("Error inflating"); |
| 101 | } | 101 | } |
| 102 | 102 | ||
diff --git a/archival/tar.c b/archival/tar.c index 2310e80cb..279cbfd46 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -308,7 +308,7 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo, | |||
| 308 | if (tbInfo->verboseFlag) { | 308 | if (tbInfo->verboseFlag) { |
| 309 | FILE *vbFd = stdout; | 309 | FILE *vbFd = stdout; |
| 310 | 310 | ||
| 311 | if (tbInfo->tarFd == fileno(stdout)) /* If the archive goes to stdout, verbose to stderr */ | 311 | if (tbInfo->tarFd == STDOUT_FILENO) /* If the archive goes to stdout, verbose to stderr */ |
| 312 | vbFd = stderr; | 312 | vbFd = stderr; |
| 313 | 313 | ||
| 314 | fprintf(vbFd, "%s\n", header.name); | 314 | fprintf(vbFd, "%s\n", header.name); |
| @@ -883,7 +883,7 @@ int tar_main(int argc, char **argv) | |||
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | #ifdef CONFIG_FEATURE_CLEAN_UP | 885 | #ifdef CONFIG_FEATURE_CLEAN_UP |
| 886 | if (tar_handle->src_fd != fileno(stdin)) { | 886 | if (tar_handle->src_fd != STDIN_FILENO) { |
| 887 | close(tar_handle->src_fd); | 887 | close(tar_handle->src_fd); |
| 888 | } | 888 | } |
| 889 | #endif /* CONFIG_FEATURE_CLEAN_UP */ | 889 | #endif /* CONFIG_FEATURE_CLEAN_UP */ |
diff --git a/archival/uncompress.c b/archival/uncompress.c index 2de37d273..48b4e2cad 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c | |||
| @@ -46,7 +46,7 @@ extern int uncompress_main(int argc, char **argv) | |||
| 46 | int dst_fd; | 46 | int dst_fd; |
| 47 | 47 | ||
| 48 | if (strcmp(compressed_file, "-") == 0) { | 48 | if (strcmp(compressed_file, "-") == 0) { |
| 49 | src_fd = fileno(stdin); | 49 | src_fd = STDIN_FILENO; |
| 50 | flags |= GUNZIP_TO_STDOUT; | 50 | flags |= GUNZIP_TO_STDOUT; |
| 51 | } else { | 51 | } else { |
| 52 | src_fd = bb_xopen(compressed_file, O_RDONLY); | 52 | src_fd = bb_xopen(compressed_file, O_RDONLY); |
| @@ -60,7 +60,7 @@ extern int uncompress_main(int argc, char **argv) | |||
| 60 | 60 | ||
| 61 | /* Set output filename and number */ | 61 | /* Set output filename and number */ |
| 62 | if (flags & GUNZIP_TO_STDOUT) { | 62 | if (flags & GUNZIP_TO_STDOUT) { |
| 63 | dst_fd = fileno(stdout); | 63 | dst_fd = STDOUT_FILENO; |
| 64 | } else { | 64 | } else { |
| 65 | struct stat stat_buf; | 65 | struct stat stat_buf; |
| 66 | char *extension; | 66 | char *extension; |
| @@ -96,10 +96,10 @@ extern int uncompress_main(int argc, char **argv) | |||
| 96 | delete_path = uncompressed_file; | 96 | delete_path = uncompressed_file; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | if (dst_fd != fileno(stdout)) { | 99 | if (dst_fd != STDOUT_FILENO) { |
| 100 | close(dst_fd); | 100 | close(dst_fd); |
| 101 | } | 101 | } |
| 102 | if (src_fd != fileno(stdin)) { | 102 | if (src_fd != STDIN_FILENO) { |
| 103 | close(src_fd); | 103 | close(src_fd); |
| 104 | } | 104 | } |
| 105 | 105 | ||
diff --git a/archival/unzip.c b/archival/unzip.c index c670073f4..4e357d656 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
| @@ -135,7 +135,7 @@ extern int unzip_main(int argc, char **argv) | |||
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | if (*argv[optind] == '-') { | 137 | if (*argv[optind] == '-') { |
| 138 | archive_handle->src_fd = fileno(stdin); | 138 | archive_handle->src_fd = STDIN_FILENO; |
| 139 | archive_handle->seek = seek_by_char; | 139 | archive_handle->seek = seek_by_char; |
| 140 | } else { | 140 | } else { |
| 141 | archive_handle->src_fd = bb_xopen(argv[optind++], O_RDONLY); | 141 | archive_handle->src_fd = bb_xopen(argv[optind++], O_RDONLY); |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 8b5065ac6..5fc60a347 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
| @@ -982,13 +982,13 @@ extern int ls_main(int argc, char **argv) | |||
| 982 | 982 | ||
| 983 | #ifdef CONFIG_FEATURE_AUTOWIDTH | 983 | #ifdef CONFIG_FEATURE_AUTOWIDTH |
| 984 | /* Obtain the terminal width. */ | 984 | /* Obtain the terminal width. */ |
| 985 | get_terminal_width_height(fileno(stdout), &terminal_width, NULL); | 985 | get_terminal_width_height(STDOUT_FILENO, &terminal_width, NULL); |
| 986 | /* Go one less... */ | 986 | /* Go one less... */ |
| 987 | terminal_width--; | 987 | terminal_width--; |
| 988 | #endif | 988 | #endif |
| 989 | 989 | ||
| 990 | #ifdef CONFIG_FEATURE_LS_COLOR | 990 | #ifdef CONFIG_FEATURE_LS_COLOR |
| 991 | if (isatty(fileno(stdout))) | 991 | if (isatty(STDOUT_FILENO)) |
| 992 | show_color = 1; | 992 | show_color = 1; |
| 993 | #endif | 993 | #endif |
| 994 | 994 | ||
| @@ -1060,9 +1060,9 @@ extern int ls_main(int argc, char **argv) | |||
| 1060 | if ((all_fmt & STYLE_MASK) == STYLE_AUTO) | 1060 | if ((all_fmt & STYLE_MASK) == STYLE_AUTO) |
| 1061 | #if STYLE_AUTO != 0 | 1061 | #if STYLE_AUTO != 0 |
| 1062 | all_fmt = (all_fmt & ~STYLE_MASK) | 1062 | all_fmt = (all_fmt & ~STYLE_MASK) |
| 1063 | | (isatty(fileno(stdout)) ? STYLE_COLUMNS : STYLE_SINGLE); | 1063 | | (isatty(STDOUT_FILENO) ? STYLE_COLUMNS : STYLE_SINGLE); |
| 1064 | #else | 1064 | #else |
| 1065 | all_fmt |= (isatty(fileno(stdout)) ? STYLE_COLUMNS : STYLE_SINGLE); | 1065 | all_fmt |= (isatty(STDOUT_FILENO) ? STYLE_COLUMNS : STYLE_SINGLE); |
| 1066 | #endif | 1066 | #endif |
| 1067 | 1067 | ||
| 1068 | /* | 1068 | /* |
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index 64e069374..3a07da055 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
| @@ -55,7 +55,7 @@ static uint8_t *hash_file(const char *filename, uint8_t hash_algo) | |||
| 55 | int src_fd; | 55 | int src_fd; |
| 56 | 56 | ||
| 57 | if (strcmp(filename, "-") == 0) { | 57 | if (strcmp(filename, "-") == 0) { |
| 58 | src_fd = fileno(stdin); | 58 | src_fd = STDIN_FILENO; |
| 59 | } else { | 59 | } else { |
| 60 | src_fd = open(filename, O_RDONLY); | 60 | src_fd = open(filename, O_RDONLY); |
| 61 | } | 61 | } |
diff --git a/libbb/dump.c b/libbb/dump.c index f169da677..52a6c063b 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
| @@ -311,7 +311,7 @@ static void do_skip(char *fname, int statok) | |||
| 311 | struct stat sbuf; | 311 | struct stat sbuf; |
| 312 | 312 | ||
| 313 | if (statok) { | 313 | if (statok) { |
| 314 | if (fstat(fileno(stdin), &sbuf)) { | 314 | if (fstat(STDIN_FILENO, &sbuf)) { |
| 315 | bb_perror_msg_and_die("%s", fname); | 315 | bb_perror_msg_and_die("%s", fname); |
| 316 | } | 316 | } |
| 317 | if ((!(S_ISCHR(sbuf.st_mode) || | 317 | if ((!(S_ISCHR(sbuf.st_mode) || |
diff --git a/libbb/print_file.c b/libbb/print_file.c index bd7108d2f..8f85cb4d6 100644 --- a/libbb/print_file.c +++ b/libbb/print_file.c | |||
| @@ -28,7 +28,7 @@ extern void bb_xprint_and_close_file(FILE *file) | |||
| 28 | bb_xfflush_stdout(); | 28 | bb_xfflush_stdout(); |
| 29 | /* Note: Do not use STDOUT_FILENO here, as this is a lib routine | 29 | /* Note: Do not use STDOUT_FILENO here, as this is a lib routine |
| 30 | * and the calling code may have reassigned stdout. */ | 30 | * and the calling code may have reassigned stdout. */ |
| 31 | if (bb_copyfd_eof(fileno(file), fileno(stdout)) == -1) { | 31 | if (bb_copyfd_eof(fileno(file), STDOUT_FILENO) == -1) { |
| 32 | /* bb_copyfd outputs any needed messages, so just die. */ | 32 | /* bb_copyfd outputs any needed messages, so just die. */ |
| 33 | exit(bb_default_error_retval); | 33 | exit(bb_default_error_retval); |
| 34 | } | 34 | } |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index a13aaa228..47ffb5d98 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
| @@ -154,7 +154,7 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream, | |||
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | if ((local_path[0] == '-') && (local_path[1] == '\0')) { | 156 | if ((local_path[0] == '-') && (local_path[1] == '\0')) { |
| 157 | fd_local = fileno(stdout); | 157 | fd_local = STDOUT_FILENO; |
| 158 | do_continue = 0; | 158 | do_continue = 0; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| @@ -230,7 +230,7 @@ static int ftp_send(ftp_host_info_t *server, FILE *control_stream, | |||
| 230 | 230 | ||
| 231 | /* get the local file */ | 231 | /* get the local file */ |
| 232 | if ((local_path[0] == '-') && (local_path[1] == '\0')) { | 232 | if ((local_path[0] == '-') && (local_path[1] == '\0')) { |
| 233 | fd_local = fileno(stdin); | 233 | fd_local = STDIN_FILENO; |
| 234 | } else { | 234 | } else { |
| 235 | fd_local = bb_xopen(local_path, O_RDONLY); | 235 | fd_local = bb_xopen(local_path, O_RDONLY); |
| 236 | fstat(fd_local, &sbuf); | 236 | fstat(fd_local, &sbuf); |
diff --git a/networking/nc.c b/networking/nc.c index 9a353c94f..3099763b1 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
| @@ -79,7 +79,7 @@ int nc_main(int argc, char **argv) | |||
| 79 | #ifdef GAPING_SECURITY_HOLE | 79 | #ifdef GAPING_SECURITY_HOLE |
| 80 | if (pr00gie) { | 80 | if (pr00gie) { |
| 81 | /* won't need stdin */ | 81 | /* won't need stdin */ |
| 82 | close (fileno(stdin)); | 82 | close (STDIN_FILENO); |
| 83 | } | 83 | } |
| 84 | #endif /* GAPING_SECURITY_HOLE */ | 84 | #endif /* GAPING_SECURITY_HOLE */ |
| 85 | 85 | ||
diff --git a/networking/tftp.c b/networking/tftp.c index bd973d79a..bfa9897b9 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
| @@ -576,7 +576,7 @@ int tftp_main(int argc, char **argv) | |||
| 576 | result = tftp(cmd, host, remotefile, fd, port, blocksize); | 576 | result = tftp(cmd, host, remotefile, fd, port, blocksize); |
| 577 | 577 | ||
| 578 | #ifdef CONFIG_FEATURE_CLEAN_UP | 578 | #ifdef CONFIG_FEATURE_CLEAN_UP |
| 579 | if (!(fd == fileno(stdout) || fd == fileno(stdin))) { | 579 | if (!(fd == STDOUT_FILENO || fd == STDIN_FILENO)) { |
| 580 | close(fd); | 580 | close(fd); |
| 581 | } | 581 | } |
| 582 | #endif | 582 | #endif |
diff --git a/networking/wget.c b/networking/wget.c index 619c138ba..5c94c58b8 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
| @@ -794,7 +794,7 @@ progressmeter(int flag) | |||
| 794 | snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), | 794 | snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), |
| 795 | "%02d:%02d ETA", i / 60, i % 60); | 795 | "%02d:%02d ETA", i / 60, i % 60); |
| 796 | } | 796 | } |
| 797 | write(fileno(stderr), buf, strlen(buf)); | 797 | write(STDERR_FILENO, buf, strlen(buf)); |
| 798 | 798 | ||
| 799 | if (flag == -1) { | 799 | if (flag == -1) { |
| 800 | struct sigaction sa; | 800 | struct sigaction sa; |
| @@ -846,7 +846,7 @@ progressmeter(int flag) | |||
| 846 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 846 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 847 | * SUCH DAMAGE. | 847 | * SUCH DAMAGE. |
| 848 | * | 848 | * |
| 849 | * $Id: wget.c,v 1.71 2004/03/15 08:28:53 andersen Exp $ | 849 | * $Id: wget.c,v 1.72 2004/03/27 10:02:43 andersen Exp $ |
| 850 | */ | 850 | */ |
| 851 | 851 | ||
| 852 | 852 | ||
diff --git a/patches/tftp_timeout_multicast.diff b/patches/tftp_timeout_multicast.diff index 0f09d4a04..ca431fc60 100644 --- a/patches/tftp_timeout_multicast.diff +++ b/patches/tftp_timeout_multicast.diff | |||
| @@ -1031,7 +1031,7 @@ diff -u -r1.25 tftp.c | |||
| 1031 | + result = tftp(cmd, host, remotefile, fd, port, &option); | 1031 | + result = tftp(cmd, host, remotefile, fd, port, &option); |
| 1032 | 1032 | ||
| 1033 | #ifdef CONFIG_FEATURE_CLEAN_UP | 1033 | #ifdef CONFIG_FEATURE_CLEAN_UP |
| 1034 | if (!(fd == fileno(stdout) || fd == fileno(stdin))) { | 1034 | if (!(fd == STDOUT_FILENO || fd == STDIN_FILENO)) { |
| 1035 | @@ -582,3 +980,18 @@ | 1035 | @@ -582,3 +980,18 @@ |
| 1036 | #endif | 1036 | #endif |
| 1037 | return(result); | 1037 | return(result); |
diff --git a/shell/cmdedit.c b/shell/cmdedit.c index bf945f7e7..cbe1eeb6c 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c | |||
| @@ -186,7 +186,7 @@ static void cmdedit_reset_term(void) | |||
| 186 | { | 186 | { |
| 187 | if ((handlers_sets & SET_RESET_TERM) != 0) { | 187 | if ((handlers_sets & SET_RESET_TERM) != 0) { |
| 188 | /* sparc and other have broken termios support: use old termio handling. */ | 188 | /* sparc and other have broken termios support: use old termio handling. */ |
| 189 | setTermSettings(fileno(stdin), (void *) &initial_settings); | 189 | setTermSettings(STDIN_FILENO, (void *) &initial_settings); |
| 190 | handlers_sets &= ~SET_RESET_TERM; | 190 | handlers_sets &= ~SET_RESET_TERM; |
| 191 | } | 191 | } |
| 192 | if ((handlers_sets & SET_WCHG_HANDLERS) != 0) { | 192 | if ((handlers_sets & SET_WCHG_HANDLERS) != 0) { |
diff --git a/shell/hush.c b/shell/hush.c index 5da975746..0a32099c7 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -2825,7 +2825,7 @@ int hush_main(int argc, char **argv) | |||
| 2825 | * standard output is a terminal | 2825 | * standard output is a terminal |
| 2826 | * Refer to Posix.2, the description of the `sh' utility. */ | 2826 | * Refer to Posix.2, the description of the `sh' utility. */ |
| 2827 | if (argv[optind]==NULL && input==stdin && | 2827 | if (argv[optind]==NULL && input==stdin && |
| 2828 | isatty(fileno(stdin)) && isatty(fileno(stdout))) { | 2828 | isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) { |
| 2829 | interactive++; | 2829 | interactive++; |
| 2830 | } | 2830 | } |
| 2831 | 2831 | ||
diff --git a/shell/lash.c b/shell/lash.c index d2d4298fb..e20c2a20e 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
| @@ -1668,7 +1668,7 @@ int lash_main(int argc_l, char **argv_l) | |||
| 1668 | * standard output is a terminal | 1668 | * standard output is a terminal |
| 1669 | * Refer to Posix.2, the description of the `sh' utility. */ | 1669 | * Refer to Posix.2, the description of the `sh' utility. */ |
| 1670 | if (argv[optind]==NULL && input==stdin && | 1670 | if (argv[optind]==NULL && input==stdin && |
| 1671 | isatty(fileno(stdin)) && isatty(fileno(stdout))) { | 1671 | isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) { |
| 1672 | interactive=TRUE; | 1672 | interactive=TRUE; |
| 1673 | } | 1673 | } |
| 1674 | setup_job_control(); | 1674 | setup_job_control(); |
diff --git a/util-linux/more.c b/util-linux/more.c index 5ece188b0..e91038883 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
| @@ -76,7 +76,7 @@ extern int more_main(int argc, char **argv) | |||
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | /* not use inputing from terminal if usage: more > outfile */ | 78 | /* not use inputing from terminal if usage: more > outfile */ |
| 79 | if(isatty(fileno(stdout))) { | 79 | if(isatty(STDOUT_FILENO)) { |
| 80 | cin = fopen(CURRENT_TTY, "r"); | 80 | cin = fopen(CURRENT_TTY, "r"); |
| 81 | if (!cin) | 81 | if (!cin) |
| 82 | cin = bb_xfopen(CONSOLE_DEV, "r"); | 82 | cin = bb_xfopen(CONSOLE_DEV, "r"); |
