]> diplodocus.org Git - nmh/commitdiff
sbr/m_mktemp.h: Create with missing prototypes.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 13:40:52 +0000 (14:40 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 13:40:52 +0000 (14:40 +0100)
Some of sbr/m_mktemp.c's functions didn't have prototypes in a header
file so callers were declaring prototypes themselves.  Have them include
the new header file instead.

Makefile.am
sbr/m_mktemp.c
sbr/m_mktemp.h [new file with mode: 0644]
sbr/signals.c
sbr/utils.c

index 38fc3e7..7a89468 100644 (file)
@@ -358,6 +358,7 @@ noinst_HEADERS = \
     h/utils.h \
     mts/smtp/smtp.h \
     sbr/ctype-checked.h \
+    sbr/m_mktemp.h \
     thirdparty/jsmn/jsmn.h \
     uip/mhfree.h \
     #
index 338302c..5681044 100644 (file)
@@ -8,6 +8,7 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/signals.h>
+#include "m_mktemp.h"
 
 static void register_for_removal(const char *);
 
diff --git a/sbr/m_mktemp.h b/sbr/m_mktemp.h
new file mode 100644 (file)
index 0000000..dbc614f
--- /dev/null
@@ -0,0 +1,9 @@
+/* m_mktemp.h -- Construct a temporary file.
+ *
+ * This code is Copyright (c) 2017, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
+ */
+
+void remove_registered_files_atexit(void);
+void remove_registered_files(int sig);
index 97ac780..accb695 100644 (file)
@@ -7,9 +7,7 @@
 
 #include <h/mh.h>
 #include <h/signals.h>
-
-/* sbr/m_mktemp.c */
-extern void remove_registered_files(int);
+#include "m_mktemp.h"
 
 
 /*
index 7abf8e6..e072514 100644 (file)
@@ -8,11 +8,9 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/signals.h>
+#include "m_mktemp.h"
 #include <fcntl.h>
 
-/* sbr/m_mktemp.c */
-extern void remove_registered_files_atexit(void);
-
 extern char *mhdocdir;
 
 /* plurals gives the letter ess to indicate a plural noun, or an empty