summaryrefslogtreecommitdiff
path: root/m4/tempname.m4
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2006-10-27 13:51:23 +0000
committerEric Blake <ebb9@byu.net>2006-10-27 13:51:23 +0000
commita8753bfd5b8e2d2d440febce6355fc719eb469b4 (patch)
tree0ad6728246a66e61caf6fbcacf347708dcfd7786 /m4/tempname.m4
parent7f6be5eeffbc0e1aa1fbcd44fef901f1178591bc (diff)
downloadgnulib-a8753bfd5b8e2d2d440febce6355fc719eb469b4.tar.gz
* MODULES.html.sh: Document tempname.
* modules/mkstemp (Depends-on): Add tempname, and drop transitive dependencies. (Files): Move lib/tempname.c... * modules/tempname: ...to this new module. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks. (gl_PREREQ_TEMPNAME): Move... * m4/tempname.m4: ...to this new file. * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h. * modules/sys_stat (Depends-on): Add stat-macros. * lib/stat_.h (includes): Pick up stat macros. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h> if stat macros are broken. * lib/tempname.c (includes): No need to include "stat-macros.h". (__gen_tempname) [!_LIBC]: Expose as gen_tempname. (direxists, __path_search) [!_LIBC]: Don't compile these in gnulib; the tmpdir module covers that. * lib/tempname.h: New file.
Diffstat (limited to 'm4/tempname.m4')
-rw-r--r--m4/tempname.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/tempname.m4 b/m4/tempname.m4
new file mode 100644
index 0000000000..cd0e442a4f
--- /dev/null
+++ b/m4/tempname.m4
@@ -0,0 +1,24 @@
+#serial 1
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
+# it as a public API, and provide it on systems that are lacking.
+AC_DEFUN([gl_FUNC_GEN_TEMPNAME],
+[
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+ AC_CHECK_FUNCS_ONCE([__gen_tempname])
+
+ AC_LIBOBJ([tempname])
+ gl_PREREQ_TEMPNAME
+])
+
+# Prerequisites of lib/tempname.c.
+AC_DEFUN([gl_PREREQ_TEMPNAME],
+[
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_CHECK_FUNCS_ONCE([gettimeofday])
+])