1 From c536d89fc497f90464de61c5b4207d103dfbad08 Mon Sep 17 00:00:00 2001 |
|
2 From: Paul Eggert <[email protected]> |
|
3 Date: Thu, 3 Dec 2015 13:55:44 -0800 |
|
4 Subject: [PATCH] build: port to Studio C on Solaris 12 |
|
5 |
|
6 Reported by Rich Burridge in: http://bugs.gnu.org/22087 |
|
7 * configure.ac (HAVE_UT_HOST, HAVE_C_LINE, stdbuf): |
|
8 Pacify picky compilers that complain about unreachable statements. |
|
9 --- |
|
10 configure.ac | 21 ++++++++++++++------- |
|
11 1 file changed, 14 insertions(+), 7 deletions(-) |
|
12 |
|
13 diff --git configure.ac configure.ac |
|
14 index 66c8cbe..a5c4e41 100644 |
|
15 --- configure.ac |
|
16 +++ configure.ac |
|
17 @@ -354,7 +354,9 @@ coreutils_DUMMY_1 |
|
18 AC_MSG_CHECKING([ut_host in struct utmp]) |
|
19 AC_CACHE_VAL([su_cv_func_ut_host_in_utmp], |
|
20 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
21 -#include <utmp.h>]], [[struct utmp ut; return !sizeof ut.ut_host;]])], |
|
22 + #include <utmp.h> |
|
23 + struct utmp ut; |
|
24 + int s = sizeof ut.ut_host;]])], |
|
25 [su_cv_func_ut_host_in_utmp=yes], |
|
26 [su_cv_func_ut_host_in_utmp=no])]) |
|
27 AC_MSG_RESULT([$su_cv_func_ut_host_in_utmp]) |
|
28 @@ -367,7 +369,9 @@ if test -z "$have_ut_host"; then |
|
29 AC_MSG_CHECKING([ut_host in struct utmpx]) |
|
30 AC_CACHE_VAL([su_cv_func_ut_host_in_utmpx], |
|
31 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
32 -#include <utmpx.h>]], [[struct utmpx ut; return !sizeof ut.ut_host;]])], |
|
33 + #include <utmpx.h> |
|
34 + struct utmpx ut; |
|
35 + int s = sizeof ut.ut_host;]])], |
|
36 [su_cv_func_ut_host_in_utmpx=yes], |
|
37 [su_cv_func_ut_host_in_utmpx=no])]) |
|
38 AC_MSG_RESULT([$su_cv_func_ut_host_in_utmpx]) |
|
39 @@ -404,10 +408,12 @@ yes |
|
40 AC_MSG_CHECKING([c_line in struct termios]) |
|
41 AC_CACHE_VAL([su_cv_sys_c_line_in_termios], |
|
42 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if TERMIOS_NEEDS_XOPEN_SOURCE |
|
43 -#define _XOPEN_SOURCE |
|
44 -#endif |
|
45 -#include <sys/types.h> |
|
46 -#include <termios.h>]], [[struct termios t; return !sizeof t.c_line;]])], |
|
47 + #define _XOPEN_SOURCE |
|
48 + #endif |
|
49 + #include <sys/types.h> |
|
50 + #include <termios.h> |
|
51 + struct termios t; |
|
52 + int s = sizeof t.c_line;]])], |
|
53 [su_cv_sys_c_line_in_termios=yes], |
|
54 [su_cv_sys_c_line_in_termios=no])]) |
|
55 AC_MSG_RESULT([$su_cv_sys_c_line_in_termios]) |
|
56 @@ -475,7 +481,8 @@ AC_LINK_IFELSE( |
|
57 { |
|
58 stdbuf = 1; |
|
59 }]],[[ |
|
60 - return !(stdbuf == 1);]]) |
|
61 + if (stdbuf != 1) |
|
62 + return 1;]]) |
|
63 ], |
|
64 [stdbuf_supported=yes]) |
|
65 AC_MSG_RESULT([$stdbuf_supported]) |
|
66 -- |
|
67 2.1.0 |
|
68 |
|