projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chdir-long: Move AC_LIBOBJ invocations to module description.
[gnulib.git]
/
m4
/
tmpfile.m4
diff --git
a/m4/tmpfile.m4
b/m4/tmpfile.m4
index
37e6aaa
..
2919806
100644
(file)
--- a/
m4/tmpfile.m4
+++ b/
m4/tmpfile.m4
@@
-1,12
+1,13
@@
-# Check whether to use a replacement tmpfile() function.
-
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+# tmpfile.m4 serial 1
+# Copyright (C) 2007, 2009-2011 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.
# Written by Ben Pfaff.
# 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.
# Written by Ben Pfaff.
+# Check whether to use a replacement tmpfile() function.
+
# The native Windows tmpfile function always tries to put the temporary
# file in the root directory. (This behaviour is even documented in
# Microsoft's documentation!) This often fails for ordinary users who
# The native Windows tmpfile function always tries to put the temporary
# file in the root directory. (This behaviour is even documented in
# Microsoft's documentation!) This often fails for ordinary users who
@@
-17,7
+18,8
@@
# directory, even though tmpfile wouldn't work in general. Instead,
# just test for a Windows platform (excluding Cygwin).
# directory, even though tmpfile wouldn't work in general. Instead,
# just test for a Windows platform (excluding Cygwin).
-AC_DEFUN([gl_TMPFILE], [
+AC_DEFUN([gl_FUNC_TMPFILE], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_CACHE_CHECK([whether tmpfile should be overridden],
[gl_cv_func_tmpfile_unusable],
[AC_EGREP_CPP([choke me], [
AC_CACHE_CHECK([whether tmpfile should be overridden],
[gl_cv_func_tmpfile_unusable],
[AC_EGREP_CPP([choke me], [
@@
-28,9
+30,8
@@
choke me
[gl_cv_func_tmpfile_unusable=yes],
[gl_cv_func_tmpfile_unusable=no])])
if test $gl_cv_func_tmpfile_unusable = yes; then
[gl_cv_func_tmpfile_unusable=yes],
[gl_cv_func_tmpfile_unusable=no])])
if test $gl_cv_func_tmpfile_unusable = yes; then
+ REPLACE_TMPFILE=1
AC_LIBOBJ([tmpfile])
AC_LIBOBJ([tmpfile])
- AC_DEFINE([tmpfile], [rpl_tmpfile],
- [Define to rpl_tmpfile if the replacement function should be used.])
gl_PREREQ_TMPFILE
fi
])
gl_PREREQ_TMPFILE
fi
])