[Top][All Lists]

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

request tmpfile(3) wrapping in Guile 1.9 libguile

From: Thien-Thi Nguyen
Subject: request tmpfile(3) wrapping in Guile 1.9 libguile
Date: Sun, 07 Feb 2010 19:48:00 +0100

I'm writing to request that tmpfile(3) be added to Guile 1.9 libguile.

Background info: I'm in the process of cleaning up ttn-do dependency on Guile
1.4.x-isms[0].  One of these is the module (database tmpfile), which provides
tmpfile(3) wrapping.  In Guile, this will be provided by libguile

According to tmpfile(3), this function is:

       SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001.

What do you think?



[1] libguile/posix.c excerpt:

SCM_SYMBOL (sym_tmpfile, "tmpfile");

(scm_tmpfile, "tmpfile", 0, 0, 0,
 doc: /***********
Return an input/output port to a unique temporary file
named using the path prefix @code{P_tmpdir} defined in
The file is automatically deleted when the port is closed
or the program terminates.

The name of the temporary file associated with the returned
port is not available to Scheme programs;
@code{(port-filename (tmpfile))} always returns the
symbol @code{tmpfile}.  */)
#define FUNC_NAME s_scm_tmpfile
  FILE *rv;

  rv = tmpfile ();
  if (! rv)
  return scm_fdes_to_port (fileno (rv), "w+", sym_tmpfile);
#undef FUNC_NAME

reply via email to

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