Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.   Copyright (c) 1990-2009 Info-ZIP.  All rights reserved.
  3.  
  4.   See the accompanying file LICENSE, version 2009-Jan-02 or later
  5.   (the contents of which are also included in unzip.h) for terms of use.
  6.   If, for some reason, all these files are missing, the Info-ZIP license
  7.   also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
  8. */
  9. /*---------------------------------------------------------------------------
  10.     OpenVMS specific configuration section (included by unzpriv.h):
  11.   ---------------------------------------------------------------------------*/
  12.  
  13. #ifndef __vmscfg_h   /* Prevent (unlikely) multiple inclusions. */
  14. #define __vmscfg_h
  15.  
  16. /* Workaround for broken header files of older DECC distributions
  17.  * that are incompatible with the /NAMES=AS_IS qualifier. */
  18. #define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR
  19.  
  20. /* LARGE FILE SUPPORT - 10/6/04 EG */
  21. /* This needs to be set before the includes so they set the right sizes */
  22.  
  23. #ifdef NO_LARGE_FILE_SUPPORT
  24. # ifdef LARGE_FILE_SUPPORT
  25. #  undef LARGE_FILE_SUPPORT
  26. # endif
  27. #endif
  28.  
  29. #ifdef LARGE_FILE_SUPPORT
  30.  
  31. # define _LARGEFILE             /* Define the pertinent macro. */
  32.  
  33. /* LARGE_FILE_SUPPORT implies ZIP64_SUPPORT,
  34.    unless explicitly disabled by NO_ZIP64_SUPPORT.
  35. */
  36. #  ifdef NO_ZIP64_SUPPORT
  37. #    ifdef ZIP64_SUPPORT
  38. #      undef ZIP64_SUPPORT
  39. #    endif
  40. #  else
  41. #    ifndef ZIP64_SUPPORT
  42. #      define ZIP64_SUPPORT
  43. #    endif
  44. #  endif
  45.  
  46. #endif /* def LARGE_FILE_SUPPORT */
  47.  
  48. /* 2007-02-22 SMS.
  49.  * Enable symbolic links according to the available C RTL support,
  50.  * unless prohibited by the user defining NO_SYMLINKS.
  51.  */
  52. #if !defined(__VAX) && defined(__CRTL_VER) && __CRTL_VER >= 70301000
  53. #  ifndef NO_SYMLINKS
  54. #     define SYMLINKS
  55. #  endif
  56. #endif
  57.  
  58. #ifdef SYMLINKS
  59. #  include <unistd.h>
  60. #endif
  61.  
  62. #  include <types.h>                    /* GRR:  experimenting... */
  63. #  include <stat.h>
  64. #  include <time.h>                     /* the usual non-BSD time functions */
  65. #  include <file.h>                     /* same things as fcntl.h has */
  66. #  include <unixio.h>
  67. #  include <rms.h>
  68.  
  69. /* Define maximum path length according to NAM[L] member size. */
  70. #  ifndef NAM_MAXRSS
  71. #    ifdef NAML$C_MAXRSS
  72. #      define NAM_MAXRSS NAML$C_MAXRSS
  73. #    else
  74. #      define NAM_MAXRSS NAM$C_MAXRSS
  75. #    endif
  76. #  endif
  77.  
  78. #  define _MAX_PATH (NAM_MAXRSS+1)      /* to define FILNAMSIZ below */
  79.  
  80. #  ifdef RETURN_CODES  /* VMS interprets standard PK return codes incorrectly */
  81. #    define RETURN(ret) return_VMS(__G__ (ret))   /* verbose version */
  82. #    define EXIT(ret)   return_VMS(__G__ (ret))
  83. #  else
  84. #    define RETURN      return_VMS                /* quiet version */
  85. #    define EXIT        return_VMS
  86. #  endif
  87. #  ifdef VMSCLI
  88. #    define USAGE(ret)  VMSCLI_usage(__G__ (ret))
  89. #  endif
  90. #  define DIR_BEG       '['
  91. #  define DIR_END       ']'
  92. #  define DIR_EXT       ".dir"
  93. #  ifndef UZ_FNFILTER_REPLACECHAR
  94.      /* We use '?' instead of the single char wildcard '%' as "unprintable
  95.       * charcode" placeholder, because '%' is valid for ODS-5 names but '?'
  96.       * is invalid. This choice may allow easier detection of "unprintables"
  97.       * when reading the fnfilter() output.
  98.       */
  99. #    define UZ_FNFILTER_REPLACECHAR  '?'
  100. #  endif
  101. #  ifndef DATE_FORMAT
  102. #    define DATE_FORMAT DF_MDY
  103. #  endif
  104. #  define lenEOL        1
  105. #  define PutNativeEOL  *q++ = native(LF);
  106. #  define SCREENSIZE(ttrows, ttcols)  screensize(ttrows, ttcols)
  107. #  define SCREENWIDTH   80
  108. #  define SCREENLWRAP   screenlinewrap()
  109. #  if (defined(__VMS_VERSION) && !defined(VMS_VERSION))
  110. #    define VMS_VERSION __VMS_VERSION
  111. #  endif
  112. #  if (defined(__VMS_VER) && !defined(__CRTL_VER))
  113. #    define __CRTL_VER __VMS_VER
  114. #  endif
  115. #  if ((!defined(__CRTL_VER)) || (__CRTL_VER < 70000000))
  116. #    define NO_GMTIME           /* gmtime() of earlier VMS C RTLs is broken */
  117. #  else
  118. #    if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
  119. #      define USE_EF_UT_TIME
  120. #    endif
  121. #    if (!defined(HAVE_STRNICMP) && !defined(NO_STRNICMP))
  122. #      define HAVE_STRNICMP
  123. #      ifdef STRNICMP
  124. #        undef STRNICMP
  125. #      endif
  126. #      define STRNICMP  strncasecmp
  127. #    endif
  128. #  endif
  129. #  ifndef HAVE_STRNICMP                 /* use our private zstrnicmp() */
  130. #    define NO_STRNICMP                 /*  unless explicitly overridden */
  131. #  endif
  132. #  if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
  133. #    define TIMESTAMP
  134. #  endif
  135. #  define SET_DIR_ATTRIB
  136. #  define RESTORE_UIDGID
  137.    /* VMS is run on little-endian processors with 4-byte ints:
  138.     * enable the optimized CRC-32 code */
  139. #  ifdef IZ_CRC_BE_OPTIMIZ
  140. #    undef IZ_CRC_BE_OPTIMIZ
  141. #  endif
  142. #  if !defined(IZ_CRC_LE_OPTIMIZ) && !defined(NO_CRC_OPTIMIZ)
  143. #    define IZ_CRC_LE_OPTIMIZ
  144. #  endif
  145. #  if !defined(IZ_CRCOPTIM_UNFOLDTBL) && !defined(NO_CRC_OPTIMIZ)
  146. #    define IZ_CRCOPTIM_UNFOLDTBL
  147. #  endif
  148.    /* Enable "better" unprintable charcodes filtering in fnfilter().
  149.     * (On VMS, the isprint() implementation seems to detect 8-bit printable
  150.     * characters even for the default "C" locale. A previous localization
  151.     * setup by calling setlocale() is not neccessary.) */
  152. #  if (!defined(NO_WORKING_ISPRINT) && !defined(HAVE_WORKING_ISPRINT))
  153. #    define HAVE_WORKING_ISPRINT
  154. #  endif
  155.  
  156. #ifdef NO_OFF_T
  157.   typedef long zoff_t;
  158. #else
  159.   typedef off_t zoff_t;
  160. #endif
  161. #define ZOFF_T_DEFINED
  162.  
  163. typedef struct stat z_stat;
  164. #define Z_STAT_DEFINED
  165.  
  166.  
  167. #ifdef __DECC
  168.  
  169.     /* File open callback ID values. */
  170. #   define OPENR_ID 1
  171.  
  172.     /* File open callback ID storage. */
  173.     extern int openr_id;
  174.  
  175.     /* File open callback function. */
  176.     extern int acc_cb();
  177.  
  178.     /* Option macros for open().
  179.      * General: Stream access
  180.      *
  181.      * Callback function (DEC C only) sets deq, mbc, mbf, rah, wbh, ...
  182.      */
  183. #   define OPNZIP_RMS_ARGS "ctx=stm", "acc", acc_cb, &openr_id
  184.  
  185. #else /* !__DECC */ /* (So, GNU C, VAX C, ...)*/
  186.  
  187. #   define OPNZIP_RMS_ARGS "ctx=stm"
  188.  
  189. #endif /* ?__DECC */
  190.  
  191. #endif /* !__vmscfg_h */
  192.