pkgsrc-Users archive

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

Re: CVS commit: pkgsrc



On Thu 12 Feb 2009 at 02:08:56 +0100, Joerg Sonnenberger wrote:
> On Wed, Feb 11, 2009 at 04:53:19PM -0800, John Nemeth wrote:
> > } Log Message:
> > } Sort PYTHON_VERSIONS_ACCEPTED.
> > 
> >      Since when did zoo require python?
> 
> Sorry, slipped in. That should be "Add DESTDIR support".

Speaking of zoo, I have the following replacement patch-am to make it
work on 64 bit machines (there was incorrect sign extension going on in
a field used for header validation, I believe):


$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 */


Home | Main Index | Thread Index | Old Index