Port to platforms lacking test -a and -o

* configure.ac (HAVE_LIBXML2):
* lisp/Makefile.in (compile-clean):
* lisp/net/tramp-sh.el (tramp-find-executable):
Prefer '&&' and '||' to 'test -a' and 'test -o'.
This commit is contained in:
Paul Eggert 2015-02-08 16:00:17 -08:00
parent 7d631aa0ff
commit 5c20aa7486
5 changed files with 20 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2015-02-08 Paul Eggert <eggert@cs.ucla.edu>
Port to platforms lacking test -a and -o
* configure.ac (HAVE_LIBXML2):
Prefer '&&' and '||' to 'test -a' and 'test -o'.
2015-02-08 Ulrich Müller <ulm@gentoo.org>
* configure.ac (--with-gameuser): Default to 'games' group instead

View file

@ -3491,7 +3491,7 @@ if test "${with_xml2}" != "no"; then
### I'm not sure what the version number should be, so I just guessed.
EMACS_CHECK_MODULES([LIBXML2], [libxml-2.0 > 2.6.17])
# Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
if test "${HAVE_LIBXML2}" != "yes" && test "$opsys" = "darwin"; then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
AC_CHECK_HEADER(libxml/HTMLparser.h,
@ -4508,10 +4508,10 @@ if test $emacs_cv_func_sigsetjmp = yes; then
fi
# We need all of these features to handle C stack overflows.
if test "$ac_cv_header_sys_resource_h" = "yes" -a \
"$ac_cv_func_getrlimit" = "yes" -a \
"$emacs_cv_func_sigsetjmp" = "yes" -a \
"$emacs_cv_alternate_stack" = yes; then
if test "$ac_cv_header_sys_resource_h" = "yes" &&
test "$ac_cv_func_getrlimit" = "yes" &&
test "$emacs_cv_func_sigsetjmp" = "yes" &&
test "$emacs_cv_alternate_stack" = yes; then
AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1,
[Define to 1 if C stack overflow can be handled in some cases.])
fi

View file

@ -1,3 +1,10 @@
2015-02-08 Paul Eggert <eggert@cs.ucla.edu>
Port to platforms lacking test -a and -o
* Makefile.in (compile-clean):
* net/tramp-sh.el (tramp-find-executable):
Prefer '&&' and '||' to 'test -a' and 'test -o'.
2015-02-08 Artur Malabarba <bruce.connor.am@gmail.com>
* newcomment.el (comment-line): Fix missing paren.

View file

@ -324,7 +324,7 @@ compile-clean:
@cd $(lisp) && $(setwins); \
elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \
for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \
if test -f "$$el" -o \! -f "$${el}c"; then :; else \
if test -f "$$el" || test ! -f "$${el}c"; then :; else \
echo rm "$${el}c"; \
rm "$${el}c"; \
fi \

View file

@ -3796,7 +3796,7 @@ This function expects to be in the right *tramp* buffer."
(tramp-send-command
vec
(format (concat "while read d; "
"do if test -x $d/%s -a -f $d/%s; "
"do if test -x $d/%s && test -f $d/%s; "
"then echo tramp_executable $d/%s; "
"break; fi; done <<'%s'\n"
"%s\n%s")