aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-cmds.c')
-rw-r--r--gdb/cli/cli-cmds.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index c60b1d3..5ab4791 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -56,6 +56,7 @@
#endif
#include <fcntl.h>
+#include <algorithm>
/* Prototypes for local command functions */
@@ -918,7 +919,7 @@ list_command (char *arg, int from_tty)
{
int first;
- first = max (cursal.line - get_lines_to_list () / 2, 1);
+ first = std::max (cursal.line - get_lines_to_list () / 2, 1);
/* A small special case --- if listing backwards, and we
should list only one line, list the preceding line,
@@ -945,8 +946,8 @@ list_command (char *arg, int from_tty)
error (_("Already at the start of %s."),
symtab_to_filename_for_display (cursal.symtab));
print_source_lines (cursal.symtab,
- max (get_first_line_listed ()
- - get_lines_to_list (), 1),
+ std::max (get_first_line_listed ()
+ - get_lines_to_list (), 1),
get_first_line_listed (), 0);
}
@@ -1090,7 +1091,7 @@ list_command (char *arg, int from_tty)
error (_("No default source file yet. Do \"help list\"."));
if (dummy_beg)
print_source_lines (sal_end.symtab,
- max (sal_end.line - (get_lines_to_list () - 1), 1),
+ std::max (sal_end.line - (get_lines_to_list () - 1), 1),
sal_end.line + 1, 0);
else if (sal.symtab == 0)
error (_("No default source file yet. Do \"help list\"."));