1/* 2 win32/zipup.h - Zip 3 3 4 Copyright (c) 1990-2007 Info-ZIP. All rights reserved. 5 6 See the accompanying file LICENSE, version 2007-Mar-4 or later 7 (the contents of which are also included in zip.h) for terms of use. 8 If, for some reason, all these files are missing, the Info-ZIP license 9 also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 10*/ 11#ifndef __CYGWIN__ 12# include <share.h> 13#endif 14#ifndef O_RDONLY 15# define O_RDONLY 0 16#endif 17#ifndef O_BINARY 18# define O_BINARY 0 19#endif 20#if (defined(_SH_DENYNO) && !defined(SH_DENYNO)) 21# define SH_DENYNO _SH_DENYNO 22#endif 23#if (defined(SH_DENYNO) && !defined(_SH_DENYNO)) 24# define _SH_DENYNO SH_DENYNO 25#endif 26#define fhow (O_RDONLY|O_BINARY) 27#define fbad (-1) 28typedef int ftype; 29 30#if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__EMX__) 31# define zopen(n,p) sopen(n,p,SH_DENYNO) 32#elif defined(__CYGWIN__) || defined(__IBMC__) 33# define zopen(n,p) open(n,p) 34#else 35# define zopen(n,p) _sopen(n,p,_SH_DENYNO) 36#endif 37#ifdef UNICODE_SUPPORT 38# if defined(__CYGWIN__) || defined(__IBMC__) 39# define zwopen(n,p) wopen(n,p) 40# else 41# define zwopen(n,p) _wsopen(n,p,_SH_DENYNO) 42# endif 43#endif 44 45#define zread(f,b,n) read(f,b,n) 46#define zclose(f) close(f) 47#define zerr(f) (k == (extent)(-1L)) 48#define zstdin 0 49