@matheusbsbs / matheus-bagliano / commits / 3c307bfbe8
Fork 0

Fix minor nits in configure.ac

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. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ralf Wildenhues committed Nov 6, 2007 at 21:12 UTC 3c307bfbe8f8f9223c9b3cef8fdf2fabd05cda6d
1 file changed +3 -3
configure.ac
+3 -3
@@ -73,7 +73,7 @@ fi \
73 AC_ARG_WITH([lib],
74 [AS_HELP_STRING([--with-lib=ARG],
75 [ARG specifies alternative name for lib directory])],
76 - [if test "$withval" = "no" -o "$withval" = "yes"; then \
76 + [if test "$withval" = "no" || test "$withval" = "yes"; then \
77 AC_MSG_WARN([You should provide name for --with-lib=ARG]); \
78 else \
79 GIT_CONF_APPEND_LINE(lib=$withval); \
@@ -245,9 +245,9 @@ AC_RUN_IFELSE(
245 [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
246 [[char buf[64];
247 if (sprintf(buf, "%lld%hhd%jd%zd%td", (long long int)1, (char)2, (intmax_t)3, (size_t)4, (ptrdiff_t)5) != 5)
248 - exit(1);
248 + return 1;
249 else if (strcmp(buf, "12345"))
250 - exit(2);]])],
250 + return 2;]])],
251 [ac_cv_c_c99_format=yes],
252 [ac_cv_c_c99_format=no])
253 ])