git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix minor nits in configure.ac
@ 2007-11-06 20:12 Ralf Wildenhues
  0 siblings, 0 replies; only message in thread
From: Ralf Wildenhues @ 2007-11-06 20:12 UTC (permalink / raw)
  To: git

Avoid "test -o" as it is only XSI not POSIX, and not portable.
Avoid exit(3) in test programs in favor of return, to accommodate
for newer Autoconf not providing a declaration for exit.
---

The missing declaration can cause needlessly wrong configure results
with some CFLAGS.

Cheers,
Ralf

 configure.ac |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ed7cc89..bd80517 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,7 @@ fi \
 AC_ARG_WITH([lib],
  [AS_HELP_STRING([--with-lib=ARG],
                  [ARG specifies alternative name for lib directory])],
- [if test "$withval" = "no" -o "$withval" = "yes"; then \
+ [if test "$withval" = "no" || test "$withval" = "yes"; then \
 	AC_MSG_WARN([You should provide name for --with-lib=ARG]); \
 else \
 	GIT_CONF_APPEND_LINE(lib=$withval); \
@@ -245,9 +245,9 @@ AC_RUN_IFELSE(
 	[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
 		[[char buf[64];
 		if (sprintf(buf, "%lld%hhd%jd%zd%td", (long long int)1, (char)2, (intmax_t)3, (size_t)4, (ptrdiff_t)5) != 5)
-		  exit(1);
+		  return 1;
 		else if (strcmp(buf, "12345"))
-		  exit(2);]])],
+		  return 2;]])],
 	[ac_cv_c_c99_format=yes],
 	[ac_cv_c_c99_format=no])
 ])
-- 
1.5.3.5.561.g140d

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-06 20:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06 20:12 [PATCH] Fix minor nits in configure.ac Ralf Wildenhues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).