zipup.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. win32/zipup.h - Zip 3
  3. Copyright (c) 1990-2007 Info-ZIP. All rights reserved.
  4. See the accompanying file LICENSE, version 2007-Mar-4 or later
  5. (the contents of which are also included in zip.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. #ifndef __CYGWIN__
  10. # include <share.h>
  11. #endif
  12. #ifndef O_RDONLY
  13. # define O_RDONLY 0
  14. #endif
  15. #ifndef O_BINARY
  16. # define O_BINARY 0
  17. #endif
  18. #if (defined(_SH_DENYNO) && !defined(SH_DENYNO))
  19. # define SH_DENYNO _SH_DENYNO
  20. #endif
  21. #if (defined(SH_DENYNO) && !defined(_SH_DENYNO))
  22. # define _SH_DENYNO SH_DENYNO
  23. #endif
  24. #define fhow (O_RDONLY|O_BINARY)
  25. #define fbad (-1)
  26. typedef int ftype;
  27. #if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__EMX__)
  28. # define zopen(n,p) sopen(n,p,SH_DENYNO)
  29. #elif defined(__CYGWIN__) || defined(__IBMC__)
  30. # define zopen(n,p) open(n,p)
  31. #else
  32. # define zopen(n,p) _sopen(n,p,_SH_DENYNO)
  33. #endif
  34. #ifdef UNICODE_SUPPORT
  35. # if defined(__CYGWIN__) || defined(__IBMC__)
  36. # define zwopen(n,p) wopen(n,p)
  37. # else
  38. # define zwopen(n,p) _wsopen(n,p,_SH_DENYNO)
  39. # endif
  40. #endif
  41. #define zread(f,b,n) read(f,b,n)
  42. #define zclose(f) close(f)
  43. #define zerr(f) (k == (extent)(-1L))
  44. #define zstdin 0