X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftmpfile.m4;h=11cbedaa4b492005f602fe378726f4f272448692;hb=a02ba4bf889fee4622db87f185c3d0af84d74ae7;hp=8a5c145e6f0af0893098ee8a1c4583108d7fe3a5;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/m4/tmpfile.m4 b/m4/tmpfile.m4 index 8a5c145e6..11cbedaa4 100644 --- a/m4/tmpfile.m4 +++ b/m4/tmpfile.m4 @@ -1,12 +1,13 @@ -# Check whether to use a replacement tmpfile() function. - -# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. +# tmpfile.m4 serial 2 +# Copyright (C) 2007, 2009-2012 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. +# 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 @@ -17,7 +18,8 @@ # 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], [ @@ -28,10 +30,7 @@ choke me [gl_cv_func_tmpfile_unusable=yes], [gl_cv_func_tmpfile_unusable=no])]) if test $gl_cv_func_tmpfile_unusable = yes; then - AC_LIBOBJ([tmpfile]) - AC_DEFINE([tmpfile], [rpl_tmpfile], - [Define to rpl_tmpfile if the replacement function should be used.]) - gl_PREREQ_TMPFILE + REPLACE_TMPFILE=1 fi ])