Browse code

portability changes

git-svn: trunk@2295

Trog authored on 2006/09/20 22:05:19
Showing 3 changed files
... ...
@@ -1,6 +1,10 @@
1
+Wed Sep 20 14:03:49 BST 2006 (trog)
2
+-----------------------------------
3
+  * libclamav/unrar/unrar.c, unrarppm.c: portability changes
4
+
1 5
 Wed Sep 20 11:26:11 BST 2006 (trog)
2 6
 -----------------------------------
3
-  *libclamav/unrar/unrar.c, unrar.h, unrarppm.c, unrarvm.c: Update to align
7
+  * libclamav/unrar/unrar.c, unrar.h, unrarppm.c, unrarvm.c: Update to align
4 8
 			with current RAR version.
5 9
 
6 10
 Wed Sep 20 11:22:56 BST 2006 (njh)
... ...
@@ -29,7 +29,9 @@
29 29
 #include <sys/stat.h>
30 30
 #include <fcntl.h>
31 31
 #include <stdio.h>
32
+#ifdef HAVE_UNISTD_H
32 33
 #include <unistd.h>
34
+#endif
33 35
 #include <errno.h>
34 36
 #include <stdlib.h>
35 37
 #include <string.h>
... ...
@@ -44,7 +46,7 @@
44 44
 #include "others.h"
45 45
 #include "cltypes.h"
46 46
 
47
-#define int64to32(x) ((uint)(x))
47
+#define int64to32(x) ((unsigned int)(x))
48 48
 #define rar_endian_convert_16(v)	le16_to_host(v)
49 49
 #define rar_endian_convert_32(v)	le32_to_host(v)
50 50
 
... ...
@@ -40,10 +40,11 @@ static void rar_dbgmsg(){};
40 40
 #endif
41 41
 
42 42
 #define MAX(a,b)    (((a) > (b)) ? (a) : (b))
43
+#define MAX_O 64
43 44
 
44 45
 const unsigned int UNIT_SIZE=MAX(sizeof(struct ppm_context), sizeof(struct rar_mem_blk_tag));
45 46
 const unsigned int FIXED_UNIT_SIZE=12;
46
-const int INT_BITS=7, PERIOD_BITS=7, TOT_BITS=14, MAX_O=64;
47
+const int INT_BITS=7, PERIOD_BITS=7, TOT_BITS=14;
47 48
 const int INTERVAL=1 << 7, BIN_SCALE=1 << 14, MAX_FREQ=124;
48 49
 const unsigned int TOP=1 << 24, BOT=1 << 15;
49 50