enable hardening build flags
[debian/gzip] / gzip.h
diff --git a/gzip.h b/gzip.h
index ae273a6bc44a784bb7b47bf32232b10fe9a936ba..5270c56a4d90c7d223abfefc0a22054b89028773 100644 (file)
--- a/gzip.h
+++ b/gzip.h
@@ -1,11 +1,13 @@
 /* gzip.h -- common declarations for all gzip modules
 
 /* gzip.h -- common declarations for all gzip modules
 
-   Copyright (C) 1997, 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-1999, 2001, 2006-2007, 2009-2010 Free Software
+   Foundation, Inc.
+
    Copyright (C) 1992-1993 Jean-loup Gailly.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    Copyright (C) 1992-1993 Jean-loup Gailly.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    This program is distributed in the hope that it will be useful,
    any later version.
 
    This program is distributed in the hope that it will be useful,
  * too often
  */
 #include <stdio.h>
  * too often
  */
 #include <stdio.h>
-#include <sys/types.h> /* for off_t, time_t */
-#if defined HAVE_STRING_H || defined STDC_HEADERS
-#  include <string.h>
-#  if !defined STDC_HEADERS && defined HAVE_MEMORY_H && !defined __GNUC__
-#    include <memory.h>
-#  endif
-#  define memzero(s, n)     memset ((voidp)(s), 0, (n))
-#else
-#  include <strings.h>
-#  define strchr            index
-#  define strrchr           rindex
-#  define memcpy(d, s, n)   bcopy((s), (d), (n))
-#  define memcmp(s1, s2, n) bcmp((s1), (s2), (n))
-#  define memzero(s, n)     bzero((s), (n))
-#endif
+#include <sys/types.h> /* for off_t */
+#include <time.h>
+#include <string.h>
+#define memzero(s, n) memset ((voidp)(s), 0, (n))
 
 #ifndef RETSIGTYPE
 #  define RETSIGTYPE void
 
 #ifndef RETSIGTYPE
 #  define RETSIGTYPE void
@@ -304,7 +295,7 @@ off_t deflate OF((void));
         /* in trees.c */
 void ct_init     OF((ush *attr, int *method));
 int  ct_tally    OF((int dist, int lc));
         /* in trees.c */
 void ct_init     OF((ush *attr, int *method));
 int  ct_tally    OF((int dist, int lc));
-off_t flush_block OF((char *buf, ulg stored_len, int pad, int eof));
+off_t flush_block OF((char *buf, ulg stored_len, int eof));
 
         /* in bits.c */
 void     bi_init    OF((file_t zipfile));
 
         /* in bits.c */
 void     bi_init    OF((file_t zipfile));
@@ -327,12 +318,12 @@ extern char *strlwr       OF((char *s));
 extern char *gzip_base_name OF((char *fname));
 extern int xunlink        OF((char *fname));
 extern void make_simple_name OF((char *name));
 extern char *gzip_base_name OF((char *fname));
 extern int xunlink        OF((char *fname));
 extern void make_simple_name OF((char *name));
-extern char *add_envopt   OF((int *argcp, char ***argvp, char *env));
-extern void gzip_error    OF((char *m));
+extern char *add_envopt   OF((int *argcp, char ***argvp, char const *env));
+extern void gzip_error    OF((char const *m)) ATTRIBUTE_NORETURN;
 extern void xalloc_die    OF((void)) ATTRIBUTE_NORETURN;
 extern void xalloc_die    OF((void)) ATTRIBUTE_NORETURN;
-extern void warning       OF((char *m));
-extern void read_error    OF((void));
-extern void write_error   OF((void));
+extern void warning       OF((char const *m));
+extern void read_error    OF((void)) ATTRIBUTE_NORETURN;
+extern void write_error   OF((void)) ATTRIBUTE_NORETURN;
 extern void display_ratio OF((off_t num, off_t den, FILE *file));
 extern void fprint_off    OF((FILE *, off_t, int));
 
 extern void display_ratio OF((off_t num, off_t den, FILE *file));
 extern void fprint_off    OF((FILE *, off_t, int));