Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/msdos/doscfg.h  view on Meta::CPAN

#if (defined(M_I86CM) || defined(M_I86LM)) || defined(WINDLL)
#  define MED_MEM
#endif
#if (defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__))
#  define MED_MEM
#endif
#ifdef __16BIT__
#  ifndef MED_MEM
#    define SMALL_MEM
#  endif
#endif

#define EXE_EXTENSION ".exe"  /* OS/2 has GetLoadPath() function instead */

#ifdef __16BIT__
#  if defined(MSC) || defined(__WATCOMC__)
#    include <malloc.h>
#    define nearmalloc _nmalloc
#    define nearfree _nfree
#  endif
#  if defined(__TURBOC__) && defined(DYNALLOC_CRCTAB)
#    if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)
#      undef DYNALLOC_CRCTAB
#    endif
#  endif
#  ifndef nearmalloc
#    define nearmalloc malloc
#    define nearfree free
#  endif
#  if defined(DEBUG) && defined(MSC) && (!defined(_MSC_VER) || _MSC_VER < 600)
     /* for MSC 5.1, prevent macro expansion space overflow in DEBUG mode */
#    define NO_DEBUG_IN_MACROS
#  endif
#  ifdef USE_DEFLATE64
#    if (defined(M_I86TM) || defined(M_I86SM) || defined(M_I86MM))
#      error Deflate64(tm) requires compact or large memory model
#    endif
#    if (defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__))
#      error Deflate64(tm) requires compact or large memory model
#    endif
     /* the 64k history buffer for Deflate64 must be allocated specially */
#    define MALLOC_WORK
#    define MY_ZCALLOC
#  endif
#endif

/* 32-bit MSDOS supports the 32-bit optimized CRC-32 C code */
#ifdef IZ_CRC_BE_OPTIMIZ
# undef IZ_CRC_BE_OPTIMIZ
#endif
#ifdef __32BIT__
# if !defined(IZ_CRC_LE_OPTIMIZ) && !defined(NO_CRC_OPTIMIZ)
#  define IZ_CRC_LE_OPTIMIZ
# endif
#else /* __16BIT__ does not support optimized C crc32 code */
# ifdef IZ_CRC_LE_OPTIMIZ
#  undef IZ_CRC_LE_OPTIMIZ
# endif
#endif

/* another stat()/fopen() bug with some 16-bit compilers on Novell drives;
 * very dangerous (silently overwrites executables in other directories)
 */
#define NOVELL_BUG_WORKAROUND

/* enables additional test and message code that directs UnZip to fail safely
 * in case the "workaround" enabled above does not work as intended
 */
#define NOVELL_BUG_FAILSAFE

/* Some implementations of stat() tend to fail on "." in root directories
 * or on remote (root) directories specified by an UNC network path. This
 * patch of stat() is useful for at least the WATCOM compilers. The
 * stat_bandaid() wrapper detects stat failures on root directories and
 * fills in suitable values.
 */
#ifdef DOS_STAT_BANDAID
#  ifdef SSTAT
#    undef SSTAT
#  endif
#  ifdef WILD_STAT_BUG
#    define SSTAT(path,pbuf) (iswild(path) || stat_bandaid(path,pbuf))
#  else
#    define SSTAT stat_bandaid
#  endif
   int stat_bandaid(const char *path, struct stat *buf);
#endif

/* the TIMESTAMP feature is now supported on MSDOS, enable it per default */
#if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
#  define TIMESTAMP
#endif

/* check that TZ environment variable is defined before using UTC times */
#if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ))
#  define IZ_CHECK_TZ
#endif

/* The optional "long filename" support available with some MSDOS compiler
 * environments running under VFAT systems (Win95) is controlled with the
 * help of the two preprocessor symbols USE_VFAT and USE_LFN:
 *  - USE_VFAT is a compile time switch that selects the long filename
 *             semantics in mapname()
 *  - USE_LFN  is a macro equating to a boolean expression indicating
 *             whether long filenames are supported. If available, this
 *             macro should make use of a runtime function checking the
 *             LFN support.
 *
 * The code in msdos.c distinguishes three cases:
 * 1.) USE_VFAT is not defined:
 *     No support of LFN is included; filenames are mapped to 8+3 plain FAT
 *     syntax unconditionally.
 *     This is achieved by ``#define MAYBE_PLAIN_FAT'' to include the plain
 *     FAT name mapping code and by ``#undef USE_LFN'' to disable bypassing
 *     of the FAT mapping at runtime.
 * 2.) USE_VFAT is defined:
 *     Support for LFN is enabled.
 *  a) USE_LFN is undefined:
 *     There is no (runtime) check available to distinguish between OS
 *     environments that support VFAT extensions and those that do not.
 *     In this case, filenames are mapped to the more liberal VFAT LFN
 *     syntax unconditionally. The internal switch MAYBE_PLAIN_FAT remains
 *     undefined to exclude to "map to plain FAT" code parts.
 *  b) USE_LFN is defined (hopefully to a boolean runtime LFN check function):
 *     "#define MAYBE_PLAIN_FAT" is applied to include the plain FAT mapping
 *     code; the programs checks at runtime whether the OS supports LFN and
 *     uses the appropiate mapping syntax.
 */
/* Some environments, like DJGPP v2, can support long filenames on VFAT
 * systems and DOS 8.3 filenames on FAT systems in the same executable.  If
 * such support is available, USE_LFN should be defined to an expression
 * that will return non-zero when long filenames API should be used, zero
 * otherwise.



( run in 3.249 seconds using v1.01-cache-2.11-cpan-2e0ccfb7a10 )