home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / compress / gnuzip_.zip / TAILOR.H < prev    next >
C/C++ Source or Header  |  1993-03-28  |  3KB  |  149 lines

  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.10 1993/02/11 09:47:02 jloup Exp $ */
  12.  
  13. #if defined(__MSDOS__) && !defined(MSDOS)
  14. #  define MSDOS
  15. #endif
  16.  
  17. #ifdef MSDOS
  18. #  define MAXSEG_64K
  19. #  define PATH_SEP '\\'
  20. #  define OTHER_PATH_SEP ':'
  21. #  define MAX_PATH_LEN  128
  22. #  define NO_MULTIPLE_DOTS
  23. #  define NO_CHOWN
  24. #  define PROTO
  25. #  define STDC_HEADERS
  26. #  define NO_SIZE_CHECK
  27. #  define casemap(c) tolow(c) /* Force file names to lower case */
  28. #  include <io.h>
  29. #  define OS_CODE  0x000
  30. #else
  31. #  define near
  32. #endif
  33.  
  34. #ifdef OS2
  35. #  define PATH_SEP '\\'
  36. #  define OTHER_PATH_SEP ':'
  37. #  define NO_CHOWN
  38. #  define PROTO
  39. #  define STDC_HEADERS
  40. #  define HAVE_SYS_UTIME_H
  41. #  define DIRENT
  42. #  define casemap(c) tolow(c)
  43. #  include <io.h>
  44. #  define OS_CODE  0x600
  45. #endif
  46.  
  47. #ifndef MAXSEG_64K
  48. #  define fcalloc(items,size) malloc((unsigned)(items)*(unsigned)(size))
  49. #  define fcfree(ptr) free(ptr)
  50. #else
  51. #  ifdef __TURBOC__
  52. #    include <alloc.h>
  53. #    define NO_UTIME
  54. #    define DYN_ALLOC
  55.      /* Turbo C 2.0 does not accept static allocations of large arrays */
  56.      void * fcalloc (unsigned items, unsigned size);
  57.      void fcfree (void *ptr);
  58. #  else /* MSC */
  59. #    define HAVE_SYS_UTIME_H
  60. #    include <malloc.h>
  61. #    define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize))
  62. #    define fcfree(ptr) hfree(ptr)
  63. #  endif
  64. #endif
  65.  
  66. #ifdef VMS
  67. #  define PATH_SEP ']'
  68. #  define OTHER_PATH_SEP ':'
  69. #  define NO_MULTIPLE_DOTS
  70. #  define NO_FCNTL_H
  71. #  define RECORD_IO 1
  72. #  define casemap(c) tolow(c)
  73. #  define unlink delete
  74. #  include <file.h>
  75. #  include <unixio.h>
  76. #  define OS_CODE  0x200
  77. #endif
  78.  
  79. #ifdef AMIGA
  80. #  define NO_STDIN_FSTAT
  81. #  define OTHER_PATH_SEP ':'
  82. #  define SYSDIR
  83. #  define STDC_HEADERS
  84. #  define HAVE_STRING_H
  85. #  define NO_SYMLINK
  86. #  define NO_UTIME
  87. #  define NO_CHOWN
  88. #  define direct dirent
  89.    extern void _expand_args(int *argc, char ***argv);
  90. #  define EXPAND(argc,argv) _expand_args(&argc,&argv);
  91. #  define OS_CODE  0x100
  92. #endif
  93.  
  94. #ifdef ATARI_ST
  95. #  define OS_CODE  0x500
  96. #endif
  97.  
  98. #ifdef MACOS
  99. #  define OS_CODE  0x700
  100. #endif
  101.  
  102. #ifdef WIN32
  103. #  define OS_CODE  0xb00
  104. #endif
  105.  
  106. #ifdef TOPS20
  107. #  define OS_CODE  0xa00
  108. #endif
  109.  
  110. #ifndef OS_CODE
  111. #  define OS_CODE  0x300  /* assume Unix */
  112. #endif
  113.  
  114. #ifndef PATH_SEP
  115. #  define PATH_SEP '/'
  116. #endif
  117.  
  118. #ifndef casemap
  119. #  define casemap(c) (c)
  120. #endif
  121.  
  122. /* Wild card expansion */
  123. #ifdef __EMX__
  124. #  define EXPAND(argc,argv) {_response(&argc, &argv); _wildcard(&argc, &argv);}
  125. #endif
  126.  
  127. #ifndef EXPAND
  128. #  define EXPAND(argc,argv)
  129. #endif
  130.  
  131. /* Force binary mode on open file */
  132. #if defined(MSDOS) || defined(OS2)
  133. #  define SET_BINARY_MODE(fd) setmode(fd, O_BINARY)
  134. #else
  135. #  define SET_BINARY_MODE(fd)
  136. #endif
  137.  
  138. #ifndef RECORD_IO
  139. #  define RECORD_IO 0
  140. #endif
  141.  
  142. /* Use ASM code by default on MSDOS */
  143. #if defined(MSDOS) && !defined(NO_ASM) && !defined(ASMV)
  144. #  define ASMV
  145. #endif
  146. #if defined(ASMV) && !defined(MSDOS) && defined(DYN_ALLOC)
  147.   error: DYN_ALLOC not yet supported in match.s
  148. #endif
  149.