|
|
1.1 ! root 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. ! 5: */ ! 6: ! 7: /* The target dependent definitions should be defined here only. ! 8: * The target dependent functions should be defined in tailor.c. ! 9: */ ! 10: ! 11: /* $Id: tailor.h,v 0.11 1993/02/24 18:23:13 jloup Exp $ */ ! 12: ! 13: #if defined(__MSDOS__) && !defined(MSDOS) ! 14: # define MSDOS ! 15: #endif ! 16: ! 17: #ifdef MSDOS ! 18: # ifdef __GNUC__ ! 19: /* DJGPP version 1.09+ on MS-DOS. ! 20: * The DJGPP 1.09 stat() function must be upgraded before gzip will ! 21: * fully work. ! 22: * No need for DIRENT, since <unistd.h> defines POSIX_SOURCE which ! 23: * implies DIRENT. ! 24: */ ! 25: # define near ! 26: # else ! 27: # define MAXSEG_64K ! 28: # ifdef __TURBOC__ ! 29: # define NO_UTIME ! 30: # else /* MSC */ ! 31: # define HAVE_SYS_UTIME_H ! 32: # define NO_UTIME_H ! 33: # endif ! 34: # endif ! 35: # define PATH_SEP2 '\\' ! 36: # define PATH_SEP3 ':' ! 37: # define MAX_PATH_LEN 128 ! 38: # define NO_MULTIPLE_DOTS ! 39: # define MAX_EXT_CHARS 3 ! 40: # define Z_SUFFIX "z" ! 41: # define NO_CHOWN ! 42: # define PROTO ! 43: # define STDC_HEADERS ! 44: # define NO_SIZE_CHECK ! 45: # define casemap(c) tolow(c) /* Force file names to lower case */ ! 46: # include <io.h> ! 47: # define OS_CODE 0x00 ! 48: # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) ! 49: # if !defined(NO_ASM) && !defined(ASMV) ! 50: # define ASMV ! 51: # endif ! 52: #else ! 53: # define near ! 54: #endif ! 55: ! 56: #ifdef OS2 ! 57: # define PATH_SEP2 '\\' ! 58: # define PATH_SEP3 ':' ! 59: # define NO_MULTIPLE_DOTS ! 60: # define MAX_EXT_CHARS 3 ! 61: # define Z_SUFFIX "z" ! 62: # define NO_CHOWN ! 63: # define PROTO ! 64: # define STDC_HEADERS ! 65: # define HAVE_SYS_UTIME_H ! 66: # define NO_UTIME_H ! 67: # define DIRENT ! 68: # define casemap(c) tolow(c) ! 69: # include <io.h> ! 70: # define OS_CODE 0x06 ! 71: # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) ! 72: #endif ! 73: ! 74: #ifdef __EMX__ ! 75: # define EXPAND(argc,argv) {_response(&argc, &argv); _wildcard(&argc, &argv);} ! 76: #endif ! 77: ! 78: #ifndef MAXSEG_64K ! 79: # define fcalloc(items,size) malloc((unsigned)(items)*(unsigned)(size)) ! 80: # define fcfree(ptr) free(ptr) ! 81: #else ! 82: # ifdef __TURBOC__ ! 83: # include <alloc.h> ! 84: # define DYN_ALLOC ! 85: /* Turbo C 2.0 does not accept static allocations of large arrays */ ! 86: void * fcalloc (unsigned items, unsigned size); ! 87: void fcfree (void *ptr); ! 88: # else /* MSC */ ! 89: # include <malloc.h> ! 90: # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize)) ! 91: # define fcfree(ptr) hfree(ptr) ! 92: # endif ! 93: #endif ! 94: ! 95: #if defined(VAXC) || defined(VMS) ! 96: # define PATH_SEP ']' ! 97: # define PATH_SEP2 ':' ! 98: # define SUFFIX_SEP ';' ! 99: # define NO_MULTIPLE_DOTS ! 100: # define Z_SUFFIX "-z" ! 101: # define RECORD_IO 1 ! 102: # define casemap(c) tolow(c) ! 103: # define OS_CODE 0x02 ! 104: # define OPTIONS_VAR "GZIP_OPT" ! 105: # define STDC_HEADERS ! 106: # define NO_UTIME ! 107: # define FAB_RFM_VAR 2 ! 108: # define TEXT_MODE(stat) (stat.st_fab_rfm == FAB_RFM_VAR) ! 109: # define CREATE(name, textmode) (textmode ? \ ! 110: open((name), O_WRONLY|O_CREAT|O_EXCL|O_BINARY, RW_USER, "rfm=var") : \ ! 111: open((name), O_WRONLY|O_CREAT|O_EXCL|O_BINARY, RW_USER, "rfm=fix", "mrs=512")) ! 112: # ifdef VAXC ! 113: # define NO_FCNTL_H ! 114: # define unlink delete ! 115: # include <file.h> ! 116: # include <unixio.h> ! 117: # endif ! 118: #endif ! 119: ! 120: #ifdef AMIGA ! 121: # define PATH_SEP2 ':' ! 122: # define STDC_HEADERS ! 123: # define casemap(c) tolow(c) /* Force file names to lower case */ ! 124: # define OS_CODE 0x01 ! 125: # ifdef __GNUC__ ! 126: # define DIRENT ! 127: # define HAVE_UNISTD_H ! 128: # define RETSIGTYPE int ! 129: # ifdef mc68020 ! 130: # define ASMV ! 131: # endif ! 132: # else /* SASC */ ! 133: # define NO_STDIN_FSTAT ! 134: # define SYSDIR ! 135: # define NO_SYMLINK ! 136: # define NO_CHOWN ! 137: # define NO_FCNTL_H ! 138: # include <fcntl.h> /* for read() and write() */ ! 139: # define direct dirent ! 140: extern void _expand_args(int *argc, char ***argv); ! 141: # define EXPAND(argc,argv) _expand_args(&argc,&argv); ! 142: # endif ! 143: #endif ! 144: ! 145: #ifdef ATARI_ST ! 146: # define __STDC__ ! 147: # define STDC_HEADERS ! 148: # define HAVE_UNISTD_H ! 149: # define DIRENT ! 150: # define OS_CODE 0x05 ! 151: # ifdef TOSFS ! 152: # define NO_SYMLINK ! 153: # define NO_MULTIPLE_DOTS ! 154: # define MAX_EXT_CHARS=3 ! 155: # define Z_SUFFIX "z" ! 156: # define NO_CHOWN ! 157: # endif ! 158: #endif ! 159: ! 160: #ifdef MACOS ! 161: # define OS_CODE 0x07 ! 162: #endif ! 163: ! 164: #ifdef WIN32 ! 165: # define OS_CODE 0x0b ! 166: #endif ! 167: ! 168: #ifdef TOPS20 ! 169: # define OS_CODE 0x0a ! 170: #endif ! 171: ! 172: /* Common defaults */ ! 173: ! 174: #ifndef OS_CODE ! 175: # define OS_CODE 0x03 /* assume Unix */ ! 176: #endif ! 177: ! 178: #ifndef PATH_SEP ! 179: # define PATH_SEP '/' ! 180: #endif ! 181: ! 182: #ifndef casemap ! 183: # define casemap(c) (c) ! 184: #endif ! 185: ! 186: #ifndef OPTIONS_VAR ! 187: # define OPTIONS_VAR "GZIP" ! 188: #endif ! 189: ! 190: #ifndef Z_SUFFIX ! 191: # define Z_SUFFIX ".z" ! 192: #endif ! 193: #define Z_LEN strlen(Z_SUFFIX) ! 194: ! 195: #ifndef EXPAND ! 196: # define EXPAND(argc,argv) ! 197: #endif ! 198: ! 199: #ifndef RECORD_IO ! 200: # define RECORD_IO 0 ! 201: #endif ! 202: ! 203: #ifndef SET_BINARY_MODE ! 204: # define SET_BINARY_MODE(fd) ! 205: #endif ! 206: ! 207: #ifndef CREATE ! 208: # define CREATE(name, textmode) \ ! 209: open((name), O_WRONLY|O_CREAT|O_EXCL|O_BINARY, RW_USER) ! 210: #endif ! 211: ! 212: #ifndef TEXT_MODE ! 213: # define TEXT_MODE(stat) 0 ! 214: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.