Mercurial > hg > octave-kai > gnulib-hg
diff m4/sys_stat_h.m4 @ 9954:0f61f5040489
Fix compilation errors related to rpl_mkdir on mingw.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 21 Apr 2008 23:57:39 +0200 (2008-04-21) |
parents | 6c1b311583d7 |
children | 3eb22f9808e0 |
line wrap: on
line diff
--- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -1,4 +1,4 @@ -# sys_stat_h.m4 serial 7 -*- Autoconf -*- +# sys_stat_h.m4 serial 8 -*- Autoconf -*- dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,6 +9,8 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], [ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + dnl Check for lstat. Systems that lack it (mingw) also lack symlinks, so dnl stat is a good replacement. AC_CHECK_FUNCS_ONCE([lstat]) @@ -19,24 +21,7 @@ fi AC_SUBST([HAVE_LSTAT]) - dnl Check for mkdir. Mingw has _mkdir(name) in the nonstandard <io.h> - dnl instead. - AC_CHECK_DECLS([mkdir], - [], - [AC_CHECK_HEADERS([io.h])], - [#include <sys/stat.h>]) - if test $ac_cv_have_decl_mkdir = yes; then - HAVE_DECL_MKDIR=1 - else - HAVE_DECL_MKDIR=0 - fi - AC_SUBST([HAVE_DECL_MKDIR]) - if test "$ac_cv_header_io_h" = yes; then - HAVE_IO_H=1 - else - HAVE_IO_H=0 - fi - AC_SUBST([HAVE_IO_H]) + dnl For the mkdir substitute. AC_REQUIRE([AC_C_INLINE]) dnl Check for broken stat macros. @@ -55,3 +40,16 @@ #include <sys/stat.h>]) ]) # gl_HEADER_SYS_STAT_H + +AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 +]) + +AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], +[ + dnl Assume proper GNU behavior unless another module says otherwise. + REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) +])