|
|
Jump to this file's LXR Page |
|
|
File: [CENS] / emstar / fusd / include / cygwin_compat.h
(download)
/
(as text)
Revision: 1.3, Tue Feb 7 02:16:11 2006 UTC (3 years, 9 months ago) by jelson Branch: MAIN CVS Tags: pregeonet, acoustic-05-18-06, PRE_TOSNIC_FIX, PRE_64BIT, HEAD, ESS_CENTROUTE_TESTING, CYCLOPS_RELEASE_CANDIDATE_2_0, CYCLOPS_PRERELEASE_STABLE, CENTROUTE_EMSTAR_SOCKETS, BG_1_0, AMARSS_JR_DEPLOYMENT_6_05_07 Changes since 1.2: +9 -4 lines updates to cygwin compatibility |
/* * * Copyright (c) 2003 The Regents of the University of California. All * rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Neither the name of the University nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* $Id: cygwin_compat.h,v 1.3 2006/02/07 02:16:11 jelson Exp $ */ #if defined(__CYGWIN__) && !defined(__CYGWIN_COMPAT_H__) #define __CYGWIN_COMPAT_H__ #include <stdint.h> typedef long long int loff_t; #define uint32_t __uint32_t #define int32_t __int32_t //typedef __uint32_t uint32_t #define __STRING(expr) #expr /* ioctl stuff */ #ifndef IOCPARM_MASK #define IOCPARM_MASK 0x7f #define IOC_VOID 0x20000000 #define IOC_OUT 0x40000000 #define IOC_IN 0x80000000 #define IOC_INOUT (IOC_IN|IOC_OUT) #endif /* IOCPARM_MASK */ #ifndef _IO #define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) #define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) #define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) #define _IOWR(x,y,t) (IOC_INOUT|(((long)sizeof(t)&IOCPARM_MASK)<<16|(x<<8)|y)) #endif /* _IO */ // _IOC(x, y, t) is _IOC(type, nr, size) #ifndef _IOC_READ #define _IOC_READ IOC_IN #define _IOC_WRITE IOC_OUT #endif /* _IOC_READ */ #ifndef _IOC_DIR #define _IOC_DIR(t) ((t) & (IOC_VOID|IOC_OUT|IOC_IN)) #define _IOC_TYPE(x) (((x) >> 8) & 0xff) #define _IOC_NR(y) ((y) & 0xff) #define _IOC_SIZE(t) (((t) >> 16) & IOCPARM_MASK) #endif /* _IOC_DIR */ #endif /* __CYGWIN_COMPAT_H__ */
| CENS CVS Mailing List |
Powered by ViewCVS 0.9.2 |