--- /dev/null
+from typing import Any, Union, IO\r
+import io\r
+\r
+FASYNC = ... # type: int\r
+FD_CLOEXEC = ... # type: int\r
+\r
+DN_ACCESS = ... # type: int\r
+DN_ATTRIB = ... # type: int\r
+DN_CREATE = ... # type: int\r
+DN_DELETE = ... # type: int\r
+DN_MODIFY = ... # type: int\r
+DN_MULTISHOT = ... # type: int\r
+DN_RENAME = ... # type: int\r
+F_DUPFD = ... # type: int\r
+F_EXLCK = ... # type: int\r
+F_GETFD = ... # type: int\r
+F_GETFL = ... # type: int\r
+F_GETLEASE = ... # type: int\r
+F_GETLK = ... # type: int\r
+F_GETLK64 = ... # type: int\r
+F_GETOWN = ... # type: int\r
+F_GETSIG = ... # type: int\r
+F_NOTIFY = ... # type: int\r
+F_RDLCK = ... # type: int\r
+F_SETFD = ... # type: int\r
+F_SETFL = ... # type: int\r
+F_SETLEASE = ... # type: int\r
+F_SETLK = ... # type: int\r
+F_SETLK64 = ... # type: int\r
+F_SETLKW = ... # type: int\r
+F_SETLKW64 = ... # type: int\r
+F_SETOWN = ... # type: int\r
+F_SETSIG = ... # type: int\r
+F_SHLCK = ... # type: int\r
+F_UNLCK = ... # type: int\r
+F_WRLCK = ... # type: int\r
+I_ATMARK = ... # type: int\r
+I_CANPUT = ... # type: int\r
+I_CKBAND = ... # type: int\r
+I_FDINSERT = ... # type: int\r
+I_FIND = ... # type: int\r
+I_FLUSH = ... # type: int\r
+I_FLUSHBAND = ... # type: int\r
+I_GETBAND = ... # type: int\r
+I_GETCLTIME = ... # type: int\r
+I_GETSIG = ... # type: int\r
+I_GRDOPT = ... # type: int\r
+I_GWROPT = ... # type: int\r
+I_LINK = ... # type: int\r
+I_LIST = ... # type: int\r
+I_LOOK = ... # type: int\r
+I_NREAD = ... # type: int\r
+I_PEEK = ... # type: int\r
+I_PLINK = ... # type: int\r
+I_POP = ... # type: int\r
+I_PUNLINK = ... # type: int\r
+I_PUSH = ... # type: int\r
+I_RECVFD = ... # type: int\r
+I_SENDFD = ... # type: int\r
+I_SETCLTIME = ... # type: int\r
+I_SETSIG = ... # type: int\r
+I_SRDOPT = ... # type: int\r
+I_STR = ... # type: int\r
+I_SWROPT = ... # type: int\r
+I_UNLINK = ... # type: int\r
+LOCK_EX = ... # type: int\r
+LOCK_MAND = ... # type: int\r
+LOCK_NB = ... # type: int\r
+LOCK_READ = ... # type: int\r
+LOCK_RW = ... # type: int\r
+LOCK_SH = ... # type: int\r
+LOCK_UN = ... # type: int\r
+LOCK_WRITE = ... # type: int\r
+\r
+_ANYFILE = Union[int, IO]\r
+\r
+# TODO All these return either int or bytes depending on the value of\r
+# cmd (not on the type of arg).\r
+def fcntl(fd: _ANYFILE, op: int, arg: Union[int, bytes] = ...) -> Any: ...\r
+\r
+# TODO: arg: int or read-only buffer interface or read-write buffer interface\r
+def ioctl(fd: _ANYFILE, op: int, arg: Union[int, bytes] = ...,\r
+ mutate_flag: bool = ...) -> Any: ...\r
+\r
+def flock(fd: _ANYFILE, op: int) -> None: ...\r
+def lockf(fd: _ANYFILE, op: int, length: int = ..., start: int = ...,\r
+ whence: int = ...) -> Any: ...\r