X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tailor.h;h=4d6391562c4670a8a754b1b2a63d93c78cfdc5cf;hb=f2be148c3d956c2dd19bd6fdbe6de977e86cba35;hp=daa48ca4ee2d01a2ee49f076979e23bb463b95c7;hpb=19c488bc68ce9bbe727a44e88c6333a3029d7217;p=debian%2Fgzip diff --git a/tailor.h b/tailor.h index daa48ca..4d63915 100644 --- a/tailor.h +++ b/tailor.h @@ -1,15 +1,27 @@ /* tailor.h -- target dependent definitions - * Copyright (C) 1992-1993 Jean-loup Gailly. - * This is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License, see the file COPYING. - */ + + Copyright (C) 1997-1999, 2002, 2006, 2009-2012 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 + 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, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* The target dependent definitions should be defined here only. * The target dependent functions should be defined in tailor.c. */ -/* $Id$ */ - #if defined(__MSDOS__) && !defined(MSDOS) # define MSDOS #endif @@ -27,22 +39,15 @@ /* DJGPP version 1.09+ on MS-DOS. * The DJGPP 1.09 stat() function must be upgraded before gzip will * fully work. - * No need for DIRENT, since defines POSIX_SOURCE which - * implies DIRENT. */ # define near # else # define MAXSEG_64K # ifdef __TURBOC__ -# define NO_OFF_T -# ifdef __BORLANDC__ -# define DIRENT -# else -# define NO_UTIME -# endif +# define off_t long +# define HAVE_UTIME_H # else /* MSC */ # define HAVE_SYS_UTIME_H -# define NO_UTIME_H # endif # endif # define PATH_SEP2 '\\' @@ -51,10 +56,10 @@ # define NO_MULTIPLE_DOTS # define MAX_EXT_CHARS 3 # define Z_SUFFIX "z" -# define NO_CHOWN # define PROTO # define STDC_HEADERS # define NO_SIZE_CHECK +# define UNLINK_READONLY_BUG # define casemap(c) tolow(c) /* Force file names to lower case */ # include # define OS_CODE 0x00 @@ -76,32 +81,28 @@ # define Z_SUFFIX "z" # define casemap(c) tolow(c) # endif -# define NO_CHOWN # define PROTO # define STDC_HEADERS +# define UNLINK_READONLY_BUG # include # define OS_CODE 0x06 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) # ifdef _MSC_VER # define HAVE_SYS_UTIME_H -# define NO_UTIME_H # define MAXSEG_64K # undef near # define near _near # endif # ifdef __EMX__ # define HAVE_SYS_UTIME_H -# define NO_UTIME_H -# define DIRENT # define EXPAND(argc,argv) \ {_response(&argc, &argv); _wildcard(&argc, &argv);} # endif # ifdef __BORLANDC__ -# define DIRENT +# define HAVE_UTIME_H # endif # ifdef __ZTC__ -# define NO_DIR -# define NO_UTIME_H +# define NO_DIR 1 # include # define EXPAND(argc,argv) \ {response_expand(&argc, &argv);} @@ -110,14 +111,13 @@ #ifdef WIN32 /* Windows NT */ # define HAVE_SYS_UTIME_H -# define NO_UTIME_H # define PATH_SEP2 '\\' # define PATH_SEP3 ':' # define MAX_PATH_LEN 260 -# define NO_CHOWN # define PROTO # define STDC_HEADERS # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) +# define UNLINK_READONLY_BUG # include # include # ifdef NTFAT @@ -155,18 +155,17 @@ # define PATH_SEP2 ':' # define SUFFIX_SEP ';' # define NO_MULTIPLE_DOTS +# define NO_SIZE_CHECK # define Z_SUFFIX "-gz" # define RECORD_IO 1 # define casemap(c) tolow(c) # define OS_CODE 0x02 # define OPTIONS_VAR "GZIP_OPT" # define STDC_HEADERS -# define NO_UTIME # define EXPAND(argc,argv) vms_expand_args(&argc,&argv); # include # define unlink delete # ifdef VAXC -# define NO_FCNTL_H # include # endif #endif @@ -177,28 +176,19 @@ # define OS_CODE 0x01 # define ASMV # ifdef __GNUC__ -# define DIRENT -# define HAVE_UNISTD_H +# define HAVE_CHOWN +# define HAVE_LSTAT # else /* SASC */ # define NO_STDIN_FSTAT -# define SYSDIR -# define NO_SYMLINK -# define NO_CHOWN -# define NO_FCNTL_H +# define HAVE_SYS_DIR_H # include /* for read() and write() */ # define direct dirent extern void _expand_args(int *argc, char ***argv); # define EXPAND(argc,argv) _expand_args(&argc,&argv); -# undef O_BINARY /* disable useless --ascii option */ # endif #endif #if defined(ATARI) || defined(atarist) -# ifndef STDC_HEADERS -# define STDC_HEADERS -# define HAVE_UNISTD_H -# define DIRENT -# endif # define ASMV # define OS_CODE 0x05 # ifdef TOSFS @@ -208,9 +198,7 @@ # define NO_MULTIPLE_DOTS # define MAX_EXT_CHARS 3 # define Z_SUFFIX "z" -# define NO_CHOWN # define casemap(c) tolow(c) /* Force file names to lower case */ -# define NO_SYMLINK # endif #endif @@ -219,8 +207,6 @@ # define DYN_ALLOC # define PROTO # define NO_STDIN_FSTAT -# define NO_CHOWN -# define NO_UTIME # define chmod(file, mode) (0) # define OPEN(name, flags, mode) open(name, flags) # define OS_CODE 0x07 @@ -229,40 +215,12 @@ # endif #endif -#ifdef __50SERIES /* Prime/PRIMOS */ -# define PATH_SEP '>' -# define STDC_HEADERS -# define NO_MEMORY_H -# define NO_UTIME_H -# define NO_UTIME -# define NO_CHOWN -# define NO_STDIN_FSTAT -# define NO_SIZE_CHECK -# define NO_SYMLINK -# define RECORD_IO 1 -# define casemap(c) tolow(c) /* Force file names to lower case */ -# define put_char(c) put_byte((c) & 0x7F) -# define get_char(c) ascii2pascii(get_byte()) -# define OS_CODE 0x0F /* temporary, subject to change */ -# ifdef SIGTERM -# undef SIGTERM /* We don't want a signal handler for SIGTERM */ -# endif -#endif - -#if defined(pyr) && !defined(NOMEMCPY) /* Pyramid */ -# define NOMEMCPY /* problem with overlapping copies */ -#endif - #ifdef TOPS20 # define OS_CODE 0x0a #endif -#ifndef unix -# define NO_ST_INO /* don't rely on inode numbers */ -#endif - - /* Common defaults */ + /* Common defaults */ #ifndef OS_CODE # define OS_CODE 0x03 /* assume Unix */ @@ -316,13 +274,5 @@ #endif #ifndef OPEN -# define OPEN(name, flags, mode) open(name, flags, mode) -#endif - -#ifndef get_char -# define get_char() get_byte() -#endif - -#ifndef put_char -# define put_char(c) put_byte(c) +# define OPEN(name, flags, mode) open_safer (name, flags, mode) #endif