Re: [Openvpn-devel] [PATCH] define access mode flag X_OK as 0 on Windows

2012-02-20 Thread Alon Bar-Lev
On Mon, Feb 20, 2012 at 4:22 PM, Heiko Hund wrote: > Defining them makes code more readable, but without X_OK being 0 on Windows > openvpn crashes. See my commit message again and read the MSDN page about > _access at http://msdn.microsoft.com/en-us/library/1w06ktdy%28v=vs.100%29.aspx > Hence the

Re: [Openvpn-devel] [PATCH] define access mode flag X_OK as 0 on Windows

2012-02-20 Thread Heiko Hund
On Monday 20 February 2012 13:44:54 Alon Bar-Lev wrote: > This X_OK is standard define. That's true for unixoid systems, but none of the [FWRX]_OK #defines exist in the MS C runtime headers. > It exists in mingw as 1. Yeah, but only for legacy glue code reasons. From io.h: 8<-

Re: [Openvpn-devel] [PATCH] define access mode flag X_OK as 0 on Windows

2012-02-20 Thread Alon Bar-Lev
Big NAK. This X_OK is standard define. It exists in mingw as 1. OpenVPN should not check execute if unsupported by OS, not changing standard constants. Heiko, Where exactly is the problem? When directories are checked or script? Correct patch would be to have a macro for execute ok in option.c wh

Re: [Openvpn-devel] [PATCH] define access mode flag X_OK as 0 on Windows

2012-02-20 Thread David Sommerseth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18/02/12 20:44, Heiko Hund wrote: > The _access and _waccess functions in Windows don't know about X_OK > (1). If you pass an uneven mode flag the C runtime's default invalid > parameter handler ends execution of openvpn. > > Signed-off-by: Heiko H

[Openvpn-devel] [PATCH] define access mode flag X_OK as 0 on Windows

2012-02-18 Thread Heiko Hund
The _access and _waccess functions in Windows don't know about X_OK (1). If you pass an uneven mode flag the C runtime's default invalid parameter handler ends execution of openvpn. Signed-off-by: Heiko Hund --- win/config.h.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --