Jeremy Hylton | 34bef26 | 2000-08-31 02:42:11 +0000 | [diff] [blame] | 1 | # Generated by h2py from /usr/include/fcntl.h |
| 2 | |
| 3 | # Included from sys/types.h |
| 4 | |
| 5 | # Included from sys/cdefs.h |
| 6 | def __P(protos): return protos |
| 7 | |
| 8 | def __STRING(x): return #x |
| 9 | |
| 10 | def __XSTRING(x): return __STRING(x) |
| 11 | |
| 12 | def __P(protos): return () |
| 13 | |
| 14 | def __STRING(x): return "x" |
| 15 | |
| 16 | def __RCSID(s): return __IDSTRING(rcsid,s) |
| 17 | |
| 18 | def __RCSID_SOURCE(s): return __IDSTRING(rcsid_source,s) |
| 19 | |
| 20 | def __COPYRIGHT(s): return __IDSTRING(copyright,s) |
| 21 | |
| 22 | |
| 23 | # Included from sys/inttypes.h |
| 24 | |
| 25 | # Included from machine/ansi.h |
| 26 | _BSD_CLOCKID_T_ = int |
| 27 | _BSD_PTRDIFF_T_ = int |
| 28 | _BSD_SSIZE_T_ = int |
| 29 | _BSD_TIME_T_ = long |
| 30 | _BSD_TIMER_T_ = int |
| 31 | _BSD_CT_RUNE_T_ = int |
| 32 | _BSD_PID_T_ = int |
| 33 | _BSD_CLK_TCK_ = 128 |
| 34 | _BSD_CLOCKS_PER_SEC_ = 128 |
| 35 | |
| 36 | # Included from machine/types.h |
| 37 | def major(x): return ((int)(((u_int)(x) >> 8)&0xff)) |
| 38 | |
| 39 | def minor(x): return ((int)((x)&0xffff00ff)) |
| 40 | |
| 41 | |
| 42 | # Included from machine/endian.h |
| 43 | _QUAD_HIGHWORD = 1 |
| 44 | _QUAD_LOWWORD = 0 |
| 45 | LITTLE_ENDIAN = 1234 |
| 46 | BIG_ENDIAN = 4321 |
| 47 | PDP_ENDIAN = 3412 |
| 48 | BYTE_ORDER = LITTLE_ENDIAN |
| 49 | def __word_swap_long(x): return \ |
| 50 | |
| 51 | def __byte_swap_long(x): return \ |
| 52 | |
| 53 | def __byte_swap_long(x): return \ |
| 54 | |
| 55 | def __byte_swap_word(x): return \ |
| 56 | |
| 57 | ntohl = __byte_swap_long |
| 58 | ntohs = __byte_swap_word |
| 59 | htonl = __byte_swap_long |
| 60 | htons = __byte_swap_word |
| 61 | NBBY = 8 |
| 62 | FD_SETSIZE = 1024 |
| 63 | O_RDONLY = 0x0000 |
| 64 | O_WRONLY = 0x0001 |
| 65 | O_RDWR = 0x0002 |
| 66 | O_ACCMODE = 0x0003 |
| 67 | FREAD = 0x0001 |
| 68 | FWRITE = 0x0002 |
| 69 | O_NONBLOCK = 0x0004 |
| 70 | O_APPEND = 0x0008 |
| 71 | O_SHLOCK = 0x0010 |
| 72 | O_EXLOCK = 0x0020 |
| 73 | O_ASYNC = 0x0040 |
| 74 | O_FSYNC = 0x0080 |
| 75 | O_NOFOLLOW = 0x0100 |
| 76 | O_CREAT = 0x0200 |
| 77 | O_TRUNC = 0x0400 |
| 78 | O_EXCL = 0x0800 |
| 79 | FMARK = 0x1000 |
| 80 | FDEFER = 0x2000 |
| 81 | FHASLOCK = 0x4000 |
| 82 | O_NOCTTY = 0x8000 |
| 83 | def FFLAGS(oflags): return ((oflags) + 1) |
| 84 | |
| 85 | def OFLAGS(fflags): return ((fflags) - 1) |
| 86 | |
| 87 | FAPPEND = O_APPEND |
| 88 | FASYNC = O_ASYNC |
| 89 | FFSYNC = O_FSYNC |
| 90 | FNONBLOCK = O_NONBLOCK |
| 91 | FNDELAY = O_NONBLOCK |
| 92 | O_NDELAY = O_NONBLOCK |
| 93 | F_DUPFD = 0 |
| 94 | F_GETFD = 1 |
| 95 | F_SETFD = 2 |
| 96 | F_GETFL = 3 |
| 97 | F_SETFL = 4 |
| 98 | F_GETOWN = 5 |
| 99 | F_SETOWN = 6 |
| 100 | F_GETLK = 7 |
| 101 | F_SETLK = 8 |
| 102 | F_SETLKW = 9 |
| 103 | FD_CLOEXEC = 1 |
| 104 | F_RDLCK = 1 |
| 105 | F_UNLCK = 2 |
| 106 | F_WRLCK = 3 |
| 107 | F_WAIT = 0x010 |
| 108 | F_FLOCK = 0x020 |
| 109 | F_POSIX = 0x040 |
| 110 | LOCK_SH = 0x01 |
| 111 | LOCK_EX = 0x02 |
| 112 | LOCK_NB = 0x04 |
| 113 | LOCK_UN = 0x08 |