> FYI https://tiswww.case.edu/php/chet/readline/readline.html#SEC43

There are also extra headers included in the above example. The
minimally required ones tested on macOS and Linux are the following.

/* Standard include files. stdio.h is required. */
#include <stdlib.h>
//#include <string.h>
#ifdef __APPLE__
#include <unistd.h>
#endif
#include <locale.h>

/* Used for select(2) */
//#include <sys/types.h>
//#include <sys/select.h>

#ifdef __linux__
#include <signal.h>
#endif

#ifdef __APPLE__
#include <stdio.h>
#endif

/* Standard readline include files. */
#include <readline/readline.h>
#include <readline/history.h>

-- 
Regards,
Peng

Reply via email to