openbsd-ports/net/wget/patches/patch-src_sysdep_h
dcoppa 80daaa02ce Update to wget-1.13.4.
Tested on i386, amd64 and sparc64.

Note: untested on gcc2 architectures, but it's broken anyway since
gperf fails to build there due to an internal compiler error (as
found by sebastia@ on his vax).

OK sthen@
2011-10-12 10:14:30 +00:00

33 lines
834 B
Plaintext

$OpenBSD: patch-src_sysdep_h,v 1.2 2011/10/12 10:14:30 dcoppa Exp $
Fix build with GCC2 where the configure test fails
to pickup stdbool.h. So it creates the lib/stdbool.h
which these definitions would override.
--- src/sysdep.h.orig Thu Oct 6 09:43:49 2011
+++ src/sysdep.h Thu Oct 6 09:47:13 2011
@@ -119,7 +119,23 @@ void *alloca (size_t);
#endif
/* Provided by gnulib on systems that don't have it: */
+#if HAVE_STDBOOL_H
# include <stdbool.h>
+#else
+# if !(defined(__GNUC__) && __GNUC__ < 3)
+# if ! HAVE__BOOL
+# ifdef __cplusplus
+typedef bool _Bool;
+# else
+typedef unsigned char _Bool;
+# endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
+#endif
/* Needed for compilation under OS/2 and MSDOS */
#if defined(__EMX__) || defined(MSDOS)