summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-12-03 13:55:44 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-12-03 13:56:16 -0800
commit9735fed1435718597d86f11251c8289de97a91c5 (patch)
treec2b3314ea1ba0b17f8344b3fdb3784bd318eee94
parent7c3f05cf6ccf4d6cad71f93f5b7dbef2d4b7ef78 (diff)
downloadcoreutils-9735fed1435718597d86f11251c8289de97a91c5.tar.xz
build: port to Studio C on Solaris 12
Reported by Rich Burridge in: http://bugs.gnu.org/22087 * configure.ac (HAVE_UT_HOST, HAVE_C_LINE, stdbuf): Pacify picky compilers that complain about unreachable statements.
-rw-r--r--configure.ac21
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 66c8cbe16..a5c4e41c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -354,7 +354,9 @@ coreutils_DUMMY_1
AC_MSG_CHECKING([ut_host in struct utmp])
AC_CACHE_VAL([su_cv_func_ut_host_in_utmp],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <utmp.h>]], [[struct utmp ut; return !sizeof ut.ut_host;]])],
+ #include <utmp.h>
+ struct utmp ut;
+ int s = sizeof ut.ut_host;]])],
[su_cv_func_ut_host_in_utmp=yes],
[su_cv_func_ut_host_in_utmp=no])])
AC_MSG_RESULT([$su_cv_func_ut_host_in_utmp])
@@ -367,7 +369,9 @@ if test -z "$have_ut_host"; then
AC_MSG_CHECKING([ut_host in struct utmpx])
AC_CACHE_VAL([su_cv_func_ut_host_in_utmpx],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <utmpx.h>]], [[struct utmpx ut; return !sizeof ut.ut_host;]])],
+ #include <utmpx.h>
+ struct utmpx ut;
+ int s = sizeof ut.ut_host;]])],
[su_cv_func_ut_host_in_utmpx=yes],
[su_cv_func_ut_host_in_utmpx=no])])
AC_MSG_RESULT([$su_cv_func_ut_host_in_utmpx])
@@ -404,10 +408,12 @@ yes
AC_MSG_CHECKING([c_line in struct termios])
AC_CACHE_VAL([su_cv_sys_c_line_in_termios],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if TERMIOS_NEEDS_XOPEN_SOURCE
-#define _XOPEN_SOURCE
-#endif
-#include <sys/types.h>
-#include <termios.h>]], [[struct termios t; return !sizeof t.c_line;]])],
+ #define _XOPEN_SOURCE
+ #endif
+ #include <sys/types.h>
+ #include <termios.h>
+ struct termios t;
+ int s = sizeof t.c_line;]])],
[su_cv_sys_c_line_in_termios=yes],
[su_cv_sys_c_line_in_termios=no])])
AC_MSG_RESULT([$su_cv_sys_c_line_in_termios])
@@ -475,7 +481,8 @@ AC_LINK_IFELSE(
{
stdbuf = 1;
}]],[[
- return !(stdbuf == 1);]])
+ if (stdbuf != 1)
+ return 1;]])
],
[stdbuf_supported=yes])
AC_MSG_RESULT([$stdbuf_supported])