Need SIZE_MAX to be defined when there's no libreadline
[pspp-builds.git] / src / ui / terminal / read-line.c
index 493a3d63cf5bd6399e7ea90de6081ae59d967e5c..7b23f38d2f359b58ecec1635970904d732edad5c 100644 (file)
@@ -22,6 +22,9 @@
 #include <stdbool.h>
 #include <assert.h>
 #include <errno.h>
+#if ! HAVE_READLINE
+#include <stdint.h>
+#endif
 
 #include "msg-ui.h"
 
@@ -92,7 +95,7 @@ readln_uninitialize (void)
   initialised = false;
 
 #if HAVE_READLINE
-  if (history_file != NULL && false == get_testing_mode() )
+  if (history_file != NULL && false == settings_get_testing_mode () )
     write_history (history_file);
   clear_history ();
   free (history_file);
@@ -173,7 +176,7 @@ readln_read (struct string *line, enum prompt_style style)
 #else
   fputs (prompt, stdout);
   fflush (stdout);
-  if (ds_read_line (line, stdin))
+  if (ds_read_line (line, stdin, SIZE_MAX))
     {
       ds_chomp (line, '\n');
       eof = false;