pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/dact Explicitly cast third argument of open_...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/42071204e8e6
branches:  trunk
changeset: 500388:42071204e8e6
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Oct 07 17:15:40 2005 +0000

description:
Explicitly cast third argument of open_net to int and use int instead of
mode_t. This unbreaks use with the GCC 3.4+ builtin va_arg.
Fix the use of ctype macros.

Bump revision for that.

diffstat:

 archivers/dact/Makefile         |   4 ++--
 archivers/dact/distinfo         |   5 ++++-
 archivers/dact/patches/patch-ac |  22 ++++++++++++++++++++++
 archivers/dact/patches/patch-ad |  22 ++++++++++++++++++++++
 archivers/dact/patches/patch-ae |  31 +++++++++++++++++++++++++++++++
 5 files changed, 81 insertions(+), 3 deletions(-)

diffs (116 lines):

diff -r 3ab464f1d067 -r 42071204e8e6 archivers/dact/Makefile
--- a/archivers/dact/Makefile   Fri Oct 07 16:57:14 2005 +0000
+++ b/archivers/dact/Makefile   Fri Oct 07 17:15:40 2005 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2005/05/22 20:07:36 jlam Exp $
+# $NetBSD: Makefile,v 1.14 2005/10/07 17:15:40 joerg Exp $
 #
 
 DISTNAME=      dact-0.8.3
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    archivers
 MASTER_SITES=  http://www.rkeene.org/devel/
 
diff -r 3ab464f1d067 -r 42071204e8e6 archivers/dact/distinfo
--- a/archivers/dact/distinfo   Fri Oct 07 16:57:14 2005 +0000
+++ b/archivers/dact/distinfo   Fri Oct 07 17:15:40 2005 +0000
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.6 2005/02/23 14:45:23 agc Exp $
+$NetBSD: distinfo,v 1.7 2005/10/07 17:15:40 joerg Exp $
 
 SHA1 (dact-0.8.3.tar.gz) = 850aec889be4174e9f42a3314bf29b1fc5181090
 RMD160 (dact-0.8.3.tar.gz) = 2778e64d3c456fc63b1739b31773f7ff2d84ee9c
 Size (dact-0.8.3.tar.gz) = 84301 bytes
 SHA1 (patch-aa) = f0040ac3f13305a33943407759d52454dd6d7d37
 SHA1 (patch-ab) = 75235c19ea8fbfac87eebcbe88dd9273136c08c5
+SHA1 (patch-ac) = 0eb282401de47dab92bc4df2723300ace1f00b4b
+SHA1 (patch-ad) = b26314007903508ae6af6d283ad3eb2523869bf9
+SHA1 (patch-ae) = d297c3c616d34db8ff7e62db5462739cb3740b4d
diff -r 3ab464f1d067 -r 42071204e8e6 archivers/dact/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/dact/patches/patch-ac   Fri Oct 07 17:15:40 2005 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1 2005/10/07 17:15:40 joerg Exp $
+
+--- net.c.orig 2005-10-07 19:06:20.000000000 +0200
++++ net.c
+@@ -85,7 +85,7 @@ int open_net(const char *pathname, int f
+       mode_t mode;
+ 
+       va_start(args, flags);
+-      mode = va_arg(args, mode_t);
++      mode = va_arg(args, int);
+       va_end(args);
+ 
+       if (!parse_url(pathname,scheme,username,password,host,&port,file)) {
+@@ -292,7 +292,7 @@ int open_net(const char *pathname, int f
+       mode_t mode;
+ 
+       va_start(args, flags);
+-      mode = va_arg(args, mode_t);
++      mode = va_arg(args, int);
+       va_end(args);
+ 
+       return(open(pathname,flags,mode));
diff -r 3ab464f1d067 -r 42071204e8e6 archivers/dact/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/dact/patches/patch-ad   Fri Oct 07 17:15:40 2005 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ad,v 1.1 2005/10/07 17:15:40 joerg Exp $
+
+--- dact.c.orig        2005-10-07 18:57:34.000000000 +0200
++++ dact.c
+@@ -182,7 +182,7 @@ int dact_upgrade(const char *options, ui
+       strncat(dact_binfile,"dact.bin",sizeof(dact_binfile)-strlen(dact_binfile)-1);
+ #endif
+       urlsubst=parse_url_subst("http://www.rkeene.org/projects/rget/rget.cgi?os=@@OSNM@@&arch=@@ARCH@@&project=dact&file=bin&meth=gz","";);
+-      if ((outFd=open_net(dact_binfile, O_WRONLY|O_TRUNC|O_CREAT, 0755))<0) { PERROR("open_net"); return(-1); }
++      if ((outFd=open_net(dact_binfile, O_WRONLY|O_TRUNC|O_CREAT, (int)0755))<0) { PERROR("open_net"); return(-1); }
+       if ((inFd=open_net(urlsubst, O_RDONLY))<0) { PERROR("open_net"); return(-1); }
+       if (!dact_process_file(inFd, outFd, DACT_MODE_DECMP, options, "dact", crcs,-1)) {
+               close(inFd);
+@@ -1186,7 +1186,7 @@ int main(int argc, char **argv) {
+                                       continue;
+                               }
+                               if (!options[DACT_OPT_STDOUT]) {
+-                                      if ((out_fd=open_net(out_file,O_WRONLY|O_CREAT|O_TRUNC,0644))==-1) {
++                                      if ((out_fd=open_net(out_file,O_WRONLY|O_CREAT|O_TRUNC,(int)0644))==-1) {
+                                               fprintf(stderr, "dact: Can't open %s for writing.\n",out_file);
+                                               PERROR("open");
+                                               continue;
diff -r 3ab464f1d067 -r 42071204e8e6 archivers/dact/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/dact/patches/patch-ae   Fri Oct 07 17:15:40 2005 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-ae,v 1.1 2005/10/07 17:15:40 joerg Exp $
+
+--- parse.c.orig       2005-10-07 19:09:21.000000000 +0200
++++ parse.c
+@@ -138,7 +138,7 @@ char *parse_url_subst(const char *src, c
+                       case 346290: /* OSVR-done */
+                               if (strlen(system_info.release)>127) break;
+                               for (x=0;x<strlen(system_info.release);x++) {
+-                                      if (isdigit(system_info.release[x]) || system_info.release[x]=='.') {
++                                      if (isdigit((unsigned char)system_info.release[x]) || system_info.release[x]=='.') {
+                                               ret[0]=system_info.release[x];
+                                               ret++;
+                                       } else {
+@@ -151,7 +151,7 @@ char *parse_url_subst(const char *src, c
+                               for (x=0;x<strlen(system_info.release);x++) {
+                                       if (system_info.release[x]=='.' && found) break;
+                                       if (system_info.release[x]=='.') found=1;
+-                                      if (isdigit(system_info.release[x]) || found) {
++                                      if (isdigit((unsigned char)system_info.release[x]) || found) {
+                                               ret[0]=system_info.release[x];
+                                               ret++;
+                                       }
+@@ -264,7 +264,7 @@ char *parse_url_subst_dist(void) {
+ void strtolower(char *str) {
+       uint32_t x=0;
+ 
+-      while (str[x]) { str[x]=tolower(str[x]); x++; }
++      while (str[x]) { str[x]=tolower((unsigned char)str[x]); x++; }
+ }
+ 
+ char *mime64(unsigned char *str) {



Home | Main Index | Thread Index | Old Index