cvs commit: patches/zoo zoo-2.10-gcc33-1.patch zoo-2.10-linux-1.patch zoo-2.10-missing-1.patch

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Tue Sep 2 07:32:22 PDT 2003


tushar      03/09/02 08:32:22

  Modified:    flex     flex-2.5.4a-redhat-fixes.patch
  Added:       zoo      zoo-2.10-gcc33-1.patch zoo-2.10-linux-1.patch
                        zoo-2.10-missing-1.patch
  Log:
  added zoo patches
  
  Revision  Changes    Path
  1.2       +1 -1      patches/flex/flex-2.5.4a-redhat-fixes.patch
  
  Index: flex-2.5.4a-redhat-fixes.patch
  ===================================================================
  RCS file: /home/cvsroot/patches/flex/flex-2.5.4a-redhat-fixes.patch,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- flex-2.5.4a-redhat-fixes.patch	2 Sep 2003 14:28:12 -0000	1.1
  +++ flex-2.5.4a-redhat-fixes.patch	2 Sep 2003 14:32:22 -0000	1.2
  @@ -1,7 +1,7 @@
   Submitted By: Tushar Teredesai <tushar at linuxfromscratch.org>
   Date: 2002-12-31
   Initial Package Version: 2.5.4a
  -Origin: Redhat RPM
  +Origin: Redhat RPM, http://archives.linuxfromscratch.org/mail-archives/lfs-dev/2003-January/031014.html
   Description: Various fixes related to the newer GCC & GLIBC releases
       * conflicting isatty() prototype w/ glibc 2.2.
       * gcc-3 related fixes.
  
  
  
  1.1                  patches/zoo/zoo-2.10-gcc33-1.patch
  
  Index: zoo-2.10-gcc33-1.patch
  ===================================================================
  Submitted By: Jim Gifford (patches at jg555 dot com)
  Date: 2003-06-02
  Initial Package Version: 2.10
  Origin: Jim Gifford
  Description: Fixes GCC 3.3 Compile Errors
  
  diff -Naur zoo-2.10.orig/prterror.c zoo-2.10/prterror.c
  --- zoo-2.10.orig/prterror.c	1991-07-05 09:00:00.000000000 -0000
  +++ zoo-2.10/prterror.c	2003-06-02 14:11:20.000000000 -0000
  @@ -23,15 +23,7 @@
   # include <ctype.h>	/* for isdigit() */
   #endif
   
  -#ifdef STDARG
  -# include <stdarg.h>
  -#else
  -# ifdef VARARGS
  -#  include <varargs.h>
  -# else
  -#  include "MUST DEFINE STDARG OR VARARGS"
  -# endif
  -#endif
  +#include <stdarg.h>
   
   #ifdef NEED_VPRINTF
   static int zvfprintf();
  @@ -115,29 +107,12 @@
   char could_not_open[] = "Could not open %s.\n";
   #endif
   
  -#ifdef STDARG
  -void prterror(int level, char *format, ...)
  -#else
  -/*VARARGS*/
  -void prterror(va_alist)
  -va_dcl
  -#endif
  +void prterror(level, format, a, b, c, d)
  +register int level;
  +char *format, *a, *b, *c, *d;
  +
   {
  -	va_list args;
      char string[120];       /* local format string */
  -#ifdef VARARGS
  -	int level;
  -	char *format;
  -#endif
  -
  -#ifdef STDARG
  -	va_start(args, format);
  -#else
  -	va_start(args);
  -	level = va_arg(args, int);
  -	format = va_arg(args, char *);
  -#endif
  -
      *string = '\0';         /* get a null string to begin with */
   
   #ifdef OOZ
  @@ -162,13 +137,9 @@
   
      strcat (string, format);      /* just append supplied format string */
   
  -	/* and print the whole thing */
  -#ifdef NEED_VPRINTF
  -	(void) zvfprintf(stdout, string, args);
  -#else
  -   (void) vprintf(string, args);
  -#endif
  -	fflush (stdout);
  +
  +   printf (string, a, b, c, d);   /* and print the whole thing */
  +        fflush (stdout);
   
      if (level == 'f')       /* and abort on fatal error 'f' but not 'F' */
         zooexit (1);
  
  
  
  
  1.1                  patches/zoo/zoo-2.10-linux-1.patch
  
  Index: zoo-2.10-linux-1.patch
  ===================================================================
  Submitted By: Jim Gifford (patches at jg555 dot com)
  Date: 2003-08-25
  Initial Package Version: 2.10
  Origin: Based on ftp://ftp.ibiblio.org/pub/Linux/utils/compress/zoo-2.10.linux.diff.gz
  Description: Fixes zoo to compile under Linux
  
  diff -Naur zoo.orig/ar.h zoo/ar.h
  --- zoo.orig/ar.h	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/ar.h	2003-08-25 00:23:43.000000000 +0000
  @@ -15,9 +15,9 @@
   /* uchar should be 8 bits or more */
   /* typedef unsigned char  uchar;   -- already in zoo.h */
   
  -typedef unsigned int   uint;    /* 16 bits or more */
  -typedef unsigned short ushort;  /* 16 bits or more */
  -typedef unsigned long  ulong;   /* 32 bits or more */
  +typedef unsigned int   my_uint;    /* 16 bits or more */
  +typedef unsigned short my_ushort;  /* 16 bits or more */
  +typedef unsigned long  my_ulong;   /* 32 bits or more */
   
   /* T_UINT16 must be #defined in options.h to be 
   a 16-bit unsigned integer type */
  @@ -47,7 +47,7 @@
   /* ar.c */
   
   extern int unpackable;
  -extern ulong origsize, compsize;
  +extern my_ulong origsize, compsize;
   
   /* all the prototypes follow here for all files */
   
  @@ -85,14 +85,14 @@
   void output PARMS((uint c , uint p ));
   void huf_encode_start PARMS((void ));
   void huf_encode_end PARMS((void ));
  -uint decode_c PARMS((void ));
  -uint decode_p PARMS((void ));
  +my_uint decode_c PARMS((void ));
  +my_uint decode_p PARMS((void ));
   void huf_decode_start PARMS((void ));
   
   /* IO.C */
   void make_crctable PARMS((void ));
   void fillbuf PARMS((int n ));
  -uint getbits PARMS((int n ));
  +my_uint getbits PARMS((int n ));
   void putbits PARMS((int n , uint x ));
   int fread_crc PARMS((uchar *p , int n , FILE *f ));
   void fwrite_crc PARMS((uchar *p , int n , FILE *f ));
  diff -Naur zoo.orig/basename.c zoo/basename.c
  --- zoo.orig/basename.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/basename.c	2003-08-25 00:23:43.000000000 +0000
  @@ -18,7 +18,7 @@
   
   /* This function strips device/directory information from
   a pathname and returns just the plain filename */
  -void basename (pathname, fname)
  +void mybasename (pathname, fname)
   char *pathname;
   char fname[];
   {
  diff -Naur zoo.orig/decode.c zoo/decode.c
  --- zoo.orig/decode.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/decode.c	2003-08-25 00:23:43.000000000 +0000
  @@ -27,7 +27,7 @@
   */
   
   int decode(count, buffer)
  -uint count;
  +my_uint count;
   uchar buffer[];
   	/* The calling function must keep the number of
   	   bytes to be processed.  This function decodes
  @@ -37,8 +37,8 @@
   	   Call decode_start() once for each new file
   	   before calling this function. */
   {
  -	static uint i;
  -	uint r, c;
  +	static my_uint i;
  +	my_uint r, c;
   
   	r = 0;
   	while (--j >= 0) {
  diff -Naur zoo.orig/lzh.c zoo/lzh.c
  --- zoo.orig/lzh.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/lzh.c	2003-08-25 00:23:43.000000000 +0000
  @@ -45,7 +45,7 @@
   
   	decode_start();
   	while (!decoded) {
  -		n = decode((uint) DICSIZ, out_buf_adr); /* n = count of chars decoded */
  +		n = decode((my_uint) DICSIZ, out_buf_adr); /* n = count of chars decoded */
   #ifdef COUNT_BYTES
   		bytes_decoded += n;	/*debug*/
   #endif
  diff -Naur zoo.orig/lzh.h zoo/lzh.h
  --- zoo.orig/lzh.h	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/lzh.h	2003-08-25 00:23:43.000000000 +0000
  @@ -34,4 +34,4 @@
   #define CBIT 9  /* $\lfloor \log_2 NC \rfloor + 1$ */
   #define CODE_BIT  16  /* codeword length */
   
  -extern ushort left[], right[];
  +extern my_ushort left[], right[];
  diff -Naur zoo.orig/makefile zoo/makefile
  --- zoo.orig/makefile	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/makefile	2003-08-25 00:23:43.000000000 +0000
  @@ -18,12 +18,12 @@
   
   MAKE = make	      # needed for some systems e.g. older BSD
   
  -CC = cc
  +CC = gcc
   CFLAGS =
   MODEL =
   EXTRA = -DBIG_MEM -DNDEBUG
   LINTFLAGS = -DLINT
  -OPTIM = -O
  +OPTIM = -O3
   DESTDIR = /usr/local/bin
   
   #List of all object files created for Zoo
  @@ -50,6 +50,7 @@
   	@echo "generic:      generic **IX environment, minimal functionlity"
   	@echo "bsd:          4.3BSD or reasonable equivalent"
   	@echo "bsdansi:      4.3BSD with ANSI C"
  +	@echo "linux:	     Linux for Alpha & i386"
   	@echo "ultrix:       ULTRIX 4.1"
   	@echo "convex:       Convex C200 series"
   	@echo "sysv:         System V Release 2 or 3; or SCO Xenix"
  @@ -106,6 +107,10 @@
   convex:
   	$(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)
   
  +# Linux
  +linux:
  +	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V -DANSI_HDRS -DHAVE_MKDIR" $(TARGETS)
  +
   # SysV.2, V.3, SCO Xenix
   sysv:
   	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS)
  @@ -235,7 +240,7 @@
   parse.o: zoofns.h zooio.h
   portable.o: /usr/include/stdio.h assert.h debug.h machine.h options.h
   portable.o: portable.h various.h zoo.h zoofns.h zooio.h
  -prterror.o: /usr/include/stdio.h /usr/include/varargs.h options.h various.h
  +prterror.o: /usr/include/stdio.h options.h various.h
   prterror.o: zoofns.h zooio.h
   sysv.o: /usr/include/sys/stat.h /usr/include/sys/types.h /usr/include/time.h
   sysv.o: nixmode.i nixtime.i
  diff -Naur zoo.orig/maketbl.c zoo/maketbl.c
  --- zoo.orig/maketbl.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/maketbl.c	2003-08-25 00:23:43.000000000 +0000
  @@ -16,10 +16,10 @@
   int nchar;
   uchar bitlen[];
   int tablebits;
  -ushort table[];
  +my_ushort table[];
   {
  -	ushort count[17], weight[17], start[18], *p;
  -	uint i, k, len, ch, jutbits, avail, nextcode, mask;
  +	my_ushort count[17], weight[17], start[18], *p;
  +	my_uint i, k, len, ch, jutbits, avail, nextcode, mask;
   
   	for (i = 1; i <= 16; i++) count[i] = 0;
   	for (i = 0; i < nchar; i++) count[bitlen[i]]++;
  @@ -27,7 +27,7 @@
   	start[1] = 0;
   	for (i = 1; i <= 16; i++)
   		start[i + 1] = start[i] + (count[i] << (16 - i));
  -	if (start[17] != (ushort)((unsigned) 1 << 16))
  +	if (start[17] != (my_ushort)((unsigned) 1 << 16))
   		prterror('f', "Bad decode table\n");
   
   	jutbits = 16 - tablebits;
  @@ -41,7 +41,7 @@
           }
   
   	i = start[tablebits + 1] >> jutbits;
  -	if (i != (ushort)((unsigned) 1 << 16)) {
  +	if (i != (my_ushort)((unsigned) 1 << 16)) {
   		k = 1 << tablebits;
   		while (i != k) table[i++] = 0;
   	}
  diff -Naur zoo.orig/maketree.c zoo/maketree.c
  --- zoo.orig/maketree.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/maketree.c	2003-08-25 00:23:43.000000000 +0000
  @@ -12,7 +12,7 @@
   
   static int    n, heapsize;
   static short  heap[NC + 1];
  -static ushort *freq, *sortptr, len_cnt[17];
  +static my_ushort *freq, *sortptr, len_cnt[17];
   static uchar  *len;
   
   static void count_len(i)  /* call with i = root */
  @@ -33,7 +33,7 @@
   int root;
   {
   	int i, k;
  -	uint cum;
  +	my_uint cum;
   
   	for (i = 0; i <= 16; i++) len_cnt[i] = 0;
   	count_len(root);
  @@ -75,10 +75,10 @@
   static void make_code(j, length, code)
   int j;
   uchar length[];
  -ushort code[];
  +my_ushort code[];
   {
   	int    i;
  -	ushort start[18];
  +	my_ushort start[18];
   
   	start[1] = 0;
   	for (i = 1; i <= 16; i++)
  @@ -88,9 +88,9 @@
   
   int make_tree(nparm, freqparm, lenparm, codeparm)
   int nparm;
  -ushort freqparm[];
  +my_ushort freqparm[];
   uchar lenparm[];
  -ushort codeparm[];
  +my_ushort codeparm[];
   	/* make tree, calculate len[], return root */
   {
   	int i, j, k, avail;
  diff -Naur zoo.orig/sysv.c zoo/sysv.c
  --- zoo.orig/sysv.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/sysv.c	2003-08-25 00:23:43.000000000 +0000
  @@ -129,6 +129,7 @@
   exists by the name of the needed directory.
   */
   
  +#ifndef HAVE_MKDIR
   int mkdir(dirname)
   char *dirname;
   {
  @@ -140,6 +141,7 @@
      }
   	return (0);
   }
  +#endif
   
   /* No file truncate system call in older System V.  If yours has one,
   add it here -- see bsd.c for example.  It's ok for zootrunc to be
  diff -Naur zoo.orig/zooadd.c zoo/zooadd.c
  --- zoo.orig/zooadd.c	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/zooadd.c	2003-08-25 00:23:43.000000000 +0000
  @@ -132,7 +132,7 @@
   
   if (zoo_file == NOFILE)
      prterror ('f', could_not_open, zoo_path);
  -basename(zoo_path, zoo_fname);      /* get basename of archive */
  +mybasename(zoo_path, zoo_fname);      /* get basename of archive */
   rootname (zoo_path, zoo_bak);       /* name without extension */
   strcat (zoo_bak, BACKUP_EXT);       /* name of backup of this archive */
   
  @@ -222,7 +222,7 @@
   		break;
   	}
   
  -   basename (this_path, this_fname);   /* get just filename for later */
  +   mybasename (this_path, this_fname);   /* get just filename for later */
   
      this_file = zooopen(this_path, Z_READ);
      if (this_file == NOFILE) {
  diff -Naur zoo.orig/zoofns.h zoo/zoofns.h
  --- zoo.orig/zoofns.h	1991-07-05 16:00:00.000000000 +0000
  +++ zoo/zoofns.h	2003-08-25 00:23:43.000000000 +0000
  @@ -85,7 +85,7 @@
   void addfname PARMS ((char *, long, unsigned int, unsigned int, 
   							unsigned, unsigned));
   void add_version PARMS ((char *, struct direntry *));
  -void basename PARMS ((char *, char []));
  +void mybasename PARMS ((char *, char []));
   void break_off PARMS ((void));
   void close_file PARMS ((ZOOFILE));
   void comment PARMS ((char *, char *));
  
  
  
  1.1                  patches/zoo/zoo-2.10-missing-1.patch
  
  Index: zoo-2.10-missing-1.patch
  ===================================================================
  Submitted By: Jim Gifford (patches at jg555 dot com)
  Date: 2003-06-02
  Initial Package Version: 2.10
  Origin: Jim Gifford
  Description: Adds Missing Files
  
  diff -Naur zoo-2.10.orig/makefile zoo-2.10/makefile
  --- zoo-2.10.orig/makefile	2003-06-02 14:07:51.000000000 -0000
  +++ zoo-2.10/makefile	2003-06-02 14:11:20.000000000 -0000
  @@ -70,14 +70,17 @@
   # install alpha zoo as "tzoo"
   install:
   	mv zoo $(DESTDIR)/tzoo
  +	mv fiz $(DESTDIR)/tfiz
   
   # install beta zoo as "bzoo"
   inst_beta:
   	mv zoo $(DESTDIR)/bzoo
  +	mv fiz $(DESTDIR)/bfiz
   
   # install production zoo as "zoo"
   inst_prod:
   	mv zoo $(DESTDIR)/zoo
  +	mv fiz $(DESTDIR)/fiz
   
   # executable targets
   TARGETS = zoo fiz
  @@ -144,7 +147,7 @@
   
   # standard clean -- remove all transient files
   clean :
  -	rm -f core a.out $(ZOOOBJS) $(FIZOBJS)
  +	rm -f core a.out $(ZOOOBJS) $(FIZOBJS) fiz zoo
   
   # object clean only -- just remove object files
   objclean:
  
  
  



More information about the patches mailing list