From: Dave Hart Date: Mon, 8 Feb 2010 14:11:12 +0000 (+0000) Subject: [Bug 1478] linking fails with undefined reference EVP_MD_pkey_type. X-Git-Tag: NTP_4_2_6P1_RC5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51b18c174e281524ce36e888f9de03e2975f1888;p=thirdparty%2Fntp.git [Bug 1478] linking fails with undefined reference EVP_MD_pkey_type. [Bug 1479] Compilation fails because of not finding readline headers. [Bug 1484] ushort is not defined in QNX6. bk: 4b701b808fXIxii9pLOj-55cwSWBXA --- diff --git a/ChangeLog b/ChangeLog index b6e8ac6ef..099e24a16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ --- * [Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT. +* [Bug 1478] linking fails with undefined reference EVP_MD_pkey_type. +* [Bug 1479] Compilation fails because of not finding readline headers. * [Bug 1480] snprintf() cleanup caused unterminated refclock IDs. +* [Bug 1484] ushort is not defined in QNX6. --- (4.2.6p1-RC4) 2010/02/04 Released by Harlan Stenn diff --git a/include/mbg_gps166.h b/include/mbg_gps166.h index 2ec2bdd30..f4b823810 100644 --- a/include/mbg_gps166.h +++ b/include/mbg_gps166.h @@ -391,7 +391,7 @@ typedef struct { l_fp A0; /* ± Clock Correction Coefficient 0 [sec] */ l_fp A1; /* ± Clock Correction Coefficient 1 [sec/sec] */ - ushort WNlsf; /* week number of nearest leap second */ + u_short WNlsf; /* week number of nearest leap second */ short DNt; /* the day number at the end of which LS is inserted */ char delta_tls; /* */ char delta_tlsf; /* */ diff --git a/libntp/ntp_lineedit.c b/libntp/ntp_lineedit.c index 9a74c5697..339de635d 100644 --- a/libntp/ntp_lineedit.c +++ b/libntp/ntp_lineedit.c @@ -10,13 +10,20 @@ #include #include +#if defined(HAVE_READLINE_HISTORY) && \ + (!defined(HAVE_READLINE_HISTORY_H) || \ + !defined(HAVE_READLINE_READLINE_H)) +# undef HAVE_READLINE_HISTORY +#endif #if defined(HAVE_READLINE_HISTORY) # include # include -#else -# if defined(HAVE_HISTEDIT_H) -# include -# endif +# define LE_READLINE +#elif defined(HAVE_HISTEDIT_H) +# include +# define LE_EDITLINE +#else +# define LE_NONE #endif #include "ntp.h" @@ -39,15 +46,13 @@ static int ntp_readline_initted; static char * lineedit_prompt; -#if !defined(HAVE_READLINE_HISTORY) && defined(HAVE_HISTEDIT_H) - +#ifdef LE_EDITLINE static EditLine * ntp_el; static History * ntp_hist; static HistEvent hev; char * ntp_prompt_callback(EditLine *); - -#endif /* !HAVE_READLINE_HISTORY_H && HAVE_HISTEDIT_H */ +#endif /* LE_EDITLINE */ /* @@ -68,8 +73,7 @@ ntp_readline_init( lineedit_prompt = estrdup(prompt); } -#if !defined(HAVE_READLINE_HISTORY) && defined(HAVE_HISTEDIT_H) - +#ifdef LE_EDITLINE if (NULL == ntp_el) { ntp_el = el_init(progname, stdin, stdout, stderr); @@ -104,8 +108,7 @@ ntp_readline_init( } else success = 0; } - -#endif /* !HAVE_READLINE_HISTORY && HAVE_HISTEDIT_H */ +#endif /* LE_EDITLINE */ ntp_readline_initted = success; @@ -121,8 +124,7 @@ ntp_readline_uninit( void ) { -#if !defined(HAVE_READLINE_HISTORY) && defined(HAVE_HISTEDIT_H) - +#ifdef LE_EDITLINE if (ntp_el) { el_end(ntp_el); ntp_el = NULL; @@ -130,8 +132,7 @@ ntp_readline_uninit( history_end(ntp_hist); ntp_hist = NULL; } - -#endif /* !HAVE_READLINE_HISTORY && HAVE_HISTEDIT_H */ +#endif /* LE_EDITLINE */ if (lineedit_prompt) { free(lineedit_prompt); @@ -153,21 +154,20 @@ ntp_readline( int * pcount ) { -#if !defined(HAVE_READLINE_HISTORY) && !defined(HAVE_HISTEDIT_H) - char line_buf[MAXEDITLINE]; + char * line; +#ifdef LE_NONE + char line_buf[MAXEDITLINE]; #endif -#if !defined(HAVE_READLINE_HISTORY) && defined(HAVE_HISTEDIT_H) +#ifdef LE_EDITLINE const char * cline; #endif - char * line; if (!ntp_readline_initted) return NULL; *pcount = 0; -#if defined(HAVE_READLINE_HISTORY) - +#ifdef LE_READLINE line = readline(lineedit_prompt ? lineedit_prompt : ""); if (NULL != line) { if (*line) { @@ -178,11 +178,9 @@ ntp_readline( line = NULL; } } +#endif /* LE_READLINE */ -#endif /* HAVE_READLINE_HISTORY */ - -#if !defined(HAVE_READLINE_HISTORY) && defined(HAVE_HISTEDIT_H) - +#ifdef LE_EDITLINE cline = el_gets(ntp_el, pcount); if (NULL != cline && *cline) { @@ -191,10 +189,9 @@ ntp_readline( line = estrdup(cline); } else line = NULL; +#endif /* LE_EDITLINE */ -#endif /* !HAVE_READLINE_HISTORY && HAVE_HISTEDIT_H */ - -#if !defined(HAVE_READLINE_HISTORY) && !defined(HAVE_HISTEDIT_H) +#ifdef LE_NONE /* stone hammers */ if (lineedit_prompt) { # ifdef VMS @@ -216,7 +213,7 @@ ntp_readline( } else line = NULL; -#endif /* !HAVE_READLINE_HISTORY && !HAVE_HISTEDIT_H */ +#endif /* LE_NONE */ if (!line) /* EOF */ @@ -226,7 +223,7 @@ ntp_readline( } -#if !defined(HAVE_READLINE_HISTORY) && defined(HAVE_HISTEDIT_H) +#ifdef LE_EDITLINE /* * ntp_prompt_callback - return prompt string to el_gets() */ @@ -239,5 +236,5 @@ ntp_prompt_callback( return lineedit_prompt; } -#endif /* !HAVE_READLINE_HISTORY_H && HAVE_HISTEDIT_H */ +#endif /* LE_EDITLINE */ diff --git a/m4/ntp_lineeditlibs.m4 b/m4/ntp_lineeditlibs.m4 index 99c79211e..bca0d8fc8 100644 --- a/m4/ntp_lineeditlibs.m4 +++ b/m4/ntp_lineeditlibs.m4 @@ -75,8 +75,6 @@ AC_DEFUN([NTP_LINEEDITLIBS], [ no) ;; *) - dnl AC_DEFINE(HAVE_LIBREADLINE, 1, - dnl [Define if you have a readline compatible library]) AC_CHECK_HEADERS([readline.h readline/readline.h histedit.h]) AC_CHECK_HEADERS([history.h readline/history.h]) diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index eb3fe440e..9ab9d1c5e 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -13,6 +13,7 @@ #include "ntp_unixtime.h" #include "ntp_stdlib.h" #include "ntp_config.h" +#include "ntp_crypto.h" #include "ntp_assert.h" #include