+2006-12-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix problems in porting to NSK reported by Matthew Woehlke in
+ <http://lists.gnu.org/archive/html/bug-gzip/2006-12/msg00025.html> and
+ <http://lists.gnu.org/archive/html/bug-gzip/2006-12/msg00027.html>.
+ * gzip.h: Include <limits.h>, for SSIZE_MAX.
+ (INBUFSIZE): Don't make it any larger than SSIZE_MAX.
+ Problem reported by Matthew Woehlke in
+ <http://lists.gnu.org/archive/html/bug-gzip/2006-11/msg00013.html>.
+ * gzip.c: Don't include <limits.h>, as gzip.h now does this.
+ * util.c: Likewise.
+ * gzip.c (main): Set exiting_signal before installing signal handlers.
+ (install_signal_handlers): Don't set exiting_signal here. This
+ fixes a C99ism.
+ * zip.c: Include timespec.h, for time_stamp type.
+
2006-12-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
* gzexe.in: Work around FreeBSD shell trap bug.
# include <fcntl.h>
#endif
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
ALLOC(ush, tab_prefix1, 1L<<(BITS-1));
#endif
+ exiting_signal = quiet ? SIGPIPE : 0;
install_signal_handlers ();
/* And get to work */
int nsigs = sizeof sig / sizeof sig[0];
int i;
- exiting_signal = quiet ? SIGPIPE : 0;
-
#if SA_NOCLDSTOP
struct sigaction act;
# define memzero(s, n) bzero((s), (n))
#endif
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
#ifndef RETSIGTYPE
# define RETSIGTYPE void
#endif
# else
# define INBUFSIZ 0x8000 /* input buffer size */
# endif
+# if defined SSIZE_MAX && SSIZE_MAX < INBUFSIZ
+# undef INBUFSIZ
+# define INBUFSIZ SSIZE_MAX
+# endif
#endif
#define INBUF_EXTRA 64 /* required by unlzw() */
/* util.c -- utility functions for gzip support
- Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2001, 2002, 2006 Free Software
+ Foundation, Inc.
Copyright (C) 1992-1993 Jean-loup Gailly
This program is free software; you can redistribute it and/or modify
#include "tailor.h"
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "gzip.h"
#include "crypt.h"
+#include "timespec.h"
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif