summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-10 23:54:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-10 23:54:41 +0000
commita48dab80b41e90194711a45e5012659b7a83da4f (patch)
treee9ff1b0c9ce7ccae2406c13997216cfa833192fe
parenteb71396069dcb5ba517f77b55312e455b6b16b76 (diff)
downloadmandoc-a48dab80b41e90194711a45e5012659b7a83da4f.tar.gz
Get rid of HAVE_CONFIG_H, it is always defined; idea from libnbcompat.
Include <sys/types.h> where needed, it does not belong in config.h. Remove <stdio.h> from config.h; if it is missing somewhere, it should be added, but i cannot find a *.c file where it is missing.
-rw-r--r--Makefile4
-rw-r--r--apropos.c4
-rw-r--r--arch.c4
-rw-r--r--att.c4
-rw-r--r--cgi.c4
-rw-r--r--chars.c4
-rw-r--r--compat_fgetln.c5
-rw-r--r--compat_getsubopt.c2
-rw-r--r--compat_ohash.c4
-rw-r--r--compat_reallocarray.c2
-rw-r--r--compat_sqlite3_errstr.c2
-rw-r--r--compat_strcasestr.c2
-rw-r--r--compat_strlcat.c2
-rw-r--r--compat_strlcpy.c2
-rw-r--r--compat_strsep.c2
-rw-r--r--config.h.pre3
-rw-r--r--demandoc.c4
-rw-r--r--eqn.c4
-rw-r--r--eqn_html.c4
-rw-r--r--eqn_term.c4
-rw-r--r--html.c2
-rw-r--r--lib.c4
-rw-r--r--main.c4
-rw-r--r--man.c2
-rw-r--r--man_hash.c2
-rw-r--r--man_html.c2
-rw-r--r--man_macro.c4
-rw-r--r--man_term.c2
-rw-r--r--man_validate.c2
-rw-r--r--mandoc.c2
-rw-r--r--mandoc_aux.c2
-rw-r--r--mandocdb.c3
-rw-r--r--manpage.c4
-rw-r--r--manpath.c4
-rw-r--r--mansearch.c4
-rw-r--r--mansearch_const.c3
-rw-r--r--mdoc.c2
-rw-r--r--mdoc_argv.c2
-rw-r--r--mdoc_hash.c2
-rw-r--r--mdoc_html.c2
-rw-r--r--mdoc_macro.c4
-rw-r--r--mdoc_man.c4
-rw-r--r--mdoc_term.c2
-rw-r--r--mdoc_validate.c5
-rw-r--r--msec.c4
-rw-r--r--out.c2
-rw-r--r--preconv.c3
-rw-r--r--read.c7
-rw-r--r--roff.c4
-rw-r--r--st.c4
-rw-r--r--tbl.c4
-rw-r--r--tbl_data.c4
-rw-r--r--tbl_html.c4
-rw-r--r--tbl_layout.c4
-rw-r--r--tbl_opts.c4
-rw-r--r--tbl_term.c4
-rw-r--r--term.c2
-rw-r--r--term_ascii.c6
-rw-r--r--term_ps.c2
-rw-r--r--tree.c4
-rw-r--r--vol.c4
61 files changed, 72 insertions, 129 deletions
diff --git a/Makefile b/Makefile
index 914e6e00..f9114f80 100644
--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,8 @@ VERSION = 1.13.1
#
CFLAGS += -DUSE_WCHAR
-CFLAGS += -g -DHAVE_CONFIG_H
-CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
+CFLAGS += -g -W -Wall -Wstrict-prototypes
+CFLAGS += -Wno-unused-parameter -Wwrite-strings
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
INCLUDEDIR = $(PREFIX)/include/mandoc
diff --git a/apropos.c b/apropos.c
index 7b35c7ae..e76760b6 100644
--- a/apropos.c
+++ b/apropos.c
@@ -15,10 +15,10 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
#include <sys/param.h>
+#include <sys/types.h>
#include <assert.h>
#include <getopt.h>
diff --git a/arch.c b/arch.c
index 2a9af4e1..8454cbc6 100644
--- a/arch.c
+++ b/arch.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <string.h>
diff --git a/att.c b/att.c
index 3113f9c9..1b009e00 100644
--- a/att.c
+++ b/att.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <string.h>
diff --git a/cgi.c b/cgi.c
index ee4eb773..4f8339e2 100644
--- a/cgi.c
+++ b/cgi.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
diff --git a/chars.c b/chars.c
index aee3fdf5..051251b1 100644
--- a/chars.c
+++ b/chars.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/compat_fgetln.c b/compat_fgetln.c
index 49c9985b..667d1f76 100644
--- a/compat_fgetln.c
+++ b/compat_fgetln.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_FGETLN
@@ -41,6 +39,9 @@ int dummy;
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+
+#include <sys/types.h>
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/compat_getsubopt.c b/compat_getsubopt.c
index 9cd41536..3b22e262 100644
--- a/compat_getsubopt.c
+++ b/compat_getsubopt.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_GETSUBOPT
diff --git a/compat_ohash.c b/compat_ohash.c
index 0992b365..45c9b6da 100644
--- a/compat_ohash.c
+++ b/compat_ohash.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_OHASH
@@ -25,6 +23,8 @@ int dummy;
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
diff --git a/compat_reallocarray.c b/compat_reallocarray.c
index e25d8374..5fabd0b2 100644
--- a/compat_reallocarray.c
+++ b/compat_reallocarray.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_REALLOCARRAY
diff --git a/compat_sqlite3_errstr.c b/compat_sqlite3_errstr.c
index b8d6eb58..b4696019 100644
--- a/compat_sqlite3_errstr.c
+++ b/compat_sqlite3_errstr.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_SQLITE3_ERRSTR
diff --git a/compat_strcasestr.c b/compat_strcasestr.c
index 5216d021..156cd5d8 100644
--- a/compat_strcasestr.c
+++ b/compat_strcasestr.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_STRCASESTR
diff --git a/compat_strlcat.c b/compat_strlcat.c
index 543d40b3..26bddc00 100644
--- a/compat_strlcat.c
+++ b/compat_strlcat.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_STRLCAT
diff --git a/compat_strlcpy.c b/compat_strlcpy.c
index a7c64ff9..ccdf9319 100644
--- a/compat_strlcpy.c
+++ b/compat_strlcpy.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_STRLCPY
diff --git a/compat_strsep.c b/compat_strsep.c
index a5c58c62..1c7dfef9 100644
--- a/compat_strsep.c
+++ b/compat_strsep.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#ifdef HAVE_STRSEP
diff --git a/config.h.pre b/config.h.pre
index 1c3940de..05f0485c 100644
--- a/config.h.pre
+++ b/config.h.pre
@@ -4,6 +4,3 @@
#if defined(__linux__) || defined(__MINT__)
# define _GNU_SOURCE /* getsubopt(), strcasestr(), strptime() */
#endif
-
-#include <sys/types.h>
-#include <stdio.h>
diff --git a/demandoc.c b/demandoc.c
index a757bf91..eded61df 100644
--- a/demandoc.c
+++ b/demandoc.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/eqn.c b/eqn.c
index 5455403f..0da67f19 100644
--- a/eqn.c
+++ b/eqn.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <limits.h>
diff --git a/eqn_html.c b/eqn_html.c
index 1ae45551..a953b9f7 100644
--- a/eqn_html.c
+++ b/eqn_html.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/eqn_term.c b/eqn_term.c
index 7d6f9487..70fdeca3 100644
--- a/eqn_term.c
+++ b/eqn_term.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/html.c b/html.c
index 13d1902c..70b3e4e6 100644
--- a/html.c
+++ b/html.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/lib.c b/lib.c
index 5fdf7e8c..a4c8890f 100644
--- a/lib.c
+++ b/lib.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <string.h>
diff --git a/main.c b/main.c
index 73ab9e81..fe520ad2 100644
--- a/main.c
+++ b/main.c
@@ -16,9 +16,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/man.c b/man.c
index 7e04d1f2..89da5cb5 100644
--- a/man.c
+++ b/man.c
@@ -16,9 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/man_hash.c b/man_hash.c
index 9228e7ef..9e155277 100644
--- a/man_hash.c
+++ b/man_hash.c
@@ -14,9 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/man_html.c b/man_html.c
index 90cf629c..b127953f 100644
--- a/man_html.c
+++ b/man_html.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/man_macro.c b/man_macro.c
index 638e614e..8f12b894 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -16,9 +16,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/man_term.c b/man_term.c
index 409fd784..14d30cd5 100644
--- a/man_term.c
+++ b/man_term.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/man_validate.c b/man_validate.c
index 76aebe1c..78c10af0 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mandoc.c b/mandoc.c
index 48af7f97..1f5f6398 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mandoc_aux.c b/mandoc_aux.c
index 1db34594..76d05643 100644
--- a/mandoc_aux.c
+++ b/mandoc_aux.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mandocdb.c b/mandocdb.c
index 4dcb5ac6..c8dd670c 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -15,11 +15,10 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/stat.h>
+#include <sys/types.h>
#include <sys/wait.h>
#include <assert.h>
diff --git a/manpage.c b/manpage.c
index 24778f39..28d1c3d8 100644
--- a/manpage.c
+++ b/manpage.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <getopt.h>
diff --git a/manpath.c b/manpath.c
index c5d2cc0c..11aec972 100644
--- a/manpath.c
+++ b/manpath.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/mansearch.c b/mansearch.c
index 1fe1f594..58250631 100644
--- a/mansearch.c
+++ b/mansearch.c
@@ -15,11 +15,11 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/mman.h>
+#include <sys/types.h>
+
#include <assert.h>
#include <fcntl.h>
#include <getopt.h>
diff --git a/mansearch_const.c b/mansearch_const.c
index dfe5c049..ac9ebf31 100644
--- a/mansearch_const.c
+++ b/mansearch_const.c
@@ -14,11 +14,10 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
+
#include <stdint.h>
#include "manpath.h"
diff --git a/mdoc.c b/mdoc.c
index fe63c930..ede6256b 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 99c0caaf..37af880f 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mdoc_hash.c b/mdoc_hash.c
index 0a5517b7..55ac3509 100644
--- a/mdoc_hash.c
+++ b/mdoc_hash.c
@@ -14,9 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mdoc_html.c b/mdoc_html.c
index 328cb9bc..5c26f7ea 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 04f494c3..8fa66825 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/mdoc_man.c b/mdoc_man.c
index 070372cf..9855c41e 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/mdoc_term.c b/mdoc_term.c
index 9cb6e8e0..aa37c581 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -16,9 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/mdoc_validate.c b/mdoc_validate.c
index a7fd30bf..ae6acec1 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -16,16 +16,13 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#include <sys/types.h>
#ifndef OSNAME
#include <sys/utsname.h>
#endif
-#include <sys/types.h>
-
#include <assert.h>
#include <ctype.h>
#include <limits.h>
diff --git a/msec.c b/msec.c
index a51737be..97595063 100644
--- a/msec.c
+++ b/msec.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <string.h>
diff --git a/out.c b/out.c
index 9bed1371..601b07de 100644
--- a/out.c
+++ b/out.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/preconv.c b/preconv.c
index 3c7d81f3..91d7a21f 100644
--- a/preconv.c
+++ b/preconv.c
@@ -14,10 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#include <sys/types.h>
#ifdef HAVE_MMAP
#include <sys/stat.h>
#include <sys/mman.h>
diff --git a/read.c b/read.c
index 4ad08236..d80a02ac 100644
--- a/read.c
+++ b/read.c
@@ -16,13 +16,12 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#include <sys/types.h>
#ifdef HAVE_MMAP
-# include <sys/stat.h>
-# include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
#endif
#include <assert.h>
diff --git a/roff.c b/roff.c
index cf6534ed..56f5c59b 100644
--- a/roff.c
+++ b/roff.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/st.c b/st.c
index 4a1bd1ac..d66d10af 100644
--- a/st.c
+++ b/st.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <string.h>
diff --git a/tbl.c b/tbl.c
index 5fa4c143..33af71d2 100644
--- a/tbl.c
+++ b/tbl.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/tbl_data.c b/tbl_data.c
index 331b7f98..da4b11b7 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/tbl_html.c b/tbl_html.c
index fbf6ef91..033946de 100644
--- a/tbl_html.c
+++ b/tbl_html.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/tbl_layout.c b/tbl_layout.c
index c2ff3bf1..b0e0ae98 100644
--- a/tbl_layout.c
+++ b/tbl_layout.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <ctype.h>
#include <stdlib.h>
diff --git a/tbl_opts.c b/tbl_opts.c
index cf80b888..86e0ed15 100644
--- a/tbl_opts.c
+++ b/tbl_opts.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <ctype.h>
#include <stdio.h>
diff --git a/tbl_term.c b/tbl_term.c
index fbe72af7..44049bd4 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
diff --git a/term.c b/term.c
index 22fdf818..fb00fa62 100644
--- a/term.c
+++ b/term.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/term_ascii.c b/term_ascii.c
index c749c982..3eb03801 100644
--- a/term_ascii.c
+++ b/term_ascii.c
@@ -15,21 +15,19 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
#ifdef USE_WCHAR
-# include <locale.h>
+#include <locale.h>
#endif
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef USE_WCHAR
-# include <wchar.h>
+#include <wchar.h>
#endif
#include "mandoc.h"
diff --git a/term_ps.c b/term_ps.c
index f63f2ef5..37020aa2 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -15,9 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <sys/types.h>
diff --git a/tree.c b/tree.c
index 8735ee3c..78051417 100644
--- a/tree.c
+++ b/tree.c
@@ -15,9 +15,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <assert.h>
#include <limits.h>
diff --git a/vol.c b/vol.c
index b855df2e..1e24f993 100644
--- a/vol.c
+++ b/vol.c
@@ -14,9 +14,9 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <sys/types.h>
#include <string.h>