1 /* tailor.h -- target dependent definitions
3 Copyright (C) 1997-1999, 2002, 2006, 2009-2017 Free Software Foundation,
5 Copyright (C) 1992-1993 Jean-loup Gailly
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21 /* The target dependent definitions should be defined here only.
22 * The target dependent functions should be defined in tailor.c.
25 #if defined(__MSDOS__) && !defined(MSDOS)
29 #if defined(__OS2__) && !defined(OS2)
33 #if defined(OS2) && defined(MSDOS) /* MS C under OS/2 */
39 /* DJGPP version 1.09+ on MS-DOS.
40 * The DJGPP 1.09 stat() function must be upgraded before gzip will
50 # define HAVE_SYS_UTIME_H
53 # define MAX_PATH_LEN 128
54 # define NO_MULTIPLE_DOTS
55 # define MAX_EXT_CHARS 3
57 # define NO_SIZE_CHECK
58 # define UNLINK_READONLY_BUG
59 # define casemap(c) tolow(c) /* Force file names to lower case */
62 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
63 # if !defined(NO_ASM) && !defined(ASMV)
71 # define MAX_PATH_LEN 260
73 # define NO_MULTIPLE_DOTS
74 # define MAX_EXT_CHARS 3
76 # define casemap(c) tolow(c)
78 # define UNLINK_READONLY_BUG
81 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
83 # define HAVE_SYS_UTIME_H
89 # define HAVE_SYS_UTIME_H
90 # define EXPAND(argc,argv) \
91 {_response(&argc, &argv); _wildcard(&argc, &argv);}
99 # define EXPAND(argc,argv) \
100 {response_expand(&argc, &argv);}
104 #if defined WIN32 || defined _WIN32
105 # define HAVE_SYS_UTIME_H
106 # define MAX_PATH_LEN 260
107 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
108 # define UNLINK_READONLY_BUG
112 # define NO_MULTIPLE_DOTS
113 # define MAX_EXT_CHARS 3
114 # define Z_SUFFIX "z"
115 # define casemap(c) tolow(c) /* Force file names to lower case */
117 # define OS_CODE 0x0b
124 /* Turbo C 2.0 does not accept static allocations of large arrays */
125 void * fcalloc (unsigned items, unsigned size);
126 void fcfree (void *ptr);
129 # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
130 # define fcfree(ptr) hfree(ptr)
134 # define fcalloc(items,size) calloc((items),(size))
136 # define fcalloc(items,size) malloc((size_t)(items)*(size_t)(size))
138 # define fcfree(ptr) free(ptr)
141 #if defined(ATARI) || defined(atarist)
142 # define OS_CODE 0x05
144 # define MAX_PATH_LEN 128
145 # define NO_MULTIPLE_DOTS
146 # define MAX_EXT_CHARS 3
147 # define Z_SUFFIX "z"
148 # define casemap(c) tolow(c) /* Force file names to lower case */
153 # define OS_CODE 0x0a
161 /* Common defaults */
164 # define OS_CODE 0x03 /* assume Unix */
168 # define casemap(c) (c)
172 # define OPTIONS_VAR "GZIP"
176 # define Z_SUFFIX ".gz"
180 # define MAX_SUFFIX MAX_EXT_CHARS
182 # define MAX_SUFFIX 30
185 #ifndef MAKE_LEGAL_NAME
186 # ifdef NO_MULTIPLE_DOTS
187 # define MAKE_LEGAL_NAME(name) make_simple_name(name)
189 # define MAKE_LEGAL_NAME(name)
195 /* keep at least MIN_PART chars between dots in a file name. */
199 # define EXPAND(argc,argv)
202 #ifndef SET_BINARY_MODE
203 # define SET_BINARY_MODE(fd)
208 # define FALLTHROUGH ((void) 0)
210 # define FALLTHROUGH __attribute__ ((__fallthrough__))