# Generated by h2py from /usr/include/fcntl.h

# Included from sys/types.h

# Included from machine/types.h

# Included from powerpc/types.h

# Included from sys/cdefs.h

# Included from machine/cdefs.h

# Included from powerpc/cdefs.h
def __P(protos): return protos		 

def __STRING(x): return #x

def __P(protos): return ()		 

def __STRING(x): return "x"

def __attribute__(x): return  

def __predict_true(exp): return __builtin_expect(((exp) != 0), 1)

def __predict_false(exp): return __builtin_expect(((exp) != 0), 0)

def __predict_true(exp): return ((exp) != 0)

def __predict_false(exp): return ((exp) != 0)


# Included from machine/ansi.h

# Included from powerpc/ansi.h
_BSD_PTRDIFF_T_ = int
_BSD_SSIZE_T_ = int
_BSD_TIME_T_ = int
_BSD_CLOCKID_T_ = int
_BSD_TIMER_T_ = int
_BSD_WCHAR_T_ = int
_BSD_WINT_T_ = int
_BSD_RUNE_T_ = int

# Included from machine/endian.h

# Included from powerpc/endian.h

# Included from sys/endian.h
LITTLE_ENDIAN = 1234
BIG_ENDIAN = 4321
PDP_ENDIAN = 3412
def __swap16gen(x): return \

def __swap32gen(x): return \

def __swap64gen(x): return \

swap16 = __swap16gen
swap32 = __swap32gen
swap64 = __swap64gen
_QUAD_HIGHWORD = 1
_QUAD_LOWWORD = 0
htobe16 = swap16
htobe32 = swap32
htobe64 = swap64
betoh16 = swap16
betoh32 = swap32
betoh64 = swap64
def htole16(x): return (x)

def htole32(x): return (x)

def htole64(x): return (x)

def letoh16(x): return (x)

def letoh32(x): return (x)

def letoh64(x): return (x)

_QUAD_HIGHWORD = 0
_QUAD_LOWWORD = 1
htole16 = swap16
htole32 = swap32
htole64 = swap64
letoh16 = swap16
letoh32 = swap32
letoh64 = swap64
def htobe16(x): return (x)

def htobe32(x): return (x)

def htobe64(x): return (x)

def betoh16(x): return (x)

def betoh32(x): return (x)

def betoh64(x): return (x)

htons = htobe16
htonl = htobe32
ntohs = betoh16
ntohl = betoh32
def major(x): return ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))

def minor(x): return ((int32_t)((x) & 0xff) | (((x) & 0xffff0000) >> 8))

NBBY = 8
FD_SETSIZE = 1024
def FD_ZERO(p): return bzero(p, sizeof(*(p)))

def FD_ZERO(p): return memset(p, 0, sizeof(*(p)))

O_RDONLY = 0x0000
O_WRONLY = 0x0001
O_RDWR = 0x0002
O_ACCMODE = 0x0003
FREAD = 0x0001
FWRITE = 0x0002
O_NONBLOCK = 0x0004
O_APPEND = 0x0008
O_SHLOCK = 0x0010
O_EXLOCK = 0x0020
O_ASYNC = 0x0040
O_NOFOLLOW = 0x0100
O_SYNC = 0x0080
O_CREAT = 0x0200
O_TRUNC = 0x0400
O_EXCL = 0x0800
FMARK = 0x1000
FDEFER = 0x2000
FHASLOCK = 0x4000
O_DSYNC = O_SYNC
O_RSYNC = O_SYNC
O_NOCTTY = 0x8000
def FFLAGS(oflags): return (((oflags) & ~O_ACCMODE) | (((oflags) + 1) & O_ACCMODE))

def OFLAGS(fflags): return (((fflags) & ~O_ACCMODE) | (((fflags) - 1) & O_ACCMODE))

FAPPEND = O_APPEND
FASYNC = O_ASYNC
FFSYNC = O_SYNC
FNONBLOCK = O_NONBLOCK
FNDELAY = O_NONBLOCK
O_NDELAY = O_NONBLOCK
F_DUPFD = 0
F_GETFD = 1
F_SETFD = 2
F_GETFL = 3
F_SETFL = 4
F_GETOWN = 5
F_SETOWN = 6
F_GETLK = 7
F_SETLK = 8
F_SETLKW = 9
FD_CLOEXEC = 1
F_RDLCK = 1
F_UNLCK = 2
F_WRLCK = 3
F_WAIT = 0x010
F_FLOCK = 0x020
F_POSIX = 0x040
LOCK_SH = 0x01
LOCK_EX = 0x02
LOCK_NB = 0x04
LOCK_UN = 0x08
