m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/modules/gnu.c,v


From: Eric Blake
Subject: Changes to m4/modules/gnu.c,v
Date: Sat, 21 Oct 2006 22:15:53 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/10/21 22:15:52

Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- modules/gnu.c       13 Oct 2006 16:46:47 -0000      1.64
+++ modules/gnu.c       21 Oct 2006 22:15:52 -0000      1.65
@@ -55,6 +55,7 @@
   BUILTIN (esyscmd,    false,  true,   true,   1,      1  )    \
   BUILTIN (format,     false,  true,   false,  1,      -1 )    \
   BUILTIN (indir,      true,   true,   false,  1,      -1 )    \
+  BUILTIN (mkdtemp,    false,  true,   false,  1,      1  )    \
   BUILTIN (patsubst,   false,  true,   true,   2,      4  )    \
   BUILTIN (regexp,     false,  true,   true,   2,      4  )    \
   BUILTIN (renamesyms, false,  true,   false,  2,      3  )    \
@@ -570,6 +571,22 @@
 }
 
 
+/* The builtin "mkdtemp" allows creation of temporary directories.  */
+
+/**
+ * mkdtemp(TEMPLATE)
+ **/
+M4BUILTIN_HANDLER (mkdtemp)
+{
+  M4_MODULE_IMPORT (m4, m4_make_temp);
+
+  if (m4_make_temp)
+    m4_make_temp (context, obs, M4ARG (0), M4ARG (1), true);
+  else
+    assert (!"Unable to import from m4 module");
+}
+
+
 /* Substitute all matches of a regexp occuring in a string.  Each match of
    the second argument (a regexp) in the first argument is changed to the
    third argument, with \& substituted by the matched text, and \N




reply via email to

[Prev in Thread] Current Thread [Next in Thread]