aboutsummaryrefslogtreecommitdiff
path: root/archivers/bzip/files/patch-bzip.c
blob: cba7ce00e711670e1c00b55425946570b2011319 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- bzip.c.orig	1996-08-30 20:35:28 UTC
+++ bzip.c
@@ -114,9 +114,13 @@
 --*/
 
 #if BZ_UNIX_32
+   #include <sys/types.h>
    #include <utime.h>
    #include <unistd.h>
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) \
+ && !defined(__DragonFly__)	/* stdlib already included above */
    #include <malloc.h>
+#endif
    #include <sys/stat.h>
    #include <sys/times.h>
 
@@ -2578,7 +2582,7 @@ void bitStreamEOF ()
 
 
 /*---------------------------------------------*/
-void mySignalCatcher ( IntNative *n )
+void mySignalCatcher (int n __unused)
 {
    fprintf ( stderr, 
              "\n%s: Control-C (or similar) caught, quitting.\n",
@@ -2588,7 +2592,7 @@ void mySignalCatcher ( IntNative *n )
 
 
 /*---------------------------------------------*/
-void mySIGSEGVorSIGBUScatcher ( IntNative *n )
+void mySIGSEGVorSIGBUScatcher (int n __unused)
 {
    if (compressing)
       fprintf ( stderr,
@@ -3130,11 +3134,6 @@ IntNative main ( IntNative argc, Char *a
    signal (SIGBUS,  mySIGSEGVorSIGBUScatcher);
    #endif
 
-   if ( ! (argc > 1 && strcmp ( "-Q", argv[1] ) == 0) )
-      fprintf ( stderr,
-                "BZIP, a block-sorting file compressor.  "
-                "Version 0.21, 25-August-96.\n" );
-
    #if DEBUG
       if ( ! (argc > 1 && strcmp ( "-Q", argv[1] ) == 0) )
          fprintf ( stderr, "BZIP: *** compiled with debugging ON ***\n" );
@@ -3205,6 +3204,12 @@ IntNative main ( IntNative argc, Char *a
                          break;
          }
 
+   if (verbose) {
+      fprintf ( stderr,
+                "BZIP, a block-sorting file compressor.  "
+                "Version 0.21, 25-August-96.\n" );
+   }
+
    if ( opMode == OM_FILE_TO_STDOUT && numFileNames != 1) {
       fprintf ( stderr, "%s: Option -c requires you to supply exactly one filename.\n",
                 progName );