--- parser3/src/include/pa_os.h 2024/11/04 03:53:25 1.14 +++ parser3/src/include/pa_os.h 2026/10/02 19:57:10 1.16 @@ -1,14 +1,14 @@ /** @file Parser: commonly used functions. - Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ #ifndef PA_OS_H #define PA_OS_H -#define IDENT_PA_OS_H "$Id: pa_os.h,v 1.14 2024/11/04 03:53:25 moko Exp $" +#define IDENT_PA_OS_H "$Id: pa_os.h,v 1.16 2026/10/02 19:57:10 moko Exp $" #define PA_LOCK_ATTEMPTS 20 #define PA_LOCK_WAIT_TIMEOUT_SECS 0 @@ -28,4 +28,9 @@ int pa_unlock(int fd); /// yields to OS for secs secs and usecs microseconds (1E-6) int pa_sleep(unsigned long secs, unsigned long usecs); +#ifdef _MSC_VER +/// sets errno from GetLastError(), as CRT does, if the passed windows api call result is zero; returns it +int pa_set_errno(int status); +#endif + #endif