pkgsrc-Bugs archive

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

pkg/38449: Some 64-bit cleaning for archivers/zoo



>Number:         38449
>Category:       pkg
>Synopsis:       Some 64-bit cleaning for archivers/zoo
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 17 19:15:00 +0000 2008
>Originator:     Rhialto
>Release:        NetBSD 4.0 pkgsrc-2007Q4
>Organization:
        
>Environment:
System: NetBSD radl.falu.nl 4.0 NetBSD 4.0 
(Radl-s_Pervasion_of_the_Incorrect_Chord) #2: Fri Mar 14 22:56:19 CET 2008 
root%radl.falu.nl@localhost:/usr/src/sys/arch/amd64/compile/RADL4.0 amd64
Architecture: x86_64
Machine: amd64
>Description:
        As provided, zoo doesn't work correctly on 64-bit systems.
        When extracting from an archive, it complains about a failing 
        header consistency check. The files it extracts are dated 1970.
>How-To-Repeat:
        As above.
>Fix:
        I created new patches with mkpatches. This has the side-effect
        of changing all patchfiles, most of them in a trivial way.
        Perhaps it is better to keep them for easier future maintenance.

        At the end I have included the new versions of some patch files,
        for better readability.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile    13 May 2007 16:59:39 -0000      1.30
+++ Makefile    17 Apr 2008 18:55:07 -0000
@@ -2,7 +2,7 @@
 
 DISTNAME=      zoo-2.10pl1
 PKGNAME=       zoo-2.10.1
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    archivers
 MASTER_SITES=  ftp://ftp.kiarchive.ru/pub/unix/arcers/
 
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo    13 May 2007 16:59:39 -0000      1.10
+++ distinfo    17 Apr 2008 18:55:07 -0000
@@ -3,18 +3,18 @@
 SHA1 (zoo-2.10pl1.tar.gz) = c02d96148ee57df01596d0c8d07a3e327b821600
 RMD160 (zoo-2.10pl1.tar.gz) = 971d388b8cb29def1e4e31011463563e91c3d700
 Size (zoo-2.10pl1.tar.gz) = 172096 bytes
-SHA1 (patch-aa) = e1f4d6814397cc37a814afea2547833ff4ad0a0f
-SHA1 (patch-ab) = 0a67f794bc2ff9963ae2ca268f21976a7e09eacd
-SHA1 (patch-ac) = e1bccd60a353f243354fa18ae0df69f82c123e67
-SHA1 (patch-ad) = fb76a04c9cfef61b1059c9c227faf036b7b2c205
-SHA1 (patch-ae) = 9fd888a05d9866b9b2554d2bc41170e9ee68c226
-SHA1 (patch-af) = f1489b0896a73df823f5623812a879a6bc47d572
-SHA1 (patch-ag) = 05b0a774e7aea3137917b2c714b46012fd401f6d
-SHA1 (patch-ah) = af3d79f9dd42f080863c6b672d9ca504c2bf79df
-SHA1 (patch-ai) = 9f6f815cb225dc6f81c66baf5f04ea50a9c345d6
-SHA1 (patch-aj) = a210f34c8d0ea713d3a92d187c395b7b6ef2c128
-SHA1 (patch-ak) = 40f83eccc77d54af5130d78bcd2d9af1d7cc54a9
-SHA1 (patch-al) = 7fe791ff692fd8b04e1a4d603204c2a2e34e95a0
-SHA1 (patch-am) = 0c35f8787f3d8c0f4f9a728ec6c85a143e0a816c
-SHA1 (patch-an) = 5530a9a6f56e12d21b12defa8e668b2229739703
-SHA1 (patch-ao) = cb4b567f1c78cd9299157bae5be92e2fb95d3894
+SHA1 (patch-aa) = d8b9747df17619e9ff0fdcba897ff20af7b76c9f
+SHA1 (patch-ab) = 5a8d87307750d967120481e54afe588636dfddf4
+SHA1 (patch-ac) = d5d2a23e62efd32e6bdd08c4e4378926e95825eb
+SHA1 (patch-ad) = d8992d565f48aab10521ecbd346d233a1e717790
+SHA1 (patch-ae) = d1e60cea71bb1c56e76a6ffc9923341664283a0c
+SHA1 (patch-af) = 2a1b67cf50fed58e5caf83a8ca4c8529d8e22c24
+SHA1 (patch-ag) = 30fd80a1127f7625db9f0c9889ad5ef43f68d7fb
+SHA1 (patch-ah) = 488753b5a49404b908713cd6dcfc0356b0cab40c
+SHA1 (patch-ai) = b6102770f1f0318510a21b444bf9b7e4cfce51c3
+SHA1 (patch-aj) = 2c764ca5c164ae3744e6447fef7815025c125c36
+SHA1 (patch-ak) = c6b44cd1e45728ba227728c1527da5209ece1e00
+SHA1 (patch-al) = 6272e830b028789398cf052c36d6a311eecc1311
+SHA1 (patch-am) = b294d0589ecf74ad0d1fe0ed4c53f7b34376f19d
+SHA1 (patch-an) = 8d74579ab5b7df59b9684828b356a3d4415bdd63
+SHA1 (patch-ao) = 3f82cd62968f0e510f75411192560f70b608560d
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-aa,v
retrieving revision 1.4
diff -u -r1.4 patch-aa
--- patches/patch-aa    4 Sep 2000 14:54:06 -0000       1.4
+++ patches/patch-aa    17 Apr 2008 18:55:07 -0000
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.4 2000/09/04 14:54:06 kim Exp $
 
---- ar.h.orig  Sat May  1 00:04:22 1993
-+++ ar.h       Mon Sep  4 10:41:33 2000
-@@ -15,11 +15,15 @@
+--- ar.h.orig  1993-05-01 06:04:22.000000000 +0200
++++ ar.h
+@@ -15,11 +15,15 @@ Adapted from "ar" archiver written by Ha
  /* uchar should be 8 bits or more */
  /* typedef unsigned char  uchar;   -- already in zoo.h */
  
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ab,v
retrieving revision 1.4
diff -u -r1.4 patch-ab
--- patches/patch-ab    12 Nov 1999 05:17:20 -0000      1.4
+++ patches/patch-ab    17 Apr 2008 18:55:07 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.4 1999/11/12 05:17:20 hubertf Exp $
+$NetBSD$
 
---- ./bsd.c    Sat May  1 06:21:53 1993
-+++ /usr/pkgsrc/archivers/zoo/work.i386.unpatched/bsd.c        Fri Nov 12 
06:19:38 1999
-@@ -69,8 +69,12 @@
+--- bsd.c.orig 1993-05-01 06:21:53.000000000 +0200
++++ bsd.c
+@@ -69,8 +69,12 @@ ZOOFILE f;
  }
  
  /* Function gettz() returns the offset from GMT in seconds */
@@ -16,7 +16,7 @@
  #define SEC_IN_DAY    (24L * 60L * 60L)
  #define INV_VALUE             (SEC_IN_DAY + 1L)
        static long retval = INV_VALUE;      /* cache, init to impossible value 
*/
-@@ -95,6 +99,7 @@
+@@ -95,6 +99,7 @@ long gettz()
        retval = -tm->tm_gmtoff;
  #endif
        return retval;
@@ -24,7 +24,7 @@
  }
  
  /* Standard UNIX-compatible time routines */
-@@ -103,15 +108,19 @@
+@@ -103,15 +108,19 @@ long gettz()
  /* Standard UNIX-specific file attribute routines */
  #include "nixmode.i"
  
Index: patches/patch-ac
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ac,v
retrieving revision 1.4
diff -u -r1.4 patch-ac
--- patches/patch-ac    1 Oct 2006 21:08:26 -0000       1.4
+++ patches/patch-ac    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-ac,v 1.4 2006/10/01 21:08:26 rillig Exp $
 
---- makefile.orig      1991-07-16 10:52:08.000000000 -0500
+--- makefile.orig      1991-07-16 17:52:08.000000000 +0200
 +++ makefile
 @@ -18,13 +18,13 @@
  
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ad,v
retrieving revision 1.1
diff -u -r1.1 patch-ad
--- patches/patch-ad    12 Nov 1999 05:17:21 -0000      1.1
+++ patches/patch-ad    17 Apr 2008 18:55:07 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.1 1999/11/12 05:17:21 hubertf Exp $
+$NetBSD$
 
---- ./misc2.c  Tue Jul 16 17:53:02 1991
-+++ /usr/pkgsrc/archivers/zoo/work.i386.unpatched/misc2.c      Fri Nov 12 
06:19:38 1999
-@@ -314,10 +314,12 @@
+--- misc2.c.orig       1991-07-16 17:53:02.000000000 +0200
++++ misc2.c
+@@ -314,10 +314,12 @@ struct direntry *direntry;
  {
        long diff_tz;
        long longtime;
Index: patches/patch-ae
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ae,v
retrieving revision 1.2
diff -u -r1.2 patch-ae
--- patches/patch-ae    15 Jun 2004 04:24:30 -0000      1.2
+++ patches/patch-ae    17 Apr 2008 18:55:07 -0000
@@ -1,20 +1,35 @@
 $NetBSD: patch-ae,v 1.2 2004/06/15 04:24:30 minskim Exp $
 
---- nixtime.i.orig     1991-07-16 10:53:46.000000000 -0500
+--- nixtime.i.orig     1991-07-16 17:53:46.000000000 +0200
 +++ nixtime.i
-@@ -1,3 +1,5 @@
+@@ -1,3 +1,6 @@
 +#include <time.h>
++#include <sys/time.h>
 +
  #ifndef LINT
  static char nixtimeid[]="@(#) nixtime.i 2.3 88/01/24 12:49:28";
  #endif /* LINT */
-@@ -52,7 +54,8 @@ unsigned int date, time;
+@@ -35,7 +38,7 @@ unsigned *date, *time;
+       *time = tm->tm_sec / 2 + (tm->tm_min << 5) +
+          (tm->tm_hour << 11);
+    }
+-
++   return 0;
+ }
+ 
+ /*****************
+@@ -51,9 +54,11 @@ unsigned int date, time;
+ {
        long mstonix();
        long gettz();
-       long utimbuf[2];
+-      long utimbuf[2];
 -      utimbuf[0] = utimbuf[1] = gettz() + mstonix (date, time);
+-      return (utime (path, utimbuf));
 +      long t = mstonix (date, time);
-+      utimbuf[0] = utimbuf[1] = t + gettz(t);
-       return (utime (path, utimbuf));
++        struct timeval times[2];
++        times[0].tv_sec = times[1].tv_sec = t + gettz(t);
++        times[0].tv_usec = times[1].tv_usec = 0;
++        return utimes(path, times);
  }
  
+ /****************
Index: patches/patch-af
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-af,v
retrieving revision 1.1
diff -u -r1.1 patch-af
--- patches/patch-af    12 Nov 1999 05:17:21 -0000      1.1
+++ patches/patch-af    17 Apr 2008 18:55:07 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-af,v 1.1 1999/11/12 05:17:21 hubertf Exp $
+$NetBSD$
 
---- ./options.h        Sat May  1 06:27:59 1993
-+++ /usr/pkgsrc/archivers/zoo/work.i386.unpatched/options.h    Fri Nov 12 
06:19:39 1999
-@@ -96,7 +96,6 @@
+--- options.h.orig     1993-05-01 06:27:59.000000000 +0200
++++ options.h
+@@ -96,7 +96,6 @@ For documentation about this file, see o
  #define NIXTIME
  #define NIXFNAME
  #define NEEDCTYP
@@ -10,7 +10,7 @@
  #define REN_STDC
  #define SETBUF
  #define GETTZ
-@@ -110,6 +109,7 @@
+@@ -110,6 +109,7 @@ For documentation about this file, see o
  #define ANSI_PROTO
  #define VOIDPTR               void *
  #else
Index: patches/patch-ag
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ag,v
retrieving revision 1.1
diff -u -r1.1 patch-ag
--- patches/patch-ag    12 Nov 1999 05:17:21 -0000      1.1
+++ patches/patch-ag    17 Apr 2008 18:55:07 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ag,v 1.1 1999/11/12 05:17:21 hubertf Exp $
+$NetBSD$
 
---- ./zooadd2.c        Sat Jul 20 01:38:10 1991
-+++ /usr/pkgsrc/archivers/zoo/work.i386.unpatched/zooadd2.c    Fri Nov 12 
06:19:39 1999
-@@ -258,12 +258,15 @@
+--- zooadd2.c.orig     1991-07-20 01:38:10.000000000 +0200
++++ zooadd2.c
+@@ -258,12 +258,15 @@ void newdir (direntry)
  register struct direntry *direntry;
  {
  #ifdef GETTZ
Index: patches/patch-ah
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ah,v
retrieving revision 1.1
diff -u -r1.1 patch-ah
--- patches/patch-ah    12 Nov 1999 05:17:21 -0000      1.1
+++ patches/patch-ah    17 Apr 2008 18:55:07 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.1 1999/11/12 05:17:21 hubertf Exp $
+$NetBSD$
 
---- ./zoofns.h Sat May  1 05:57:35 1993
-+++ /usr/pkgsrc/archivers/zoo/work.i386.unpatched/zoofns.h     Fri Nov 12 
06:19:39 1999
-@@ -94,7 +94,11 @@
+--- zoofns.h.orig      1993-05-01 05:57:35.000000000 +0200
++++ zoofns.h
+@@ -94,7 +94,11 @@ void exit PARMS ((int));
  void fixslash PARMS ((char *));
  void makelist PARMS ((int, char *[], char *[], int, char *, char *, char *, 
int *));
  void memerr PARMS ((unsigned int));
Index: patches/patch-ai
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ai,v
retrieving revision 1.3
diff -u -r1.3 patch-ai
--- patches/patch-ai    13 May 2007 16:59:39 -0000      1.3
+++ patches/patch-ai    17 Apr 2008 18:55:07 -0000
@@ -1,7 +1,16 @@
 $NetBSD: patch-ai,v 1.3 2007/05/13 16:59:39 taca Exp $
 
---- zoolist.c.orig     1991-07-20 07:57:27.000000000 +0900
+--- zoolist.c.orig     1991-07-20 00:57:27.000000000 +0200
 +++ zoolist.c
+@@ -21,7 +21,7 @@ Copyright (C) 1986, 1987 Rahul Dhesi -- 
+ #include "options.h"
+ #include "portable.h"
+ #include "zoomem.h"  /* to get ZOOCOUNT */
+-
++#include <time.h>
+ /* Lists files in archive */
+ #include "zoo.h"
+ #include "errors.i"
 @@ -92,6 +92,7 @@ int genson = 1;                                      /* 
enable/disable ge
  int show_mode = 0;                            /* show file protection */
  #endif
@@ -20,6 +29,15 @@
     /* Seek to the beginning of the first directory entry */
     if (zooseek (zoo_file, zoo_header.zoo_start, 0) != 0) {
        ercount++;
+@@ -414,7 +418,7 @@ if (fiz_ofs != 0L) {                /* i
+                                       if (direntry.fattr == 0)
+                                               printf ("--- ");
+                                       else if ((direntry.fattr >> 22) == 1)
+-                                              printf ("%03o ", direntry.fattr 
& 0x1ff);
++                                              printf ("%03o ", (unsigned 
int)direntry.fattr & 0x1ff);
+                                       else
+                                               printf ("??? ");
+                               }
 @@ -437,6 +441,11 @@ if (fiz_ofs != 0L) {                /* i
           if (verb_list && !fast)
              show_comment (&direntry, zoo_file, 0, (char *) NULL);
@@ -36,7 +54,7 @@
  {
        long gettz();
        int diff_tz;                            /* timezone difference */
-+      long t;
++      time_t t;
        if (file_tz == NO_TZ)   /* if no timezone stored ..*/
                printf ("   ");                 /* .. just pad with blanks */
        else {
Index: patches/patch-aj
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-aj,v
retrieving revision 1.1
diff -u -r1.1 patch-aj
--- patches/patch-aj    10 Jun 2006 17:18:48 -0000      1.1
+++ patches/patch-aj    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-aj,v 1.1 2006/06/10 17:18:48 adrianp Exp $
 
---- parse.c.orig       1991-07-16 16:54:43.000000000 +0100
+--- parse.c.orig       1991-07-16 17:54:43.000000000 +0200
 +++ parse.c
 @@ -39,7 +39,7 @@ char *fname;
     char *namep;                   /* points to relevant part of tempname */
Index: patches/patch-ak
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ak,v
retrieving revision 1.1
diff -u -r1.1 patch-ak
--- patches/patch-ak    19 Jul 2006 19:34:37 -0000      1.1
+++ patches/patch-ak    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-ak,v 1.1 2006/07/19 19:34:37 adrianp Exp $
 
---- misc.c.orig        1991-07-16 16:52:54.000000000 +0100
+--- misc.c.orig        1991-07-16 17:52:54.000000000 +0200
 +++ misc.c
 @@ -135,11 +135,17 @@ if available, else the short filename is
  char *fullpath (direntry)
Index: patches/patch-al
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-al,v
retrieving revision 1.1
diff -u -r1.1 patch-al
--- patches/patch-al    13 May 2007 16:59:39 -0000      1.1
+++ patches/patch-al    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-al,v 1.1 2007/05/13 16:59:39 taca Exp $
 
---- zooext.c.orig      1993-05-01 12:58:50.000000000 +0900
+--- zooext.c.orig      1993-05-01 05:58:50.000000000 +0200
 +++ zooext.c
 @@ -89,6 +89,7 @@ int alloc_size;                         
  #endif
Index: patches/patch-am
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-am,v
retrieving revision 1.1
diff -u -r1.1 patch-am
--- patches/patch-am    13 May 2007 16:59:39 -0000      1.1
+++ patches/patch-am    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-am,v 1.1 2007/05/13 16:59:39 taca Exp $
 
---- portable.c.orig    1991-07-17 00:55:11.000000000 +0900
+--- portable.c.orig    1991-07-16 17:55:11.000000000 +0200
 +++ portable.c
 @@ -87,6 +87,12 @@ ZOOFILE zoocreate (fname)
  char *fname;
@@ -15,3 +15,26 @@
  #endif /* FIZ */
  
  #ifndef zooseek
+@@ -220,6 +226,13 @@ BYTE data[];
+          ((unsigned long) data[2] << 16) | ((unsigned long) data[3] << 24));
+ }
+ 
++long to_signed_long(data)
++BYTE data[];
++{
++   return (long) ((long) data[0] | ((long) data[1] << 8) |
++         ((long) data[2] << 16) | ((long) (char)data[3] << 24));
++}
++
+ #ifndef FIZ
+ /********************
+ splitlong() converts a long integer to four consecutive BYTEs in order
+@@ -426,7 +439,7 @@ BYTE bytes[];
+       zoo_header->text[i] = bytes[TEXT_I + i];
+    zoo_header->zoo_tag = to_long(&bytes[ZTAG_I]);     /* copy zoo_tag */
+    zoo_header->zoo_start = to_long(&bytes[ZST_I]);    /* copy zoo_start */
+-   zoo_header->zoo_minus = to_long(&bytes[ZSTM_I]);
++   zoo_header->zoo_minus = to_signed_long(&bytes[ZSTM_I]);
+    zoo_header->major_ver = bytes[MAJV_I];          /* copy versions */
+    zoo_header->minor_ver = bytes[MINV_I];
+       /* default is no archive comment and a header type of 0 */
Index: patches/patch-an
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-an,v
retrieving revision 1.1
diff -u -r1.1 patch-an
--- patches/patch-an    13 May 2007 16:59:40 -0000      1.1
+++ patches/patch-an    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-an,v 1.1 2007/05/13 16:59:40 taca Exp $
 
---- zooio.h.orig       1993-05-01 12:39:50.000000000 +0900
+--- zooio.h.orig       1993-05-01 05:39:50.000000000 +0200
 +++ zooio.h
 @@ -53,6 +53,9 @@ long zootell PARMS((ZOOFILE));
  
Index: patches/patch-ao
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/zoo/patches/patch-ao,v
retrieving revision 1.1
diff -u -r1.1 patch-ao
--- patches/patch-ao    13 May 2007 16:59:40 -0000      1.1
+++ patches/patch-ao    17 Apr 2008 18:55:07 -0000
@@ -1,6 +1,6 @@
 $NetBSD: patch-ao,v 1.1 2007/05/13 16:59:40 taca Exp $
 
---- zoopack.c.orig     1993-05-01 12:59:21.000000000 +0900
+--- zoopack.c.orig     1993-05-01 05:59:21.000000000 +0200
 +++ zoopack.c
 @@ -32,7 +32,9 @@ Copyright (C) 1986, 1987 Rahul Dhesi -- 
  #include <signal.h>

==> patches/patch-ae <==
$NetBSD: patch-ae,v 1.2 2004/06/15 04:24:30 minskim Exp $

--- nixtime.i.orig      1991-07-16 17:53:46.000000000 +0200
+++ nixtime.i
@@ -1,3 +1,6 @@
+#include <time.h>
+#include <sys/time.h>
+
 #ifndef LINT
 static char nixtimeid[]="@(#) nixtime.i 2.3 88/01/24 12:49:28";
 #endif /* LINT */
@@ -35,7 +38,7 @@ unsigned *date, *time;
       *time = tm->tm_sec / 2 + (tm->tm_min << 5) +
          (tm->tm_hour << 11);
    }
-
+   return 0;
 }
 
 /*****************
@@ -51,9 +54,11 @@ unsigned int date, time;
 {
        long mstonix();
        long gettz();
-       long utimbuf[2];
-       utimbuf[0] = utimbuf[1] = gettz() + mstonix (date, time);
-       return (utime (path, utimbuf));
+       long t = mstonix (date, time);
+        struct timeval times[2];
+        times[0].tv_sec = times[1].tv_sec = t + gettz(t);
+        times[0].tv_usec = times[1].tv_usec = 0;
+        return utimes(path, times);
 }
 
 /****************

==> patches/patch-am <==
$NetBSD: patch-am,v 1.1 2007/05/13 16:59:39 taca Exp $

--- portable.c.orig     1991-07-16 17:55:11.000000000 +0200
+++ portable.c
@@ -87,6 +87,12 @@ ZOOFILE zoocreate (fname)
 char *fname;
 { return ((ZOOFILE) fopen (fname, Z_NEW)); }
 
+#ifndef USE_MKTEMP
+ZOOFILE zoocreate_fd (fd)
+int fd;
+{ return ((ZOOFILE) fdopen (fd, Z_NEW)); }
+#endif
+
 #endif /* FIZ */
 
 #ifndef zooseek
@@ -220,6 +226,13 @@ BYTE data[];
          ((unsigned long) data[2] << 16) | ((unsigned long) data[3] << 24));
 }
 
+long to_signed_long(data)
+BYTE data[];
+{
+   return (long) ((long) data[0] | ((long) data[1] << 8) |
+         ((long) data[2] << 16) | ((long) (char)data[3] << 24));
+}
+
 #ifndef FIZ
 /********************
 splitlong() converts a long integer to four consecutive BYTEs in order
@@ -426,7 +439,7 @@ BYTE bytes[];
       zoo_header->text[i] = bytes[TEXT_I + i];
    zoo_header->zoo_tag = to_long(&bytes[ZTAG_I]);     /* copy zoo_tag */
    zoo_header->zoo_start = to_long(&bytes[ZST_I]);    /* copy zoo_start */
-   zoo_header->zoo_minus = to_long(&bytes[ZSTM_I]);
+   zoo_header->zoo_minus = to_signed_long(&bytes[ZSTM_I]);
    zoo_header->major_ver = bytes[MAJV_I];          /* copy versions */
    zoo_header->minor_ver = bytes[MINV_I];
        /* default is no archive comment and a header type of 0 */


-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.



Home | Main Index | Thread Index | Old Index