More mingw32 fixes

pull/174/head
Michael Black 2020-01-15 17:05:31 -06:00
rodzic c437bbc4d1
commit 16f85be147
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
3 zmienionych plików z 12 dodań i 15 usunięć

Wyświetl plik

@ -41,11 +41,10 @@
# include <readline/readline.h> # include <readline/readline.h>
# elif defined(HAVE_READLINE_H) /* !defined(HAVE_READLINE_READLINE_H) */ # elif defined(HAVE_READLINE_H) /* !defined(HAVE_READLINE_READLINE_H) */
# include <readline.h> # include <readline.h>
# else /* !defined(HAVE_READLINE_H) */
extern char *readline();
# endif /* HAVE_READLINE_H */ # endif /* HAVE_READLINE_H */
#else #else
/* no readline */ /* no readline */
extern char *readline();
#endif /* HAVE_LIBREADLINE */ #endif /* HAVE_LIBREADLINE */
#ifdef HAVE_READLINE_HISTORY #ifdef HAVE_READLINE_HISTORY
@ -109,7 +108,7 @@ static const int have_rl = 1;
static char *rp_hist_buf = (char *)NULL; static char *rp_hist_buf = (char *)NULL;
#endif #endif
#else /* no readline */ #else
static const int have_rl = 0; static const int have_rl = 0;
#endif #endif

Wyświetl plik

@ -41,11 +41,10 @@
# include <readline/readline.h> # include <readline/readline.h>
# elif defined(HAVE_READLINE_H) /* !defined(HAVE_READLINE_READLINE_H) */ # elif defined(HAVE_READLINE_H) /* !defined(HAVE_READLINE_READLINE_H) */
# include <readline.h> # include <readline.h>
# else /* !defined(HAVE_READLINE_H) */
extern char *readline();
# endif /* HAVE_READLINE_H */ # endif /* HAVE_READLINE_H */
#else #else
/* no readline */ /* no readline */
extern char *readline();
#endif /* HAVE_LIBREADLINE */ #endif /* HAVE_LIBREADLINE */
#ifdef HAVE_READLINE_HISTORY #ifdef HAVE_READLINE_HISTORY
@ -95,10 +94,10 @@ extern int read_history();
#define ARG_OUT (ARG_OUT1|ARG_OUT2|ARG_OUT3|ARG_OUT4) #define ARG_OUT (ARG_OUT1|ARG_OUT2|ARG_OUT3|ARG_OUT4)
/* variables for readline support */ /* variables for readline support */
#ifdef HAVE_LIBREADLINE
static char *input_line = (char *)NULL; static char *input_line = (char *)NULL;
static char *result = (char *)NULL; static char *result = (char *)NULL;
static char *parsed_input[sizeof(char *) * 5]; static char *parsed_input[sizeof(char *) * 5];
#ifdef HAVE_LIBREADLINE
static const int have_rl = 1; static const int have_rl = 1;
#ifdef HAVE_READLINE_HISTORY #ifdef HAVE_READLINE_HISTORY
@ -403,6 +402,7 @@ void hash_delete_all()
} }
#ifdef HAVE_LIBREADLINE
/* Frees allocated memory and sets pointers to NULL before calling readline /* Frees allocated memory and sets pointers to NULL before calling readline
* and then parses the input into space separated tokens. * and then parses the input into space separated tokens.
*/ */
@ -430,7 +430,7 @@ static void rp_getline(const char *s)
/* Action! Returns typed line with newline stripped. */ /* Action! Returns typed line with newline stripped. */
input_line = readline(s); input_line = readline(s);
} }
#endif
/* /*
* TODO: use Lex? * TODO: use Lex?
*/ */
@ -1527,8 +1527,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
#endif #endif
} }
#endif // HAVE_LIBREADLINE
#endif /* HAVE_LIBREADLINE */
if (sync_cb) { sync_cb(1); } /* lock if necessary */ if (sync_cb) { sync_cb(1); } /* lock if necessary */

Wyświetl plik

@ -115,20 +115,17 @@ static pthread_mutex_t rot_mutex = PTHREAD_MUTEX_INITIALIZER;
#define ARG_OUT (ARG_OUT1|ARG_OUT2|ARG_OUT3|ARG_OUT4) #define ARG_OUT (ARG_OUT1|ARG_OUT2|ARG_OUT3|ARG_OUT4)
/* variables for readline support */ /* variables for readline support */
#ifdef HAVE_LIBREADLINE
static char *input_line = (char *)NULL; static char *input_line = (char *)NULL;
static char *result = (char *)NULL; static char *result = (char *)NULL;
static char *parsed_input[sizeof(char *) * 7]; static char *parsed_input[sizeof(char *) * 7];
#ifdef HAVE_LIBREADLINE
static const int have_rl = 1; static const int have_rl = 1;
#endif
#ifdef HAVE_READLINE_HISTORY #ifdef HAVE_READLINE_HISTORY
static char *rp_hist_buf = (char *)NULL; static char *rp_hist_buf = (char *)NULL;
#endif #endif
#else /* no readline */
static const int have_rl = 0;
#endif
struct test_table struct test_table
{ {
unsigned char cmd; unsigned char cmd;
@ -316,6 +313,7 @@ void hash_delete_all()
} }
#ifdef HAVE_LIBREADLINE
/* Frees allocated memory and sets pointers to NULL before calling readline /* Frees allocated memory and sets pointers to NULL before calling readline
* and then parses the input into space separated tokens. * and then parses the input into space separated tokens.
*/ */
@ -346,6 +344,7 @@ static void rp_getline(const char *s)
/* Action! Returns typed line with newline stripped. */ /* Action! Returns typed line with newline stripped. */
input_line = readline(s); input_line = readline(s);
} }
#endif
/* /*
@ -895,7 +894,6 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, char *argv[], int argc,
#ifdef HAVE_LIBREADLINE #ifdef HAVE_LIBREADLINE
if (interactive && prompt && have_rl) if (interactive && prompt && have_rl)
#endif
{ {
int j, x; int j, x;
@ -1371,6 +1369,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, char *argv[], int argc,
#endif #endif
} }
#endif // HAVE_LIBREADLINE
/* /*
* mutex locking needed because rotctld is multithreaded * mutex locking needed because rotctld is multithreaded