From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 0162533a for ; Tue, 19 Jul 2016 19:23:44 -0500 (EST) Date: Tue, 19 Jul 2016 19:23:44 -0500 (EST) Message-Id: <1306413135848947331.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Linux compatibility: Work around the lack of EFTYPE and protect X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Linux compatibility: Work around the lack of EFTYPE and protect . Modified Files: -------------- mdocml: Makefile.depend configure dba_write.c dbm.c dbm_map.c mansearch.c mansearch.h Added Files: ----------- mdocml: test-EFTYPE.c Revision Data ------------- Index: dba_write.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/dba_write.c,v retrieving revision 1.1 retrieving revision 1.2 diff -Ldba_write.c -Ldba_write.c -u -p -r1.1 -r1.2 --- dba_write.c +++ dba_write.c @@ -17,9 +17,13 @@ * Low-level functions for serializing allocation-based data to disk. * The interface is defined in "dba_write.h". */ +#include "config.h" + #include #include +#if HAVE_ERR #include +#endif #include #include #include Index: dbm.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/dbm.c,v retrieving revision 1.1 retrieving revision 1.2 diff -Ldbm.c -Ldbm.c -u -p -r1.1 -r1.2 --- dbm.c +++ dbm.c @@ -17,9 +17,13 @@ * Map-based version of the mandoc database, for read-only access. * The interface is defined in "dbm.h". */ +#include "config.h" + #include #include +#if HAVE_ERR #include +#endif #include #include #include --- /dev/null +++ test-EFTYPE.c @@ -0,0 +1,7 @@ +#include + +int +main(void) +{ + return !EFTYPE; +} Index: mansearch.h =================================================================== RCS file: /home/cvs/mdocml/mdocml/mansearch.h,v retrieving revision 1.25 retrieving revision 1.26 diff -Lmansearch.h -Lmansearch.h -u -p -r1.25 -r1.26 --- mansearch.h +++ mansearch.h @@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2012 Kristaps Dzonsons - * Copyright (c) 2013, 2014 Ingo Schwarze + * Copyright (c) 2013, 2014, 2016 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above Index: dbm_map.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/dbm_map.c,v retrieving revision 1.1 retrieving revision 1.2 diff -Ldbm_map.c -Ldbm_map.c -u -p -r1.1 -r1.2 --- dbm_map.c +++ dbm_map.c @@ -18,12 +18,16 @@ * of the mandoc database, for read-only access. * The interface is defined in "dbm_map.h". */ +#include "config.h" + #include #include #include #include +#if HAVE_ERR #include +#endif #include #include #include Index: mansearch.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mansearch.c,v retrieving revision 1.66 retrieving revision 1.67 diff -Lmansearch.c -Lmansearch.c -u -p -r1.66 -r1.67 --- mansearch.c +++ mansearch.c @@ -1,7 +1,7 @@ /* $OpenBSD: mansearch.c,v 1.50 2016/07/09 15:23:36 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons - * Copyright (c) 2013, 2014, 2015 Ingo Schwarze + * Copyright (c) 2013, 2014, 2015, 2016 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -15,6 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "config.h" #include #include Index: configure =================================================================== RCS file: /home/cvs/mdocml/mdocml/configure,v retrieving revision 1.45 retrieving revision 1.46 diff -Lconfigure -Lconfigure -u -p -r1.45 -r1.46 --- configure +++ configure @@ -45,6 +45,7 @@ STATIC="-static" BUILD_CGI=0 HAVE_DIRENT_NAMLEN= +HAVE_EFTYPE= HAVE_ERR= HAVE_FTS= HAVE_GETLINE= @@ -173,6 +174,7 @@ runtest() { # --- library functions --- runtest dirent-namlen DIRENT_NAMLEN || true +runtest EFTYPE EFTYPE || true runtest err ERR || true runtest fts FTS || true runtest getline GETLINE || true @@ -245,6 +247,7 @@ echo "#define MAN_CONF_FILE \"/etc/${MAN echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" [ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" +[ ${HAVE_EFTYPE} -eq 0 ] && echo "#define EFTYPE EINVAL" cat << __HEREDOC__ #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN} Index: Makefile.depend =================================================================== RCS file: /home/cvs/mdocml/mdocml/Makefile.depend,v retrieving revision 1.23 retrieving revision 1.24 diff -LMakefile.depend -LMakefile.depend -u -p -r1.23 -r1.24 --- Makefile.depend +++ Makefile.depend @@ -1,13 +1,13 @@ att.o: att.c config.h roff.h mdoc.h libmdoc.h cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h -chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h libmandoc.h +chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h compat_err.o: compat_err.c config.h -compat_fts.o: compat_fts.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h compat_getline.o: compat_getline.c config.h compat_getsubopt.o: compat_getsubopt.c config.h compat_isblank.o: compat_isblank.c config.h compat_mkdtemp.o: compat_mkdtemp.c config.h -compat_ohash.o: compat_ohash.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h compat_progname.o: compat_progname.c config.h compat_reallocarray.o: compat_reallocarray.c config.h compat_strcasestr.o: compat_strcasestr.c config.h @@ -20,9 +20,9 @@ compat_vasprintf.o: compat_vasprintf.c c dba.o: dba.c mandoc_aux.h mansearch.h dba_write.h dba_array.h dba.h dba_array.o: dba_array.c mandoc_aux.h dba_write.h dba_array.h dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_array.h dba.h dbm.h -dba_write.o: dba_write.c dba_write.h -dbm.o: dbm.c mansearch.h dbm_map.h dbm.h -dbm_map.o: dbm_map.c mansearch.h dbm_map.h dbm.h +dba_write.o: dba_write.c config.h dba_write.h +dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h +dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h demandoc.o: demandoc.c config.h roff.h man.h mdoc.h mandoc.h eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h @@ -39,10 +39,10 @@ man_validate.o: man_validate.c config.h mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h -mandocdb.o: mandocdb.c config.h mandoc_aux.h mandoc_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h +mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h manpage.o: manpage.c config.h manconf.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h -mansearch.o: mansearch.c mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h +mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h @@ -59,7 +59,7 @@ read.o: read.c config.h mandoc_aux.h man roff.o: roff.c config.h mandoc.h mandoc_aux.h roff.h libmandoc.h roff_int.h libroff.h predefs.in soelim.o: soelim.c config.h compat_stringlist.h st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in -tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h tag.h +tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv