diff options
author | Guido van Rossum <guido@python.org> | 1998-05-06 15:14:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-05-06 15:14:36 (GMT) |
commit | e7b6e396fcbcd26b9af5c13ba27fd7c5629628cf (patch) | |
tree | 91969380bf7c630dcdf1b4c2c46299a4319e2544 /Lib/plat-freebsd2/FCNTL.py | |
parent | 4a114313a89e8b7a9c74ee09729cfbb72053f6b4 (diff) | |
download | cpython-e7b6e396fcbcd26b9af5c13ba27fd7c5629628cf.zip cpython-e7b6e396fcbcd26b9af5c13ba27fd7c5629628cf.tar.gz cpython-e7b6e396fcbcd26b9af5c13ba27fd7c5629628cf.tar.bz2 |
New files from Thomas Gellekum
Diffstat (limited to 'Lib/plat-freebsd2/FCNTL.py')
-rwxr-xr-x | Lib/plat-freebsd2/FCNTL.py | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/Lib/plat-freebsd2/FCNTL.py b/Lib/plat-freebsd2/FCNTL.py index 8862073..4d5db42 100755 --- a/Lib/plat-freebsd2/FCNTL.py +++ b/Lib/plat-freebsd2/FCNTL.py @@ -1,16 +1,61 @@ -# Generated by h2py from /usr/include/sys/fcntl.h +# Generated by h2py from /usr/include/fcntl.h + +# Included from sys/types.h + +# Included from sys/cdefs.h +def __P(protos): return protos + +def __STRING(x): return #x + +def __XSTRING(x): return __STRING(x) + +def __P(protos): return () + +def __STRING(x): return "x" + +def __RCSID(s): return __IDSTRING(rcsid,s) + +def __RCSID_SOURCE(s): return __IDSTRING(rcsid_source,s) + +def __COPYRIGHT(s): return __IDSTRING(copyright,s) + + +# Included from machine/ansi.h +_BSD_PTRDIFF_T_ = int +_BSD_SSIZE_T_ = int +_BSD_TIME_T_ = long +_BSD_CT_RUNE_T_ = int +_BSD_PID_T_ = int +_BSD_CLK_TCK_ = 128 +_BSD_CLOCKS_PER_SEC_ = 128 + +# Included from machine/types.h +def major(x): return ((int)(((u_int)(x) >> 8)&0xff)) + +def minor(x): return ((int)((x)&0xffff00ff)) # Included from machine/endian.h -_MACHINE_ENDIAN_H_ = 1 _QUAD_HIGHWORD = 1 _QUAD_LOWWORD = 0 LITTLE_ENDIAN = 1234 BIG_ENDIAN = 4321 PDP_ENDIAN = 3412 BYTE_ORDER = LITTLE_ENDIAN +def __word_swap_long(x): return \ -# Included from machine/types.h +def __byte_swap_long(x): return \ + +def __byte_swap_word(x): return \ + +def __byte_swap_long(x): return \ + +def __byte_swap_word(x): return \ + +ntohl = __byte_swap_long +ntohs = __byte_swap_word +htonl = __byte_swap_long +htons = __byte_swap_word NBBY = 8 FD_SETSIZE = 256 O_RDONLY = 0x0000 @@ -31,7 +76,10 @@ O_EXCL = 0x0800 FMARK = 0x1000 FDEFER = 0x2000 FHASLOCK = 0x4000 -O_NOCTTY = 0 +O_NOCTTY = 0x8000 +def FFLAGS(oflags): return ((oflags) + 1) + +def OFLAGS(fflags): return ((fflags) - 1) FAPPEND = O_APPEND FASYNC = O_ASYNC |