+2016-01-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ closedir, dirfd, opendir: port to OpenSolaris 5.10
+ * m4/closedir.m4 (gl_FUNC_CLOSEDIR):
+ * m4/dirfd.m4 (gl_FUNC_DIRFD):
+ * m4/opendir.m4 (gl_FUNC_OPENDIR):
+ Don't use ${word##pat} substitution, as it doesn't work in
+ OpenSolaris 5.10 /bin/sh. Problem reported by Assaf Gordon in:
+ http://bugs.gnu.org/22443#11
+
2016-01-23 Paul Eggert <eggert@cs.ucla.edu>
bootstrap: use American spelling
-# closedir.m4 serial 3
+# closedir.m4 serial 4
dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
fi
])
dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
- if test -z "${host_os##os2*}"; then
- if test $HAVE_OPENDIR = 1; then
- REPLACE_OPENDIR=1
- fi
- fi
+ case $host_os,$HAVE_OPENDIR in
+ os2,1)
+ REPLACE_OPENDIR=1;;
+ esac
])
-# serial 23 -*- Autoconf -*-
+# serial 24 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
# Use the replacement if we have no function or macro with that name,
# or if OS/2 kLIBC whose dirfd() does not work.
- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
- || test -z "${host_os##os2*}" ; then
- if test $ac_cv_have_decl_dirfd = yes; then
- # If the system declares dirfd already, let's declare rpl_dirfd instead.
+ # Replace only if the system declares dirfd already.
+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+ no,no,*,yes | *,*,os2*,yes)
REPLACE_DIRFD=1
AC_DEFINE([REPLACE_DIRFD], [1],
- [Define to 1 if gnulib's dirfd() replacement is used.])
- fi
- fi
+ [Define to 1 if gnulib's dirfd() replacement is used.]);;
+ esac
])
dnl Prerequisites of lib/dirfd.c.
-# opendir.m4 serial 3
+# opendir.m4 serial 4
dnl Copyright (C) 2011-2016 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 Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
dnl by gnulib.
- if test -z "${host_os##os2*}"; then
- if test $HAVE_OPENDIR = 1; then
- REPLACE_OPENDIR=1
- fi
- fi
+ case $host_os,$HAVE_OPENDIR in
+ os2*,1)
+ REPLACE_OPENDIR=1;;
+ esac
])