From patchwork Fri Oct 15 18:47:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Openvpn-devel,for,2.5] Fix some more wrong defines in config-msvc.h X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 1986 Message-Id: <20211015184733.16988-1-selva.nair@gmail.com> To: openvpn-devel@lists.sourceforge.net Date: Fri, 15 Oct 2021 14:47:33 -0400 From: selva.nair@gmail.com List-Id: From: Selva Nair Not sure where these came from, but here goes: S_IRUSR = 0 --> _S_IREAD S_IWUSR = 0 --> _S_IWRITE ENABLE_DEBUG is on, but I do not think we want it in production build. Changed to ENABLE_DEBUG 0 S_IRGRP is not defined but seems to be used. I have added it, remove if not required. This define is based on mingw and matches MS docs on (https://docs.microsoft.com/en-us/cpp/standard-library/filesystem-enumerations?view=msvc-160) Should fix Trac #1430 but untested (I do not have a setup at hand for msvc build). Signed-off-by: Selva Nair --- config-msvc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config-msvc.h b/config-msvc.h index a39eeed8..9fc8d1cc 100644 --- a/config-msvc.h +++ b/config-msvc.h @@ -5,8 +5,7 @@ #define ENABLE_DEF_AUTH 1 #define ENABLE_PF 1 #define ENABLE_CRYPTO_OPENSSL 1 -#define ENABLE_DEBUG 1 -#define ENABLE_EUREPHIA 1 +#define ENABLE_DEBUG 0 #define ENABLE_FRAGMENT 1 #define ENABLE_HTTP_PROXY 1 #define ENABLE_LZO 1 @@ -144,8 +143,9 @@ #define in_addr_t uint32_t #define ssize_t SSIZE_T -#define S_IRUSR 0 -#define S_IWUSR 0 +#define S_IRUSR _S_IREAD +#define S_IWUSR _S_IWRITE +#define S_IRGRP (S_IRUSR >> 3) #define R_OK 4 #define W_OK 2 #define X_OK 1