View | Details | Raw Unified | Return to bug 221589 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +19 lines)
Lines 3-11 Link Here
3
3
4
PORTNAME=	arj
4
PORTNAME=	arj
5
PORTVERSION=	3.10.22
5
PORTVERSION=	3.10.22
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	archivers
7
CATEGORIES=	archivers
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/2.78_3.10%20build%2022
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/2.78_3.10%20build%2022:source1 \
9
		DEBIAN_POOL:source2
10
DISTFILES=	${PORTNAME}-${PORTVERSION}.tar.gz:source1 \
11
		${PORTNAME}_${PORTVERSION}-16.debian.tar.xz:source2
9
12
10
MAINTAINER=	garga@FreeBSD.org
13
MAINTAINER=	garga@FreeBSD.org
11
COMMENT=	Open source implementation of the ARJ archiver
14
COMMENT=	Open source implementation of the ARJ archiver
Lines 14-19 Link Here
14
17
15
PORTSCOUT=	skipv:3.10g
18
PORTSCOUT=	skipv:3.10g
16
19
20
EXTRA_PATCHES=	${WRKDIR}/debian/patches/*.patch
21
IGNORE_PATCHES=	002_no_remove_static_const.patch  \
22
		doc_refer_robert_k_jung.patch \
23
		gnu_build_cross.patch \
24
		gnu_build_fix.patch \
25
		gnu_build_flags.patch \
26
		gnu_build_pie.patch \
27
		gnu_build_strip.patch \
28
		hurd_no_fcntl_getlk.patch
29
PATCH_STRIP=	-p1
30
17
USES=		alias gmake
31
USES=		alias gmake
18
USE_AUTOTOOLS=	autoconf
32
USE_AUTOTOOLS=	autoconf
19
CONFIGURE_WRKSRC=	${WRKSRC}/gnu
33
CONFIGURE_WRKSRC=	${WRKSRC}/gnu
Lines 21-27 Link Here
21
MAKE_ARGS=	LOCALE="${LANGUAGE}"
35
MAKE_ARGS=	LOCALE="${LANGUAGE}"
22
ALL_TARGET=	prepare all
36
ALL_TARGET=	prepare all
23
STRIP=		# empty
37
STRIP=		# empty
24
MAKE_JOBS_UNSAFE=	yes
25
38
26
CFLAGS+=	-fPIC
39
CFLAGS+=	-fPIC
27
LANGUAGE?=	en
40
LANGUAGE?=	en
Lines 30-35 Link Here
30
43
31
OPTIONS_DEFINE=	DOCS
44
OPTIONS_DEFINE=	DOCS
32
45
46
pre-patch:
47
	@${RM} ${IGNORE_PATCHES:S,^,${WRKDIR}/debian/patches/,}
48
33
post-patch:
49
post-patch:
34
	@${REINPLACE_CMD} -e 's!/etc!${LOCALBASE}/etc!' \
50
	@${REINPLACE_CMD} -e 's!/etc!${LOCALBASE}/etc!' \
35
		 ${WRKSRC}/arj.c ${WRKSRC}/file_reg.c ${WRKSRC}/rearj.c
51
		 ${WRKSRC}/arj.c ${WRKSRC}/file_reg.c ${WRKSRC}/rearj.c
(-)distinfo (+3 lines)
Lines 1-2 Link Here
1
TIMESTAMP = 1508345026
1
SHA256 (arj-3.10.22.tar.gz) = 589e4c9bccc8669e7b6d8d6fcd64e01f6a2c21fe10aad56a83304ecc3b96a7db
2
SHA256 (arj-3.10.22.tar.gz) = 589e4c9bccc8669e7b6d8d6fcd64e01f6a2c21fe10aad56a83304ecc3b96a7db
2
SIZE (arj-3.10.22.tar.gz) = 431467
3
SIZE (arj-3.10.22.tar.gz) = 431467
4
SHA256 (arj_3.10.22-16.debian.tar.xz) = 2d9cc5aeb2ac44d000d2e3399846f1c3ce468e17e3af4bfb505b9a6eaf88a502
5
SIZE (arj_3.10.22-16.debian.tar.xz) = 19452
(-)files/patch-arj__arcv.c (-60 lines)
Lines 1-60 Link Here
1
--- arj_arcv.c.orig	2005-06-21 19:53:12 UTC
2
+++ arj_arcv.c
3
@@ -59,27 +59,27 @@ static char idxid_fault[]="?";
4
 #define setup_hput(ptr) (tmp_hptr=(ptr))
5
 
6
 #define hget_byte() (*(tmp_hptr++)&0xFF)
7
-#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
8
+#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
9
 
10
 /* Reads two bytes from the header, incrementing the pointer */
11
 
12
-static unsigned int hget_word()
13
+static uint16_t hget_word()
14
 {
15
- unsigned int result;
16
+ uint16_t result;
17
 
18
  result=mget_word(tmp_hptr);
19
- tmp_hptr+=sizeof(short);
20
+ tmp_hptr+=sizeof(uint16_t);
21
  return result;
22
 }
23
 
24
 /* Reads four bytes from the header, incrementing the pointer */
25
 
26
-static unsigned long hget_longword()
27
+static uint32_t hget_longword()
28
 {
29
- unsigned long result;
30
+ uint32_t result;
31
 
32
  result=mget_dword(tmp_hptr);
33
- tmp_hptr+=sizeof(unsigned long);
34
+ tmp_hptr+=sizeof(uint32_t);
35
  return result;
36
 }
37
 
38
@@ -87,18 +87,18 @@ static unsigned long hget_longword()
39
 
40
 /* Writes two bytes to the header, incrementing the pointer */
41
 
42
-static void hput_word(unsigned int w)
43
+static void hput_word(uint16_t w)
44
 {
45
  mput_word(w,tmp_hptr); 
46
- tmp_hptr+=sizeof(unsigned short);
47
+ tmp_hptr+=sizeof(uint16_t);
48
 }
49
 
50
 /* Writes four bytes to the header, incrementing the pointer */
51
 
52
-static void hput_longword(unsigned long l)
53
+static void hput_longword(uint32_t l)
54
 {
55
  mput_dword(l,tmp_hptr);
56
- tmp_hptr+=sizeof(unsigned long);
57
+ tmp_hptr+=sizeof(uint32_t);
58
 }
59
 
60
 /* Calculates and stores the basic header size */
(-)files/patch-arj__proc.c (-80 lines)
Lines 1-80 Link Here
1
--- arj_proc.c.orig	2005-06-21 19:53:12 UTC
2
+++ arj_proc.c
3
@@ -585,7 +585,7 @@ int search_for_extension(char *name, cha
4
 /* Returns the exact amount of data that could be safely written to the
5
    destination volume */
6
 
7
-unsigned long get_volfree(unsigned int increment)
8
+unsigned long get_volfree(unsigned long increment)
9
 {
10
  unsigned long pvol;
11
  unsigned int arjsec_overhead;
12
@@ -605,7 +605,7 @@ unsigned long get_volfree(unsigned int i
13
  remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead-
14
         (long)out_bytes-(long)cpos-(long)ext_voldata-
15
         MULTIVOLUME_RESERVE-t_volume_offset;
16
- return((unsigned long)min(remain, (unsigned long)increment));
17
+ return((unsigned long)min(remain, increment));
18
 }
19
 
20
 /* Performs various checks when multivolume data is packed to predict an
21
@@ -2466,14 +2466,14 @@ static int get_str_from_jq()
22
     *tsptr='\0';
23
   endptr=tsptr;
24
   tsptr=sptr;
25
-  while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX)
26
+  while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX)
27
   {
28
    while(*tsptr=='\0')
29
     tsptr++;
30
-   if((unsigned int)tsptr<(unsigned int)endptr)
31
+   if((intptr_t)tsptr<(intptr_t)endptr)
32
    {
33
     search_str[patterns++]=tsptr;
34
-    while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr)
35
+    while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr)
36
      tsptr++;
37
    }
38
   }
39
@@ -2901,9 +2901,9 @@ char *ltrim(char *str)
40
 #if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
41
 /* Model-independent routine to get 2 bytes from far RAM */
42
 
43
-unsigned int mget_word(char FAR *p)
44
+uint16_t mget_word(char FAR *p)
45
 {
46
- unsigned int b0, b1;
47
+ uint16_t b0, b1;
48
 
49
  b0=mget_byte(p);
50
  b1=mget_byte(p+1);
51
@@ -2912,9 +2912,9 @@ unsigned int mget_word(char FAR *p)
52
 
53
 /* Model-independent routine to get 4 bytes from far RAM */
54
 
55
-unsigned long mget_dword(char FAR *p)
56
+uint32_t mget_dword(char FAR *p)
57
 {
58
- unsigned long w0, w1;
59
+ uint32_t w0, w1;
60
 
61
  w0=mget_word(p);
62
  w1=mget_word(p+2);
63
@@ -2923,7 +2923,7 @@ unsigned long mget_dword(char FAR *p)
64
 
65
 /* Model-independent routine to store 2 bytes in far RAM */
66
 
67
-void mput_word(unsigned int w, char FAR *p)
68
+void mput_word(uint16_t w, char FAR *p)
69
 {
70
  mput_byte(w&0xFF, p);
71
  mput_byte(w>>8  , p+1);
72
@@ -2931,7 +2931,7 @@ void mput_word(unsigned int w, char FAR 
73
 
74
 /* Model-independent routine to store 4 bytes in far RAM */
75
 
76
-void mput_dword(unsigned long d, char FAR *p)
77
+void mput_dword(uint32_t d, char FAR *p)
78
 {
79
  mput_word(d&0xFFFF, p);
80
  mput_word(d>>16   , p+2);
(-)files/patch-arj__proc.h (-50 lines)
Lines 1-50 Link Here
1
--- arj_proc.h.orig	2004-01-25 10:39:30 UTC
2
+++ arj_proc.h
3
@@ -8,15 +8,17 @@
4
 #ifndef ARJ_PROC_INCLUDED
5
 #define ARJ_PROC_INCLUDED
6
 
7
+#include <stdint.h>
8
+
9
 /* Helper macros */
10
 
11
-#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
12
-#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
13
+#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
14
+#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
15
 #ifndef WORDS_BIGENDIAN
16
-#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
17
-#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
18
-#define mget_dword(p) (*(unsigned long *)(p))
19
-#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
20
+#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
21
+#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
22
+#define mget_dword(p) (*(uint32_t *)(p))
23
+#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
24
 #endif
25
 
26
 /* Prototypes */
27
@@ -31,7 +33,7 @@ void copy_bytes(unsigned long nbytes);
28
 int translate_path(char *name);
29
 void restart_proc(char *dest);
30
 int search_for_extension(char *name, char *ext_list);
31
-unsigned long get_volfree(unsigned int increment);
32
+unsigned long get_volfree(unsigned long increment);
33
 unsigned int check_multivolume(unsigned int increment);
34
 void store();
35
 void hollow_encode();
36
@@ -61,10 +63,10 @@ void unpack_mem(struct mempack *mempack)
37
 void strip_lf(char *str);
38
 char *ltrim(char *str);
39
 #ifdef WORDS_BIGENDIAN
40
-unsigned int mget_word(char FAR *p);
41
-unsigned long mget_dword(char FAR *p);
42
-void mput_word(unsigned int w, char FAR *p);
43
-void mput_dword(unsigned long d, char FAR *p);
44
+uint16_t mget_word(char FAR *p);
45
+uint32_t mget_dword(char FAR *p);
46
+void mput_word(uint16_t w, char FAR *p);
47
+void mput_dword(uint32_t d, char FAR *p);
48
 #endif
49
 
50
 #endif
(-)files/patch-arjtypes.c (+15 lines)
Line 0 Link Here
1
--- arjtypes.c	2005-06-23 UTC
2
+++ arjtypes.c
3
@@ -138,8 +138,11 @@ static int isleapyear(int year)
4
 static unsigned long ts_unix2dos(const long ts)
5
 {
6
  struct tm *stm;
7
+ time_t _ts;
8
 
9
- stm=arj_localtime((time_t*)&ts);
10
+ _ts = ts;
11
+
12
+ stm=arj_localtime(&_ts);
13
  return(get_tstamp(stm->tm_year+1900, stm->tm_mon+1, stm->tm_mday,
14
         stm->tm_hour, stm->tm_min, stm->tm_sec));
15
 }
(-)files/patch-fardata.c (-29 lines)
Lines 1-29 Link Here
1
--- fardata.c.orig	2004-04-17 11:39:42 UTC
2
+++ fardata.c
3
@@ -190,7 +190,7 @@ int msg_sprintf(char *str, FMSG *fmt, ..
4
 
5
 /* Length-limited strlen() */
6
 
7
-static int strnlen(const char FAR *s, int count)
8
+static int _strnlen(const char FAR *s, int count)
9
 {
10
  const char FAR *sc;
11
 
12
@@ -569,7 +569,7 @@ int vcprintf(int ccode, FMSG *fmt, va_li
13
     if(!s)
14
      s="(null)";
15
 #endif
16
-    len=strnlen(s, precision);
17
+    len=_strnlen(s, precision);
18
     if(!(flags&LEFT))
19
     {
20
      while(len<field_width--)
21
@@ -655,7 +655,7 @@ int vcprintf(int ccode, FMSG *fmt, va_li
22
     num=va_arg(args, unsigned long);
23
    else if(qualifier=='h')
24
    {
25
-#ifdef __linux__
26
+#if defined(__linux__) || defined(__FreeBSD__)
27
     if (flags&SIGN)
28
      num=va_arg(args, int);             /* num=va_arg(args, short);      */
29
     else

Return to bug 221589