mandoc/mandoc-simplify-compat.patch

273 lines
7.8 KiB
Diff
Raw Normal View History

diff -up mandoc-1.14.5/compat_err.c.orig mandoc-1.14.5/compat_err.c
--- mandoc-1.14.5/compat_err.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_err.c 2020-02-06 14:30:56.839081393 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_ERR
-
-int dummy;
-
-#else
+#if HAVE_ERR == 0
/* $Id: compat_err.c,v 1.4 2015/11/26 07:42:11 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/compat_fts.c.orig mandoc-1.14.5/compat_fts.c
--- mandoc-1.14.5/compat_fts.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_fts.c 2020-02-06 14:31:04.095057713 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_FTS
-
-int dummy;
-
-#else
+#if HAVE_FTS == 0
/* $Id: compat_fts.c,v 1.14 2017/02/18 12:24:24 schwarze Exp $ */
/* $OpenBSD: fts.c,v 1.56 2016/09/21 04:38:56 guenther Exp $ */
diff -up mandoc-1.14.5/compat_getline.c.orig mandoc-1.14.5/compat_getline.c
--- mandoc-1.14.5/compat_getline.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_getline.c 2020-02-06 14:31:14.287024456 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_GETLINE
-
-int dummy;
-
-#else
+#if HAVE_GETLINE == 0
/* $Id: compat_getline.c,v 1.1 2015/11/07 20:52:52 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/compat_getsubopt.c.orig mandoc-1.14.5/compat_getsubopt.c
--- mandoc-1.14.5/compat_getsubopt.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_getsubopt.c 2020-02-06 14:31:24.446991303 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_GETSUBOPT
-
-int dummy;
-
-#else
+#if HAVE_GETSUBOPT == 0
/* $Id: compat_getsubopt.c,v 1.5 2014/08/17 20:53:50 schwarze Exp $ */
/* $OpenBSD: getsubopt.c,v 1.4 2005/08/08 08:05:36 espie Exp $ */
diff -up mandoc-1.14.5/compat_isblank.c.orig mandoc-1.14.5/compat_isblank.c
--- mandoc-1.14.5/compat_isblank.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_isblank.c 2020-02-06 14:31:33.686961149 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_ISBLANK
-
-int dummy;
-
-#else
+#if HAVE_ISBLANK == 0
/* $Id: compat_isblank.c,v 1.2 2015/10/06 18:32:19 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/compat_mkdtemp.c.orig mandoc-1.14.5/compat_mkdtemp.c
--- mandoc-1.14.5/compat_mkdtemp.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_mkdtemp.c 2020-02-06 14:31:41.758934811 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_MKDTEMP
-
-int dummy;
-
-#else
+#if HAVE_MKDTEMP == 0
/* $Id: compat_mkdtemp.c,v 1.2 2015/10/06 18:32:19 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/compat_ohash.c.orig mandoc-1.14.5/compat_ohash.c
--- mandoc-1.14.5/compat_ohash.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_ohash.c 2020-02-06 14:31:49.943908103 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_OHASH
-
-int dummy;
-
-#else
+#if HAVE_OHASH == 0
/* $OpenBSD: ohash.c,v 1.1 2014/06/02 18:52:03 deraadt Exp $ */
diff -up mandoc-1.14.5/compat_progname.c.orig mandoc-1.14.5/compat_progname.c
--- mandoc-1.14.5/compat_progname.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_progname.c 2020-02-06 14:31:57.278884167 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_PROGNAME
-
-int dummy;
-
-#else
+#if HAVE_PROGNAME == 0
/* $Id: compat_progname.c,v 1.1 2015/11/06 16:30:33 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/compat_reallocarray.c.orig mandoc-1.14.5/compat_reallocarray.c
--- mandoc-1.14.5/compat_reallocarray.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_reallocarray.c 2020-02-06 14:32:05.686856733 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_REALLOCARRAY
-
-int dummy;
-
-#else
+#if HAVE_REALLOCARRAY == 0
/* $Id: compat_reallocarray.c,v 1.4 2014/12/11 09:05:01 schwarze Exp $ */
/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */
diff -up mandoc-1.14.5/compat_recallocarray.c.orig mandoc-1.14.5/compat_recallocarray.c
--- mandoc-1.14.5/compat_recallocarray.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_recallocarray.c 2020-02-06 14:32:14.070829371 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_RECALLOCARRAY
-
-int dummy;
-
-#else
+#if HAVE_RECALLOCARRAY == 0
/* $Id: compat_recallocarray.c,v 1.1 2017/06/12 19:05:47 schwarze Exp $ */
/* $OpenBSD: malloc.c,v 1.225 2017/05/13 07:11:29 otto Exp $ */
diff -up mandoc-1.14.5/compat_strcasestr.c.orig mandoc-1.14.5/compat_strcasestr.c
--- mandoc-1.14.5/compat_strcasestr.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_strcasestr.c 2020-02-06 14:32:21.591804829 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRCASESTR
-
-int dummy;
-
-#else
+#if HAVE_STRCASESTR == 0
/* $Id: compat_strcasestr.c,v 1.4 2014/12/11 09:19:32 schwarze Exp $ */
/* $NetBSD: strcasestr.c,v 1.3 2005/11/29 03:12:00 christos Exp $ */
diff -up mandoc-1.14.5/compat_stringlist.c.orig mandoc-1.14.5/compat_stringlist.c
--- mandoc-1.14.5/compat_stringlist.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_stringlist.c 2020-02-06 14:29:49.568300904 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRINGLIST
-
-int dummy;
-
-#else
+#if HAVE_STRINGLIST == 0
/* $Id: compat_stringlist.c,v 1.6 2015/11/07 14:22:29 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/compat_stringlist.h.orig mandoc-1.14.5/compat_stringlist.h
diff -up mandoc-1.14.5/compat_strlcat.c.orig mandoc-1.14.5/compat_strlcat.c
--- mandoc-1.14.5/compat_strlcat.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_strlcat.c 2020-02-06 14:32:36.471756272 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRLCAT
-
-int dummy;
-
-#else
+#if HAVE_STRLCAT == 0
/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
diff -up mandoc-1.14.5/compat_strlcpy.c.orig mandoc-1.14.5/compat_strlcpy.c
--- mandoc-1.14.5/compat_strlcpy.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_strlcpy.c 2020-02-06 14:32:44.447730243 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRLCPY
-
-int dummy;
-
-#else
+#if HAVE_STRLCPY == 0
/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
diff -up mandoc-1.14.5/compat_strndup.c.orig mandoc-1.14.5/compat_strndup.c
--- mandoc-1.14.5/compat_strndup.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_strndup.c 2020-02-06 14:32:52.264704732 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRNDUP
-
-int dummy;
-
-#else
+#if HAVE_STRNDUP == 0
/* $Id: compat_strndup.c,v 1.1 2018/02/27 11:16:23 schwarze Exp $ */
/* OpenBSD: strndup.c,v 1.2 2015/08/31 02:53:57 guenther Exp */
diff -up mandoc-1.14.5/compat_strsep.c.orig mandoc-1.14.5/compat_strsep.c
--- mandoc-1.14.5/compat_strsep.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_strsep.c 2020-02-06 14:33:01.807673592 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRSEP
-
-int dummy;
-
-#else
+#if HAVE_STRSEP == 0
/* $Id: compat_strsep.c,v 1.4 2014/12/11 09:05:01 schwarze Exp $ */
/* $OpenBSD: strsep.c,v 1.7 2014/02/05 20:42:32 stsp Exp $ */
diff -up mandoc-1.14.5/compat_strtonum.c.orig mandoc-1.14.5/compat_strtonum.c
--- mandoc-1.14.5/compat_strtonum.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_strtonum.c 2020-02-06 14:33:10.839644116 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_STRTONUM
-
-int dummy;
-
-#else
+#if HAVE_STRTONUM == 0
/* $Id: compat_strtonum.c,v 1.1 2015/02/16 14:56:22 schwarze Exp $ */
/* $OpenBSD: strtonum.c,v 1.7 2013/04/17 18:40:58 tedu Exp $ */
diff -up mandoc-1.14.5/compat_vasprintf.c.orig mandoc-1.14.5/compat_vasprintf.c
--- mandoc-1.14.5/compat_vasprintf.c.orig 2019-03-10 05:56:43.000000000 -0400
+++ mandoc-1.14.5/compat_vasprintf.c 2020-02-06 14:33:18.119620363 -0500
@@ -1,10 +1,6 @@
#include "config.h"
-#if HAVE_VASPRINTF
-
-int dummy;
-
-#else
+#if HAVE_VASPRINTF == 0
/* $Id: compat_vasprintf.c,v 1.3 2015/10/06 18:32:19 schwarze Exp $ */
/*
diff -up mandoc-1.14.5/tbl_html.c.orig mandoc-1.14.5/tbl_html.c