summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/manconfig.h1
-rw-r--r--lib/Makefile.am1
-rw-r--r--lib/tempfile.c2
-rw-r--r--lib/tempfile.h24
-rw-r--r--src/man.c1
5 files changed, 28 insertions, 1 deletions
diff --git a/include/manconfig.h b/include/manconfig.h
index 117a2b0c..634d5060 100644
--- a/include/manconfig.h
+++ b/include/manconfig.h
@@ -186,7 +186,6 @@ extern struct compression comp_list[];
#include "attribute.h"
#include "xalloc.h"
#include "xstrndup.h"
-NODISCARD extern char *create_tempdir (const char *template);
extern bool debug_level; /* shows whether -d issued */
extern void init_debug (void);
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 2f134f04..9cf68905 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -53,6 +53,7 @@ libman_la_SOURCES = \
security.c \
security.h \
tempfile.c \
+ tempfile.h \
util.c \
util.h \
wordfnmatch.c \
diff --git a/lib/tempfile.c b/lib/tempfile.c
index f1dfb688..f4a291c1 100644
--- a/lib/tempfile.c
+++ b/lib/tempfile.c
@@ -33,6 +33,8 @@
#include "manconfig.h"
+#include "tempfile.h"
+
static const char *path_search (void)
{
const char *dir = NULL;
diff --git a/lib/tempfile.h b/lib/tempfile.h
new file mode 100644
index 00000000..1a4a64ce
--- /dev/null
+++ b/lib/tempfile.h
@@ -0,0 +1,24 @@
+/* tempfile.h: interface to temporary directory creation
+ *
+ * Copyright (C) 2001-2022 Colin Watson.
+ *
+ * This file is part of man-db.
+ *
+ * man-db is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * man-db is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with man-db; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "attribute.h"
+
+NODISCARD extern char *create_tempdir (const char *template);
diff --git a/src/man.c b/src/man.c
index 9a80258e..26819136 100644
--- a/src/man.c
+++ b/src/man.c
@@ -93,6 +93,7 @@
#include "encodings.h"
#include "orderfiles.h"
#include "sandbox.h"
+#include "tempfile.h"
#include "util.h"
#include "mydbm.h"