guile-user
[Top][All Lists]
Advanced

[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 1.4.1.119, this will be provided by libguile
directly.[1]

According to tmpfile(3), this function is:

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

What do you think?

thi

_________________________________________________________________
[0] http://www.gnuvola.org/software/ttn-do/frisk.out.html

[1] libguile/posix.c excerpt:

SCM_SYMBOL (sym_tmpfile, "tmpfile");

SCM_DEFINE
(scm_tmpfile, "tmpfile", 0, 0, 0,
 (void),
 doc: /***********
Return an input/output port to a unique temporary file
named using the path prefix @code{P_tmpdir} defined in
@file{stdio.h}.
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)
    SCM_SYSERROR;
  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]