From 5fbd378a0929a8f8a8503d96a0717d0765136519 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Thu, 4 Jun 2020 09:50:34 -0600 Subject: [PATCH] Add more constants. --- Modules/posixmodule.c | 47 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 917b121ef82..420a4b78638 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -14029,6 +14029,16 @@ windows_namespace(void) SET(STANDARD_RIGHTS_EXECUTE); SET(STANDARD_RIGHTS_ALL); SET(SPECIFIC_RIGHTS_ALL); + SET(GENERIC_READ); + SET(GENERIC_WRITE); + SET(GENERIC_EXECUTE); + SET(GENERIC_ALL); + SET(MAXIMUM_ALLOWED); + SET(ACCESS_SYSTEM_SECURITY); + SET(FILE_GENERIC_READ); + SET(FILE_GENERIC_WRITE); + SET(FILE_GENERIC_EXECUTE); + SET(FILE_ALL_ACCESS); consts = _PyNamespace_New(d); if (consts == NULL) { goto error; @@ -14040,15 +14050,46 @@ windows_namespace(void) SET(ERROR_IO_PENDING); SET(ERROR_MORE_DATA); SET(ERROR_NETNAME_DELETED); - SET(ERROR_NO_SYSTEM_RESOURCES); - SET(ERROR_MORE_DATA); - SET(ERROR_NETNAME_DELETED); SET(ERROR_NO_DATA); SET(ERROR_NO_SYSTEM_RESOURCES); SET(ERROR_OPERATION_ABORTED); SET(ERROR_PIPE_BUSY); SET(ERROR_PIPE_CONNECTED); SET(ERROR_SEM_TIMEOUT); + SET(ERROR_GEN_FAILURE); + SET(ERROR_INVALID_FUNCTION); + SET(ERROR_NOT_SUPPORTED); + SET(ERROR_INVALID_PARAMETER); + SET(ERROR_INVALID_HANDLE); + SET(ERROR_INVALID_NAME); + SET(ERROR_BAD_NET_NAME); + SET(ERROR_BAD_PATHNAME); + SET(ERROR_FILENAME_EXCED_RANGE); + SET(ERROR_FILE_NOT_FOUND); + SET(ERROR_PATH_NOT_FOUND); + SET(ERROR_BAD_NETPATH); + SET(ERROR_NO_MORE_FILES); + SET(ERROR_FILE_EXISTS); + SET(ERROR_NOT_SAME_DEVICE); + SET(ERROR_DIRECTORY); + SET(ERROR_TOO_MANY_OPEN_FILES); + SET(ERROR_DISK_FULL); + SET(ERROR_DIR_NOT_EMPTY); + SET(ERROR_CANT_ACCESS_FILE); + SET(ERROR_CANT_RESOLVE_FILENAME); + SET(ERROR_NOT_A_REPARSE_POINT); + SET(ERROR_INVALID_REPARSE_DATA); + SET(ERROR_REPARSE_TAG_INVALID); + SET(ERROR_ACCESS_DENIED); + SET(ERROR_NETWORK_ACCESS_DENIED); + SET(ERROR_SHARING_VIOLATION); + SET(ERROR_LOCK_VIOLATION); + SET(ERROR_NOT_READY); + SET(ERROR_NOT_LOCKED); + SET(ERROR_LOCK_FAILED); + SET(ERROR_BAD_EXE_FORMAT); + SET(ERROR_NOT_ENOUGH_MEMORY); + SET(ERROR_NOT_ENOUGH_QUOTA); #undef SET errors = _PyNamespace_New(d); if (errors == NULL) {