[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
!have mkstemp
From: |
Golubev I. N. |
Subject: |
!have mkstemp |
Date: |
Fri, 01 Jun 2001 13:43:04 (GMT) |
`mkstemp' is BSD-ish and not present on all platforms. The obvious
solution is just not to make scheme bindings to it (patch below).
Since `mkstemp' implementation should be highly portable (require
nothing beyond posix), it may be reasonable to take one from gnu libc
and do AC_REPLACE_FUNC.
--- configure.in 2001/06/01 05:04:52 1.151
+++ configure.in 2001/06/01 13:31:28
@@ -227,7 +227,7 @@
AC_SUBST(LIBLTDL)
AC_SUBST(DLPREOPEN)
-AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir
mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid
setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp
tcsetpgrp times uname waitpid strdup system usleep atexit on_exit)
+AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir
mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid
setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp
tcsetpgrp times uname waitpid strdup system usleep atexit on_exit mkstemp)
AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass
sethostname gethostname)
--- libguile/posix.c 2001/05/24 00:50:47 1.90
+++ libguile/posix.c 2001/06/01 13:31:36
@@ -1052,6 +1052,7 @@
#endif
+#ifdef HAVE_MKSTEMP
SCM_DEFINE (scm_mkstemp, "mkstemp!", 1, 0, 0,
(SCM tmpl),
"Create a new unique file in the file system and returns a new\n"
@@ -1072,6 +1073,7 @@
return scm_fdes_to_port (rv, "w+", tmpl);
}
#undef FUNC_NAME
+#endif /* HAVE_MKSTEMP */
SCM_DEFINE (scm_utime, "utime", 1, 2, 0,
- !have mkstemp,
Golubev I. N. <=