=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.49.2.6 retrieving revision 1.49.2.9 diff -u -p -r1.49.2.6 -r1.49.2.9 --- mandoc/mandocdb.c 2013/10/01 00:52:58 1.49.2.6 +++ mandoc/mandocdb.c 2013/10/10 23:43:04 1.49.2.9 @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.49.2.6 2013/10/01 00:52:58 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.49.2.9 2013/10/10 23:43:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012 Ingo Schwarze @@ -34,20 +34,23 @@ #include #include -#if defined(__linux__) || defined(__sun) +#if defined(__APPLE__) +# include +#elif defined(__linux__) # include +#elif defined(__sun) +# include +# include +#else +# include +#endif + +#if defined(__linux__) || defined(__sun) # include -#elif defined(__APPLE__) -# include -# include #else # include #endif -#if defined(__sun) -#include -#endif - #include "man.h" #include "mdoc.h" #include "mandoc.h" @@ -619,6 +622,8 @@ index_merge(const struct of *of, struct mparse *mp, uint64_t vbuf[2]; char type; + static char emptystring[] = ""; + if (warnings) { files = NULL; hash_reset(&files); @@ -737,7 +742,7 @@ index_merge(const struct of *of, struct mparse *mp, val.data = NULL; val.size = 0; if (0 == skip) - val.data = ""; + val.data = emptystring; else { ch = (*files->get)(files, &key, &val, 0); if (ch < 0) {