1 /* tailor.h -- target dependent definitions
3 Copyright (C) 1997-1999, 2002, 2006, 2009-2024 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, see <https://www.gnu.org/licenses/>. */
20 /* The target dependent definitions should be defined here only.
21 * The target dependent functions should be defined in tailor.c.
24 #if defined(__MSDOS__) && !defined(MSDOS)
28 #if defined(__OS2__) && !defined(OS2)
32 #if defined(OS2) && defined(MSDOS) /* MS C under OS/2 */
38 /* DJGPP version 1.09+ on MS-DOS.
39 * The DJGPP 1.09 stat() function must be upgraded before gzip will
48 # define HAVE_SYS_UTIME_H
51 # define MAX_PATH_LEN 128
52 # define NO_MULTIPLE_DOTS
53 # define MAX_EXT_CHARS 3
55 # define NO_SIZE_CHECK
56 # define UNLINK_READONLY_BUG
57 # define casemap(c) tolow(c) /* Force file names to lower case */
60 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
61 # if !defined(NO_ASM) && !defined(ASMV)
69 # define MAX_PATH_LEN 260
71 # define NO_MULTIPLE_DOTS
72 # define MAX_EXT_CHARS 3
74 # define casemap(c) tolow(c)
76 # define UNLINK_READONLY_BUG
79 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
81 # define HAVE_SYS_UTIME_H
87 # define HAVE_SYS_UTIME_H
88 # define EXPAND(argc,argv) \
89 {_response(&argc, &argv); _wildcard(&argc, &argv);}
94 # define EXPAND(argc,argv) \
95 {response_expand(&argc, &argv);}
99 #if defined WIN32 || defined _WIN32
100 # define HAVE_SYS_UTIME_H
101 # define MAX_PATH_LEN 260
102 # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
103 # define UNLINK_READONLY_BUG
107 # define NO_MULTIPLE_DOTS
108 # define MAX_EXT_CHARS 3
109 # define Z_SUFFIX "z"
110 # define casemap(c) tolow(c) /* Force file names to lower case */
112 # define OS_CODE 0x0b
119 /* Turbo C 2.0 does not accept static allocations of large arrays */
120 void * fcalloc (unsigned items
, unsigned size
);
121 void fcfree (void *ptr
);
124 # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
125 # define fcfree(ptr) hfree(ptr)
129 # define fcalloc(items,size) calloc((items),(size))
131 # define fcalloc(items,size) malloc((size_t)(items)*(size_t)(size))
133 # define fcfree(ptr) free(ptr)
136 #if defined(ATARI) || defined(atarist)
137 # define OS_CODE 0x05
139 # define MAX_PATH_LEN 128
140 # define NO_MULTIPLE_DOTS
141 # define MAX_EXT_CHARS 3
142 # define Z_SUFFIX "z"
143 # define casemap(c) tolow(c) /* Force file names to lower case */
148 # define OS_CODE 0x0a
156 /* Common defaults */
159 # define OS_CODE 0x03 /* assume Unix */
163 # define casemap(c) (c)
167 # define OPTIONS_VAR "GZIP"
171 # define Z_SUFFIX ".gz"
175 # define MAX_SUFFIX MAX_EXT_CHARS
177 # define MAX_SUFFIX 30
180 #ifndef MAKE_LEGAL_NAME
181 # ifdef NO_MULTIPLE_DOTS
182 # define MAKE_LEGAL_NAME(name) make_simple_name(name)
184 # define MAKE_LEGAL_NAME(name)
190 /* keep at least MIN_PART chars between dots in a file name. */
194 # define EXPAND(argc,argv)
197 #ifndef SET_BINARY_MODE
198 # define SET_BINARY_MODE(fd)
203 # define FALLTHROUGH ((void) 0)
205 # define FALLTHROUGH __attribute__ ((__fallthrough__))