aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tempname.h
diff options
context:
space:
mode:
authorPaul Eggert2015-02-20 23:31:17 -0800
committerPaul Eggert2015-02-20 23:32:45 -0800
commit066b17df681fabb40108d719086669957aebbc51 (patch)
tree27f9362ed6a6e68ef6b61925932f84bb1afb37b8 /lib/tempname.h
parent43fb42da8bd6851b5b22d2bbb5d2cd8ceede9c09 (diff)
downloademacs-066b17df681fabb40108d719086669957aebbc51.tar.gz
emacs-066b17df681fabb40108d719086669957aebbc51.zip
Merge from gnulib
* doc/misc/texinfo.tex: Update from gnulib. * lib/getdtablesize.c, lib/getopt.c, lib/signal.in.h, lib/tempname.c: * lib/tempname.h, m4/dup2.m4, m4/fcntl.m4, m4/getdtablesize.m4: Update from gnulib, incorporating: 2015-02-20 getdtablesize: port better for Android 2015-02-19 fcntl: Fix cross compiling 2015-02-18 dup2, fcntl: cross-compile better for Android 2015-02-18 getopt: don't crash on memory exhaustion 2015-02-17 tempname: allow compilation with C++ (trivial) 2015-02-17 dup2, fcntl: port to AIX 2015-02-16 getdtablesize, dup2, fcntl: port to Android 2015-02-11 getdtablesize, signal_h: Fix Android build 2015-02-11 maint: various whitespace cleanups in tempname
Diffstat (limited to 'lib/tempname.h')
-rw-r--r--lib/tempname.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tempname.h b/lib/tempname.h
index b560ee5cb14..e6093607463 100644
--- a/lib/tempname.h
+++ b/lib/tempname.h
@@ -32,6 +32,10 @@
32# define GT_NOCREATE 2 32# define GT_NOCREATE 2
33# endif 33# endif
34 34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
35/* Generate a temporary file name based on TMPL. TMPL must match the 39/* Generate a temporary file name based on TMPL. TMPL must match the
36 rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). 40 rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
37 The name constructed does not exist at the time of the call to 41 The name constructed does not exist at the time of the call to
@@ -47,4 +51,15 @@
47 We use a clever algorithm to get hard-to-predict names. */ 51 We use a clever algorithm to get hard-to-predict names. */
48extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); 52extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
49 53
54/* Similar to gen_tempname, but TRYFUNC is called for each temporary
55 name to try. If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME
56 returns with this value. Otherwise, if errno is set to EEXIST, another
57 name is tried, or else TRY_GEN_TEMPNAME returns -1. */
58extern int try_tempname (char *tmpl, int suffixlen, void *args,
59 int (*tryfunc) (char *, void *));
60
61#ifdef __cplusplus
62}
63#endif
64
50#endif /* GL_TEMPNAME_H */ 65#endif /* GL_TEMPNAME_H */