old-cross-binutils/gdb/gnulib/import/m4/rmdir.m4
Yao Qi 6a29c58ef8 Import rename module
This patch is to import rename module.

gdb:

2014-11-28  Yao Qi  <yao@codesourcery.com>

	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
	rename.
	* gnulib/aclocal.m4: Re-generated.
	* gnulib/config.in: Re-generated.
	* gnulib/configure: Re-generated.
	* gnulib/import/Makefile.am: Re-generated.
	* gnulib/import/Makefile.in: Re-generated.
	* gnulib/import/m4/gnulib-cache.m4: Re-generated.
	* gnulib/import/m4/gnulib-comp.m4: Re-generated.
	* import/basename-lgpl.c: New file.
	* import/dirname-lgpl.c: New file.
	* import/dirname.h: New file.
	* import/m4/dirname.m4: New file.
	* import/m4/malloc.m4: New file.
	* import/m4/rename.m4: New file.
	* import/m4/rmdir.m4: New file.
	* import/m4/stdio_h.m4: New file.
	* import/malloc.c: New file.
	* import/rename.c: New file.
	* import/rmdir.c: New file.
	* import/same-inode.h: New file.
	* import/stdio.c: New file.
	* import/stdio.in.h: New file.
	* import/stripslash.c: New file.
2014-11-28 18:38:21 +08:00

49 lines
1.5 KiB
Text

# rmdir.m4 serial 13
dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_RMDIR],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Detect cygwin 1.5.x bug.
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
[mkdir conftest.dir
touch conftest.file
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdio.h>
#include <errno.h>
#if HAVE_UNISTD_H
# include <unistd.h>
#else /* on Windows with MSVC */
# include <direct.h>
#endif
]], [[int result = 0;
if (!rmdir ("conftest.file/"))
result |= 1;
else if (errno != ENOTDIR)
result |= 2;
if (!rmdir ("conftest.dir/./"))
result |= 4;
return result;
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_rmdir_works="guessing no" ;;
esac
])
rm -rf conftest.dir conftest.file])
case "$gl_cv_func_rmdir_works" in
*yes) ;;
*)
REPLACE_RMDIR=1
;;
esac
])