Path: blob/main/archivers/bzip/files/patch-bzip.c
16462 views
--- bzip.c.orig 1996-08-30 20:35:28 UTC1+++ bzip.c2@@ -114,9 +114,13 @@3--*/45#if BZ_UNIX_326+ #include <sys/types.h>7#include <utime.h>8#include <unistd.h>9+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) \10+ && !defined(__DragonFly__) /* stdlib already included above */11#include <malloc.h>12+#endif13#include <sys/stat.h>14#include <sys/times.h>1516@@ -2578,7 +2582,7 @@ void bitStreamEOF ()171819/*---------------------------------------------*/20-void mySignalCatcher ( IntNative *n )21+void mySignalCatcher (int n __unused)22{23fprintf ( stderr,24"\n%s: Control-C (or similar) caught, quitting.\n",25@@ -2588,7 +2592,7 @@ void mySignalCatcher ( IntNative *n )262728/*---------------------------------------------*/29-void mySIGSEGVorSIGBUScatcher ( IntNative *n )30+void mySIGSEGVorSIGBUScatcher (int n __unused)31{32if (compressing)33fprintf ( stderr,34@@ -3130,11 +3134,6 @@ IntNative main ( IntNative argc, Char *a35signal (SIGBUS, mySIGSEGVorSIGBUScatcher);36#endif3738- if ( ! (argc > 1 && strcmp ( "-Q", argv[1] ) == 0) )39- fprintf ( stderr,40- "BZIP, a block-sorting file compressor. "41- "Version 0.21, 25-August-96.\n" );42-43#if DEBUG44if ( ! (argc > 1 && strcmp ( "-Q", argv[1] ) == 0) )45fprintf ( stderr, "BZIP: *** compiled with debugging ON ***\n" );46@@ -3205,6 +3204,12 @@ IntNative main ( IntNative argc, Char *a47break;48}4950+ if (verbose) {51+ fprintf ( stderr,52+ "BZIP, a block-sorting file compressor. "53+ "Version 0.21, 25-August-96.\n" );54+ }55+56if ( opMode == OM_FILE_TO_STDOUT && numFileNames != 1) {57fprintf ( stderr, "%s: Option -c requires you to supply exactly one filename.\n",58progName );596061