/*
- * Modified for busybox by Glenn McGrath <bug1@optushome.com.au>
+ * Modified for busybox by Glenn McGrath <bug1@iinet.net.au>
* Added support output to stdout by Thomas Lundquist <thomasez@zelow.no>
*
* This program is free software; you can redistribute it and/or modify
int bunzip2_main(int argc, char **argv)
{
char *compressed_name;
+ /* Note: Ignore the warning about save_name being used uninitialized.
+ * That is not the case, but gcc has trouble working that out... */
+#warning The save_name warning is OK, ignore it
char *save_name;
unsigned long opt;
int status;
/* Open input file */
src_fd = bb_xopen(compressed_name, O_RDONLY);
} else {
- src_fd = fileno(stdin);
+ src_fd = STDIN_FILENO;
opt |= BUNZIP2_OPT_STDOUT;
}
}
if (opt & BUNZIP2_OPT_STDOUT) {
- dst_fd = fileno(stdout);
+ dst_fd = STDOUT_FILENO;
} else {
int len = strlen(compressed_name) - 4;
if (strcmp(compressed_name + len, ".bz2") != 0) {