It may give Guile a more "code secure" option to have the default be disabled.
I tried to generate a patch, but I could not get it to work both ways (disable and enable). My autoconf
--- libguile/posix.c-orig 2017-10-24 05:28:30.000000000 -0700
+++ libguile/posix.c 2017-10-24 05:28:51.000000000 -0700
@@ -1557,6 +1557,7 @@
}
#undef FUNC_NAME
+#ifdef ENABLE_TMPNAM
#ifdef L_tmpnam
SCM_DEFINE (scm_tmpnam, "tmpnam", 0, 0, 0,
@@ -1580,6 +1581,7 @@
#undef FUNC_NAME
#endif
+#endif
SCM_DEFINE (scm_tmpfile, "tmpfile", 0, 0, 0,
(void),
--- configure.ac-orig 2017-10-24 05:21:56.000000000 -0700
+++ configure.ac 2017-10-25 16:07:34.000000000 -0700
@@ -164,6 +164,10 @@
[ --disable-regex omit regular expression interfaces],,
enable_regex=yes)
+AC_ARG_ENABLE(tmpnam,
+ [ --enable-tmpnam enable POSIX tmpnam],
+ enable_tmpnam=yes, enable_tmpnam=no)
+
AC_ARG_ENABLE([deprecated],
AS_HELP_STRING([--disable-deprecated],[omit deprecated features]))
^--- DOES NOT WORK