[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5c20aa7: Port to platforms lacking test -a and -o
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 5c20aa7: Port to platforms lacking test -a and -o |
Date: |
Mon, 09 Feb 2015 00:01:03 +0000 |
branch: master
commit 5c20aa7486f9cb8871f40bca9ac5fee09caefca3
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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'.
---
ChangeLog | 6 ++++++
configure.ac | 10 +++++-----
lisp/ChangeLog | 7 +++++++
lisp/Makefile.in | 2 +-
lisp/net/tramp-sh.el | 2 +-
5 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 908ffe6..ab551e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-08 Paul Eggert <address@hidden>
+
+ 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 <address@hidden>
* configure.ac (--with-gameuser): Default to 'games' group instead
diff --git a/configure.ac b/configure.ac
index 192634b..6a5c73e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ad4f3b9..ce38131 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-08 Paul Eggert <address@hidden>
+
+ 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 <address@hidden>
* newcomment.el (comment-line): Fix missing paren.
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 7bf5386..e5cfc63 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -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 \
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9c8a222..45050cd 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -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")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 5c20aa7: Port to platforms lacking test -a and -o,
Paul Eggert <=