1 /* tailor.h -- target dependent definitions
3 Copyright (C) 1997-1999, 2002, 2006, 2009-2019 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
49 # define HAVE_SYS_UTIME_H
52 # define MAX_PATH_LEN 128
53 # define NO_MULTIPLE_DOTS
54 # define MAX_EXT_CHARS 3
56 # define NO_SIZE_CHECK
57 # define UNLINK_READONLY_BUG
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 MAX_PATH_LEN 260
72 # define NO_MULTIPLE_DOTS
73 # define MAX_EXT_CHARS 3
75 # define casemap(c) tolow(c)
77 # define UNLINK_READONLY_BUG
80 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
82 # define HAVE_SYS_UTIME_H
88 # define HAVE_SYS_UTIME_H
89 # define EXPAND(argc,argv) \
90 {_response(&argc, &argv); _wildcard(&argc, &argv);}
95 # define EXPAND(argc,argv) \
96 {response_expand(&argc, &argv);}
100 #if defined WIN32 || defined _WIN32
101 # define HAVE_SYS_UTIME_H
102 # define MAX_PATH_LEN 260
103 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
104 # define UNLINK_READONLY_BUG
108 # define NO_MULTIPLE_DOTS
109 # define MAX_EXT_CHARS 3
110 # define Z_SUFFIX "z"
111 # define casemap(c) tolow(c) /* Force file names to lower case */
113 # define OS_CODE 0x0b
120 /* Turbo C 2.0 does not accept static allocations of large arrays */
121 void * fcalloc (unsigned items
, unsigned size
);
122 void fcfree (void *ptr
);
125 # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
126 # define fcfree(ptr) hfree(ptr)
130 # define fcalloc(items,size) calloc((items),(size))
132 # define fcalloc(items,size) malloc((size_t)(items)*(size_t)(size))
134 # define fcfree(ptr) free(ptr)
137 #if defined(ATARI) || defined(atarist)
138 # define OS_CODE 0x05
140 # define MAX_PATH_LEN 128
141 # define NO_MULTIPLE_DOTS
142 # define MAX_EXT_CHARS 3
143 # define Z_SUFFIX "z"
144 # define casemap(c) tolow(c) /* Force file names to lower case */
149 # define OS_CODE 0x0a
157 /* Common defaults */
160 # define OS_CODE 0x03 /* assume Unix */
164 # define casemap(c) (c)
168 # define OPTIONS_VAR "GZIP"
172 # define Z_SUFFIX ".gz"
176 # define MAX_SUFFIX MAX_EXT_CHARS
178 # define MAX_SUFFIX 30
181 #ifndef MAKE_LEGAL_NAME
182 # ifdef NO_MULTIPLE_DOTS
183 # define MAKE_LEGAL_NAME(name) make_simple_name(name)
185 # define MAKE_LEGAL_NAME(name)
191 /* keep at least MIN_PART chars between dots in a file name. */
195 # define EXPAND(argc,argv)
198 #ifndef SET_BINARY_MODE
199 # define SET_BINARY_MODE(fd)
204 # define FALLTHROUGH ((void) 0)
206 # define FALLTHROUGH __attribute__ ((__fallthrough__))