=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.52 retrieving revision 1.54 diff -u -p -r1.52 -r1.54 --- mandoc/mandocdb.c 2012/06/08 15:06:28 1.52 +++ mandoc/mandocdb.c 2012/06/09 11:21:12 1.54 @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.52 2012/06/08 15:06:28 kristaps Exp $ */ +/* $Id: mandocdb.c,v 1.54 2012/06/09 11:21:12 kristaps Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012 Ingo Schwarze @@ -34,7 +34,11 @@ #include #include +#ifdef HAVE_OHASH #include +#else +#include "compat_ohash.h" +#endif #include #include "mdoc.h" @@ -327,6 +331,7 @@ main(int argc, char *argv[]) { char cwd[MAXPATHLEN]; int ch, rc, fd, i; + unsigned int index; size_t j, sz; const char *dir; struct str *s; @@ -504,7 +509,9 @@ main(int argc, char *argv[]) * turn off synchronous mode for much better * performance. */ +#ifndef __APPLE__ SQL_EXEC("PRAGMA synchronous = OFF"); +#endif if (0 == ofmerge(mc, mp, dirs.paths[j])) goto out; @@ -521,8 +528,8 @@ out: manpath_free(&dirs); mchars_free(mc); mparse_free(mp); - for (s = ohash_first(&strings, &ch); - NULL != s; s = ohash_next(&strings, &ch)) { + for (s = ohash_first(&strings, &index); + NULL != s; s = ohash_next(&strings, &index)) { if (s->utf8 != s->key) free(s->utf8); free(s);