unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#29001: [wishlist] configure option to disable tmpnam
@ 2017-10-26  0:26 Matt Wette
  2017-10-27 18:14 ` bug#29001: tmpnam option Matt Wette
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Matt Wette @ 2017-10-26  0:26 UTC (permalink / raw)
  To: 29001

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

It would be nice to have a configure option to disable/enable including the POSIX function tmpnam.
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
knowledge and skills are lacking. 

Here is what I tried (THIS DOES NOT WORK)

--- 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
 


[-- Attachment #2: Type: text/html, Size: 9360 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-22 17:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26  0:26 bug#29001: [wishlist] configure option to disable tmpnam Matt Wette
2017-10-27 18:14 ` bug#29001: tmpnam option Matt Wette
2020-03-18 23:48 ` bug#29001: tmpnam Matt Wette
2020-03-19  0:30   ` Matt Wette
2020-03-21 20:22 ` bug#29001: --disable-tmpnam Matt Wette
2020-03-21 21:32   ` Ludovic Courtès
2020-03-21 20:25 ` bug#29001: patch Matt Wette
2020-03-22 16:20 ` bug#29001: git patch Matt Wette
2020-03-22 17:11   ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).