mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
ls: port to OpenBSD
Problem reported by Brian Callahan (Bug#50972). * src/ls.c (decode_switches): Don’t assume __GNUC_PREREQ.
This commit is contained in:
1 parent
0475ce9f84
commit
4cfd48481d
1 file changed
+2
-2
@@ -2273,7 +2273,7 @@ decode_switches (int argc, char **argv)
|
||||
if (linelen < 0)
|
||||
{
|
||||
/* Suppress bogus warning re comparing ws.ws_col to big integer. */
|
||||
# if __GNUC_PREREQ (4, 6)
|
||||
# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
||||
# endif
|
||||
@@ -2282,7 +2282,7 @@ decode_switches (int argc, char **argv)
|
||||
&& 0 <= ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws)
|
||||
&& 0 < ws.ws_col)
|
||||
linelen = ws.ws_col <= MIN (PTRDIFF_MAX, SIZE_MAX) ? ws.ws_col : 0;
|
||||
# if __GNUC_PREREQ (4, 6)
|
||||
# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user