home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip22.zip / amiga / osdep.h < prev    next >
C/C++ Source or Header  |  1997-10-01  |  3KB  |  98 lines

  1. /*
  2.  
  3.  Copyright (C) 1990-1996 Mark Adler, Richard B. Wales, Jean-loup Gailly,
  4.  Kai Uwe Rommel, Onno van der Linden, Igor Mandrichenko, Paul Kienitz and
  5.  John Bush.
  6.  Permission is granted to any individual or institution to use, copy, or
  7.  redistribute this software so long as all of the original files are included,
  8.  that it is not sold for profit, and that this copyright notice is retained.
  9.  
  10. */
  11.  
  12. /* default to MEDIUM_MEM, but allow makefile override */
  13. #if ( (!defined(BIG_MEM)) && (!defined(SMALL_MEM)))
  14. #  define MEDIUM_MEM
  15. #endif
  16.  
  17. #define USE_CASE_MAP
  18. #define USE_EF_UT_TIME
  19. #define HANDLE_AMIGA_SFX
  20. #define PROCNAME(n) (action == ADD || action == UPDATE ? wild(n) : procname(n))
  21. #define EXIT(e) ClearIOErr_exit(e)
  22. void ClearIOErr_exit(int e);
  23.  
  24. #ifdef __SASC
  25. #  include <sys/types.h>
  26. #  include <sys/stat.h>
  27. #  include <exec/execbase.h>
  28. #  if (defined(_M68020) && (!defined(__USE_SYSBASE)))
  29.                             /* on 68020 or higher processors it is faster   */
  30. #    define __USE_SYSBASE   /* to use the pragma libcall instead of syscall */
  31. #  endif                    /* to access functions of the exec.library      */
  32. #  include <proto/exec.h>   /* see SAS/C manual:part 2,chapter 2,pages 6-7  */
  33. #  include <proto/dos.h>
  34. #  if (defined(_M68020) && !defined(UNALIGNED_OK))
  35. #     define UNALIGNED_OK
  36. #  endif
  37. #  ifndef REENTRANT
  38. #    define REENTRANT
  39. #  endif
  40. #  if (defined(_NEAR_DATA) && !defined(DYN_ALLOC))
  41. #    define DYN_ALLOC
  42. #  endif
  43. #  ifdef DEBUG
  44. #    include <sprof.h>      /* profiler header file */
  45. #  endif
  46.    /* define USE_TIME_LIB if replacement functions of time_lib are available */
  47.    /* replaced are: tzset(), time(), localtime() and gmtime()                */
  48. #  define USE_TIME_LIB
  49.  
  50. /*
  51.  A word on short-integers and SAS/C (a bug of [mc]alloc?)
  52.  Using short integers (i.e. compiling with option SHORT-INTEGERS) is
  53.  *not* recommended. To get maximum compression ratio the window size stored
  54.  in WSIZE should be 32k (0x8000). However, since the size of the window[]
  55.  array is 2*WSIZE, 65536 bytes must be allocated. The calloc function can
  56.  only allocate UINT_MAX (defined in limits.h) bytes which is one byte short
  57.  (65535) of the maximum window size if you are compiling with short-ints.
  58.  You'll get an error message "Out of memory (window allocation)" whenever
  59.  you try to deflate. Note that the compiler won't produce any warning.
  60.  The maximum window size with short-integers is therefore 32768 bytes.
  61.  The following is only implemented to allow the use of short-integers but
  62.  it is once again not recommended because of a loss in compression ratio.
  63. */
  64. #  if (defined(_SHORTINT) && !defined(WSIZE))
  65. #    define WSIZE 0x4000        /* only half of maximum window size */
  66. #  endif                        /* possible with short-integers     */
  67. #endif /* __SASC */
  68.  
  69. #ifdef AZTEC_C
  70. #  define NO_UNISTD_H
  71. #  define NO_RMDIR
  72. #  define BROKEN_FSEEK
  73. #  define USE_TIME_LIB
  74. #  include "amiga/z-stat.h"
  75. #endif
  76.  
  77. #ifdef USE_TIME_LIB
  78. extern int real_timezone_is_set;
  79. #  define VALID_TIMEZONE(tempvar) (tzset(), real_timezone_is_set)
  80. #else
  81. #  define VALID_TIMEZONE(tempvar) ((tempvar = getenv("TZ")) && tempvar[0])
  82. #endif
  83.  
  84. #ifdef ZCRYPT_INTERNAL
  85. #  ifndef CLIB_EXEC_PROTOS_H
  86.      void *FindTask(void *);
  87. #  endif
  88. #  define ZCR_SEED2     (unsigned)(ulg)FindTask(NULL)
  89. #endif
  90.  
  91. char *GetComment(char *);
  92.  
  93. #define FOPR "rb"
  94. #define FOPM "rb+"
  95. #define FOPW "wb"
  96. /* prototype for ctrl-C trap function */
  97. void _abort(void);
  98.