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
60 # define NO_SIZE_CHECK
61 # define UNLINK_READONLY_BUG
62 # define casemap(c) tolow(c) /* Force file names to lower case */
65 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
66 # if !defined(NO_ASM) && !defined(ASMV)
74 # define PATH_SEP2 '\\'
75 # define PATH_SEP3 ':'
76 # define MAX_PATH_LEN 260
78 # define NO_MULTIPLE_DOTS
79 # define MAX_EXT_CHARS 3
81 # define casemap(c) tolow(c)
84 # define UNLINK_READONLY_BUG
87 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
89 # define HAVE_SYS_UTIME_H
95 # define HAVE_SYS_UTIME_H
96 # define EXPAND(argc,argv) \
97 {_response(&argc, &argv); _wildcard(&argc, &argv);}
100 # define HAVE_UTIME_H
105 # define EXPAND(argc,argv) \
106 {response_expand(&argc, &argv);}
110 #ifdef WIN32 /* Windows NT */
111 # define HAVE_SYS_UTIME_H
112 # define PATH_SEP2 '\\'
113 # define PATH_SEP3 ':'
114 # define MAX_PATH_LEN 260
115 # define STDC_HEADERS
116 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
117 # define UNLINK_READONLY_BUG
121 # define NO_MULTIPLE_DOTS
122 # define MAX_EXT_CHARS 3
123 # define Z_SUFFIX "z"
124 # define casemap(c) tolow(c) /* Force file names to lower case */
126 # define OS_CODE 0x0b
133 /* Turbo C 2.0 does not accept static allocations of large arrays */
134 void * fcalloc (unsigned items
, unsigned size
);
135 void fcfree (void *ptr
);
138 # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
139 # define fcfree(ptr) hfree(ptr)
143 # define fcalloc(items,size) calloc((items),(size))
145 # define fcalloc(items,size) malloc((size_t)(items)*(size_t)(size))
147 # define fcfree(ptr) free(ptr)
150 #if defined(VAXC) || defined(VMS)
151 # define PATH_SEP ']'
152 # define PATH_SEP2 ':'
153 # define SUFFIX_SEP ';'
154 # define NO_MULTIPLE_DOTS
155 # define NO_SIZE_CHECK
156 # define Z_SUFFIX "-gz"
158 # define casemap(c) tolow(c)
159 # define OS_CODE 0x02
160 # define OPTIONS_VAR "GZIP_OPT"
161 # define STDC_HEADERS
162 # define EXPAND(argc,argv) vms_expand_args(&argc,&argv);
164 # define unlink delete
171 # define PATH_SEP2 ':'
172 # define STDC_HEADERS
173 # define OS_CODE 0x01
179 # define HAVE_SYS_DIR_H
180 # include <fcntl.h> /* for read() and write() */
181 # define direct dirent
182 extern void _expand_args(int *argc
, char ***argv
);
183 # define EXPAND(argc,argv) _expand_args(&argc,&argv);
187 #if defined(ATARI) || defined(atarist)
189 # define OS_CODE 0x05
191 # define PATH_SEP2 '\\'
192 # define PATH_SEP3 ':'
193 # define MAX_PATH_LEN 128
194 # define NO_MULTIPLE_DOTS
195 # define MAX_EXT_CHARS 3
196 # define Z_SUFFIX "z"
197 # define casemap(c) tolow(c) /* Force file names to lower case */
202 # define OS_CODE 0x0a
210 /* Common defaults */
213 # define OS_CODE 0x03 /* assume Unix */
217 # define PATH_SEP '/'
221 # define casemap(c) (c)
225 # define OPTIONS_VAR "GZIP"
229 # define Z_SUFFIX ".gz"
233 # define MAX_SUFFIX MAX_EXT_CHARS
235 # define MAX_SUFFIX 30
238 #ifndef MAKE_LEGAL_NAME
239 # ifdef NO_MULTIPLE_DOTS
240 # define MAKE_LEGAL_NAME(name) make_simple_name(name)
242 # define MAKE_LEGAL_NAME(name)
248 /* keep at least MIN_PART chars between dots in a file name. */
252 # define EXPAND(argc,argv)
259 #ifndef SET_BINARY_MODE
260 # define SET_BINARY_MODE(fd)