1 /* tailor.h -- target dependent definitions
3 Copyright (C) 1997-1999, 2002, 2006, 2009-2016 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 PATH_SEP2 '\\'
54 # define PATH_SEP3 ':'
55 # define MAX_PATH_LEN 128
56 # define NO_MULTIPLE_DOTS
57 # define MAX_EXT_CHARS 3
61 # define NO_SIZE_CHECK
62 # define UNLINK_READONLY_BUG
63 # define casemap(c) tolow(c) /* Force file names to lower case */
66 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
67 # if !defined(NO_ASM) && !defined(ASMV)
75 # define PATH_SEP2 '\\'
76 # define PATH_SEP3 ':'
77 # define MAX_PATH_LEN 260
79 # define NO_MULTIPLE_DOTS
80 # define MAX_EXT_CHARS 3
82 # define casemap(c) tolow(c)
86 # define UNLINK_READONLY_BUG
89 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
91 # define HAVE_SYS_UTIME_H
97 # define HAVE_SYS_UTIME_H
98 # define EXPAND(argc,argv) \
99 {_response(&argc, &argv); _wildcard(&argc, &argv);}
102 # define HAVE_UTIME_H
107 # define EXPAND(argc,argv) \
108 {response_expand(&argc, &argv);}
112 #ifdef WIN32 /* Windows NT */
113 # define HAVE_SYS_UTIME_H
114 # define PATH_SEP2 '\\'
115 # define PATH_SEP3 ':'
116 # define MAX_PATH_LEN 260
118 # define STDC_HEADERS
119 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
120 # define UNLINK_READONLY_BUG
124 # define NO_MULTIPLE_DOTS
125 # define MAX_EXT_CHARS 3
126 # define Z_SUFFIX "z"
127 # define casemap(c) tolow(c) /* Force file names to lower case */
129 # define OS_CODE 0x0b
136 /* Turbo C 2.0 does not accept static allocations of large arrays */
137 void * fcalloc (unsigned items, unsigned size);
138 void fcfree (void *ptr);
141 # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
142 # define fcfree(ptr) hfree(ptr)
146 # define fcalloc(items,size) calloc((items),(size))
148 # define fcalloc(items,size) malloc((size_t)(items)*(size_t)(size))
150 # define fcfree(ptr) free(ptr)
153 #if defined(VAXC) || defined(VMS)
154 # define PATH_SEP ']'
155 # define PATH_SEP2 ':'
156 # define SUFFIX_SEP ';'
157 # define NO_MULTIPLE_DOTS
158 # define NO_SIZE_CHECK
159 # define Z_SUFFIX "-gz"
161 # define casemap(c) tolow(c)
162 # define OS_CODE 0x02
163 # define OPTIONS_VAR "GZIP_OPT"
164 # define STDC_HEADERS
165 # define EXPAND(argc,argv) vms_expand_args(&argc,&argv);
167 # define unlink delete
174 # define PATH_SEP2 ':'
175 # define STDC_HEADERS
176 # define OS_CODE 0x01
182 # define NO_STDIN_FSTAT
183 # define HAVE_SYS_DIR_H
184 # include <fcntl.h> /* for read() and write() */
185 # define direct dirent
186 extern void _expand_args(int *argc, char ***argv);
187 # define EXPAND(argc,argv) _expand_args(&argc,&argv);
191 #if defined(ATARI) || defined(atarist)
193 # define OS_CODE 0x05
195 # define PATH_SEP2 '\\'
196 # define PATH_SEP3 ':'
197 # define MAX_PATH_LEN 128
198 # define NO_MULTIPLE_DOTS
199 # define MAX_EXT_CHARS 3
200 # define Z_SUFFIX "z"
201 # define casemap(c) tolow(c) /* Force file names to lower case */
206 # define PATH_SEP ':'
209 # define NO_STDIN_FSTAT
210 # define chmod(file, mode) (0)
211 # define OPEN(name, flags, mode) open(name, flags)
212 # define OS_CODE 0x07
214 # define isatty(fd) ((fd) <= 2)
219 # define OS_CODE 0x0a
227 /* Common defaults */
230 # define OS_CODE 0x03 /* assume Unix */
234 # define PATH_SEP '/'
238 # define casemap(c) (c)
242 # define OPTIONS_VAR "GZIP"
246 # define Z_SUFFIX ".gz"
250 # define MAX_SUFFIX MAX_EXT_CHARS
252 # define MAX_SUFFIX 30
255 #ifndef MAKE_LEGAL_NAME
256 # ifdef NO_MULTIPLE_DOTS
257 # define MAKE_LEGAL_NAME(name) make_simple_name(name)
259 # define MAKE_LEGAL_NAME(name)
265 /* keep at least MIN_PART chars between dots in a file name. */
269 # define EXPAND(argc,argv)
276 #ifndef SET_BINARY_MODE
277 # define SET_BINARY_MODE(fd)
281 # define OPEN(name, flags, mode) open_safer (name, flags, mode)