# Disable the current test if the working directory seems to have
# the setgid bit set.
-# Copyright (C) 2000, 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
setgid_tmpdir=setgid-$$
(umask 77; mkdir $setgid_tmpdir)
-p=`ls -ld $setgid_tmpdir|sed 's/ .*//'`
+perms=$(stat --printf %A $setgid_tmpdir)
rmdir $setgid_tmpdir
-case $p in
+case $perms in
drwx------);;
- drwx------+);;
- drwxr-xr-x);; # Windows98 + DJGPP 2.03 + fileutils-4.1 does this.
+ drwxr-xr-x);; # Windows98 + DJGPP 2.03
*) cwd_is_setgid=yes;;
esac
if test $cwd_is_setgid = yes; then