comparison m4/rmdir-errno.m4 @ 5813:6962b5c5069f

Merge from coreutils.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 02 May 2005 07:00:50 +0000
parents 87c42e194f4a
children 3d99d01160aa
comparison
equal deleted inserted replaced
5812:b5145e612254 5813:6962b5c5069f
1 #serial 4 1 #serial 5
2 2
3 # Copyright (C) 2000, 2001, Free Software Foundation, Inc. 3 # Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation 4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it, 5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved. 6 # with or without modifications, as long as this notice is preserved.
7 7
8 # When rmdir fails because the specified directory is not empty, it sets 8 # When rmdir fails because the specified directory is not empty, it sets
9 # errno to some value, usually ENOTEMPTY. However, on some AIX systems, 9 # errno to some value, usually ENOTEMPTY. However, on some AIX systems,
10 # ENOTEMPTY is mistakenly defined to be EEXIST. To work around this, and 10 # ENOTEMPTY is mistakenly defined to be EEXIST. To work around this, and
11 # in general, to avoid depending on the use of any particular symbol, this 11 # in general, to avoid depending on the use of any particular symbol, this
12 # test runs a test to determine the actual numeric value. 12 # test runs a test to determine the actual numeric value.
13 AC_DEFUN([fetish_FUNC_RMDIR_NOTEMPTY], 13 AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
14 [dnl 14 [dnl
15 AC_CACHE_CHECK([for rmdir-not-empty errno value], 15 AC_CACHE_CHECK([for rmdir-not-empty errno value],
16 fetish_cv_func_rmdir_errno_not_empty, 16 gl_cv_func_rmdir_errno_not_empty,
17 [ 17 [
18 # Arrange for deletion of the temporary directory this test creates. 18 # Arrange for deletion of the temporary directory this test creates.
19 ac_clean_files="$ac_clean_files confdir2" 19 ac_clean_files="$ac_clean_files confdir2"
20 mkdir confdir2; : > confdir2/file 20 mkdir confdir2; : > confdir2/file
21 AC_TRY_RUN([ 21 AC_TRY_RUN([
33 s = fopen ("confdir2/errno", "w"); 33 s = fopen ("confdir2/errno", "w");
34 fprintf (s, "%d\n", val); 34 fprintf (s, "%d\n", val);
35 exit (0); 35 exit (0);
36 } 36 }
37 ], 37 ],
38 fetish_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`, 38 gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`,
39 fetish_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4', 39 gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4',
40 fetish_cv_func_rmdir_errno_not_empty=ENOTEMPTY 40 gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY
41 ) 41 )
42 ] 42 ]
43 ) 43 )
44 44
45 AC_DEFINE_UNQUOTED([RMDIR_ERRNO_NOT_EMPTY], 45 AC_DEFINE_UNQUOTED([RMDIR_ERRNO_NOT_EMPTY],
46 $fetish_cv_func_rmdir_errno_not_empty, 46 $gl_cv_func_rmdir_errno_not_empty,
47 [the value to which errno is set when rmdir fails on a nonempty directory]) 47 [the value to which errno is set when rmdir fails on a nonempty directory])
48 ]) 48 ])