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