Re: [Openvpn-devel] [PATCH] include unistd.h for _exit(2) declaration

2022-05-27 Thread Heiko Hund
Hi Gert

On Freitag, 27. Mai 2022 13:40:57 CEST Gert Doering wrote:
>  is included by "syshead.h" already today, with a nice
> HAVE_UNISTD_H wraper (thus, not depending on a "if it's not WIN32,
> it surely must have unistd.h" assumption).
> 
> So I wonder what issue this fixes?  I see no compile time warnings about
> _exit() either.

I get "Implicit declaration of function '_exit' is invalid in C99 [-Wimplicit-
function-declaration]" complaints from my semantic analyzer, but it's because 
it didn't pick up the -DHAVE_CONFIG_H. So I think that can be ignored indeed.
Apologies for the noise.

Heiko





___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


Re: [Openvpn-devel] [PATCH] include unistd.h for _exit(2) declaration

2022-05-27 Thread Gert Doering
Hi,

On Fri, May 27, 2022 at 01:34:11PM +0200, Heiko Hund wrote:
> Signed-off-by: Heiko Hund 
> ---
>  src/openvpn/error.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/openvpn/error.h b/src/openvpn/error.h
> index 972619fe..76308560 100644
> --- a/src/openvpn/error.h
> +++ b/src/openvpn/error.h
> @@ -33,6 +33,8 @@
>  
>  #if _WIN32
>  #include 
> +#else
> +#include 
>  #endif
>  
>  /* #define ABORT_ON_ERROR */

 is included by "syshead.h" already today, with a nice
HAVE_UNISTD_H wraper (thus, not depending on a "if it's not WIN32,
it surely must have unistd.h" assumption).

So I wonder what issue this fixes?  I see no compile time warnings about
_exit() either.

gert


-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
 Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany g...@greenie.muc.de


signature.asc
Description: PGP signature
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [PATCH] include unistd.h for _exit(2) declaration

2022-05-27 Thread Heiko Hund
Signed-off-by: Heiko Hund 
---
 src/openvpn/error.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/openvpn/error.h b/src/openvpn/error.h
index 972619fe..76308560 100644
--- a/src/openvpn/error.h
+++ b/src/openvpn/error.h
@@ -33,6 +33,8 @@
 
 #if _WIN32
 #include 
+#else
+#include 
 #endif
 
 /* #define ABORT_ON_ERROR */
-- 
2.32.0



___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel