Skip to contentSkip to conversation

Remove compat-stdbool.h.

PATCH In review Arne Schwabe 4 participants 7 messages Nov 19, 2016 – Nov 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove compat-stdbool.h.

Since we use C99, we are guaranteed to have stdbool.h available

---
 src/compat/compat-stdbool.h | 12 ------------
 src/openvpn/syshead.h       |  2 +-
 2 files changed, 1 insertion(+), 13 deletions(-)
 delete mode 100644 src/compat/compat-stdbool.h
src/compat/compat-stdbool.h deleted +0 -12
deleted file mode 100644
index 9941218..0000000
@@ -1,12 +0,0 @@
-#ifndef __COMPAT_STDBOOL_H
-#define __COMPAT_STDBOOL_H
-
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#else
-typedef int bool;
-#define false 0
-#define true 1
-#endif
-
-#endif
src/openvpn/syshead.h +1 -1
index 8de7d87..f5008b7 100644
@@ -26,7 +26,7 @@
 #define SYSHEAD_H
 
 #include "compat.h"
-#include "compat-stdbool.h"
+#include <stdbool.h>
 
 /* branch prediction hints */
 #if defined(__GNUC__)
Signature · 1 line
2.9.3 (Apple Git-75)
#2 lore raw
In reply to Arne Schwabe

Hi,

Quoted 6 lines · Arne Schwabe

Since we use C99, we are guaranteed to have stdbool.h available

---
 src/compat/compat-stdbool.h | 12 ------------
 src/openvpn/syshead.h       |  2 +-
 2 files changed, 1 insertion(+), 13 deletions(-)
 delete mode 100644 src/compat/compat-stdbool.h

Meh! When deleting a whole file, please take into account that this might be referenced in "make dist"...

make[3]: *** No rule to make target compat-stdbool.h', needed by distdir'.

(Windows buildbot is currently broken because it builds tarballs first)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#3 lore raw
Quoted 8 lines · Gert Doering
Quoted 6 lines · Arne Schwabe

Since we use C99, we are guaranteed to have stdbool.h available

---
 src/compat/compat-stdbool.h | 12 ------------
 src/openvpn/syshead.h       |  2 +-
 2 files changed, 1 insertion(+), 13 deletions(-)
 delete mode 100644 src/compat/compat-stdbool.h
Quoted 4 lines

Meh! When deleting a whole file, please take into account that this might be referenced in "make dist"...

make[3]: *** No rule to make target `compat-stdbool.h', needed by

`distdir'.

Also, I think this means we can remove the check for stdbool.h in configure.ac.

-Steffan

#4 lore raw

PATCH 1/1 Remove remaining traces of compat-stdbool.h

In reply to Arne Schwabe

commit 35be7e0d5 removed most references to compat-stdbool.h but overlooked configure and "make dist"

---
 configure.ac           | 2 +-
 src/compat/Makefile.am | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
configure.ac +1 -1
index 4a45f05..f4073d0 100644
@@ -435,7 +435,7 @@ AX_EMPTY_ARRAY
 AC_CHECK_SIZEOF([unsigned int])
 AC_CHECK_SIZEOF([unsigned long])
 AC_CHECK_HEADERS([ \
-	stdio.h stdarg.h stdbool.h limits.h \
+	stdio.h stdarg.h limits.h \
 	time.h errno.h fcntl.h io.h direct.h \
 	ctype.h sys/types.h sys/socket.h \
 	signal.h unistd.h dlfcn.h \
src/compat/Makefile.am +0 -1
index 06bab5c..0a9d1c2 100644
@@ -20,7 +20,6 @@ noinst_LTLIBRARIES = libcompat.la
 
 libcompat_la_SOURCES = \
 	compat.h \
-	compat-stdbool.h \
 	compat-dirname.c \
 	compat-basename.c \
 	compat-gettimeofday.c \
Signature · 1 line
2.7.3
#5 lore raw

Re: [Openvpn-devel] [PATCH] Remove remaining traces of compat-stdbool.h

Quoted 9 lines · Gert Doering

commit 35be7e0d5 removed most references to compat-stdbool.h but overlooked configure and "make dist"

---
 configure.ac           | 2 +-
 src/compat/Makefile.am | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

'make dist' is now happy and Windows build works. Thanks.

ACK.

Selva

#6 lore raw

[Openvpn-devel] [PATCH applied] Re: Remove remaining traces of compat-stdbool.h

In reply to Gert Doering

Patch has been applied to the master branch.

commit e5fc56a77ee08d10974ab7a245ceb94e13761a1b

Author: Gert Doering
Date:   Sun Nov 20 08:47:40 2016 +0100
     Remove remaining traces of compat-stdbool.h

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Selva Nair <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg13135.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering