1 /* tailor.h -- target dependent definitions
2 * Copyright (C) 1992-1993 Jean-loup Gailly.
3 * This is free software; you can redistribute it and/or modify it under the
4 * terms of the GNU General Public License, see the file COPYING.
7 /* The target dependent definitions should be defined here only.
8 * The target dependent functions should be defined in tailor.c.
11 /* $Id: tailor.h,v 0.18 1993/06/14 19:32:20 jloup Exp $ */
13 #if defined(__MSDOS__) && !defined(MSDOS)
17 #if defined(__OS2__) && !defined(OS2)
21 #if defined(OS2) && defined(MSDOS) /* MS C under OS/2 */
27 /* DJGPP version 1.09+ on MS-DOS.
28 * The DJGPP 1.09 stat() function must be upgraded before gzip will
30 * No need for DIRENT, since <unistd.h> defines POSIX_SOURCE which
44 # define HAVE_SYS_UTIME_H
48 # define PATH_SEP2 '\\'
49 # define PATH_SEP3 ':'
50 # define MAX_PATH_LEN 128
51 # define NO_MULTIPLE_DOTS
52 # define MAX_EXT_CHARS 3
57 # define NO_SIZE_CHECK
58 # define casemap(c) tolow(c) /* Force file names to lower case */
61 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
62 # if !defined(NO_ASM) && !defined(ASMV)
70 # define PATH_SEP2 '\\'
71 # define PATH_SEP3 ':'
72 # define MAX_PATH_LEN 260
74 # define NO_MULTIPLE_DOTS
75 # define MAX_EXT_CHARS 3
77 # define casemap(c) tolow(c)
84 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
86 # define HAVE_SYS_UTIME_H
93 # define HAVE_SYS_UTIME_H
96 # define EXPAND(argc,argv) \
97 {_response(&argc, &argv); _wildcard(&argc, &argv);}
106 # define EXPAND(argc,argv) \
107 {response_expand(&argc, &argv);}
111 #ifdef WIN32 /* Windows NT */
112 # define HAVE_SYS_UTIME_H
114 # define PATH_SEP2 '\\'
115 # define PATH_SEP3 ':'
116 # define MAX_PATH_LEN 260
119 # define STDC_HEADERS
120 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
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 Z_SUFFIX "-gz"
160 # define casemap(c) tolow(c)
161 # define OS_CODE 0x02
162 # define OPTIONS_VAR "GZIP_OPT"
163 # define STDC_HEADERS
165 # define EXPAND(argc,argv) vms_expand_args(&argc,&argv);
167 # define unlink delete
175 # define PATH_SEP2 ':'
176 # define STDC_HEADERS
177 # define OS_CODE 0x01
181 # define HAVE_UNISTD_H
183 # define NO_STDIN_FSTAT
188 # include <fcntl.h> /* for read() and write() */
189 # define direct dirent
190 extern void _expand_args(int *argc
, char ***argv
);
191 # define EXPAND(argc,argv) _expand_args(&argc,&argv);
192 # undef O_BINARY /* disable useless --ascii option */
196 #if defined(ATARI) || defined(atarist)
197 # ifndef STDC_HEADERS
198 # define STDC_HEADERS
199 # define HAVE_UNISTD_H
203 # define OS_CODE 0x05
205 # define PATH_SEP2 '\\'
206 # define PATH_SEP3 ':'
207 # define MAX_PATH_LEN 128
208 # define NO_MULTIPLE_DOTS
209 # define MAX_EXT_CHARS 3
210 # define Z_SUFFIX "z"
212 # define casemap(c) tolow(c) /* Force file names to lower case */
218 # define PATH_SEP ':'
221 # define NO_STDIN_FSTAT
224 # define chmod(file, mode) (0)
225 # define OPEN(name, flags, mode) open(name, flags)
226 # define OS_CODE 0x07
228 # define isatty(fd) ((fd) <= 2)
232 #ifdef __50SERIES /* Prime/PRIMOS */
233 # define PATH_SEP '>'
234 # define STDC_HEADERS
239 # define NO_STDIN_FSTAT
240 # define NO_SIZE_CHECK
243 # define casemap(c) tolow(c) /* Force file names to lower case */
244 # define put_char(c) put_byte((c) & 0x7F)
245 # define get_char(c) ascii2pascii(get_byte())
246 # define OS_CODE 0x0F /* temporary, subject to change */
248 # undef SIGTERM /* We don't want a signal handler for SIGTERM */
252 #if defined(pyr) && !defined(NOMEMCPY) /* Pyramid */
253 # define NOMEMCPY /* problem with overlapping copies */
257 # define OS_CODE 0x0a
261 # define NO_ST_INO /* don't rely on inode numbers */
265 /* Common defaults */
268 # define OS_CODE 0x03 /* assume Unix */
272 # define PATH_SEP '/'
276 # define casemap(c) (c)
280 # define OPTIONS_VAR "GZIP"
284 # define Z_SUFFIX ".gz"
288 # define MAX_SUFFIX MAX_EXT_CHARS
290 # define MAX_SUFFIX 30
293 #ifndef MAKE_LEGAL_NAME
294 # ifdef NO_MULTIPLE_DOTS
295 # define MAKE_LEGAL_NAME(name) make_simple_name(name)
297 # define MAKE_LEGAL_NAME(name)
303 /* keep at least MIN_PART chars between dots in a file name. */
307 # define EXPAND(argc,argv)
314 #ifndef SET_BINARY_MODE
315 # define SET_BINARY_MODE(fd)
319 # define OPEN(name, flags, mode) open(name, flags, mode)
323 # define get_char() get_byte()
327 # define put_char(c) put_byte(c)