Mercurial > hg > octave-jordi > gnulib-hg
diff m4/tmpfile.m4 @ 13137:fd3c9fa89efe
tmpfile: Fix C++ test error on mingw.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 04 Apr 2010 15:37:40 +0200 |
parents | c2cbabec01dd |
children | 0ea8feb1eb60 |
line wrap: on
line diff
--- a/m4/tmpfile.m4 +++ b/m4/tmpfile.m4 @@ -1,5 +1,4 @@ -# Check whether to use a replacement tmpfile() function. - +# tmpfile.m4 serial 1 # Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7,6 +6,8 @@ # 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 @@ -18,6 +19,7 @@ # just test for a Windows platform (excluding Cygwin). AC_DEFUN([gl_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], [ @@ -28,9 +30,8 @@ [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_DEFINE([tmpfile], [rpl_tmpfile], - [Define to rpl_tmpfile if the replacement function should be used.]) gl_PREREQ_TMPFILE fi ])