+* [Bug 833] ignore whitespace at end of remote configuration lines
+* [Bug 1033] ntpdc/ntpq crash prompting for keyid on Windows
* [Bug 1028] Support for W32Time authentication via Samba.
* Mitigation and PPS/PPSAPI cleanup from Dave Mills.
* Documentation updates from Dave Mills.
char *lexeme
)
{
- errno = 0;
- if ((yylval.String = strdup(lexeme)) == NULL &&
- errno == ENOMEM) {
+ char *pch;
+
+ /*
+ * ignore end of line whitespace
+ */
+ pch = lexeme;
+ while (*pch && isspace(*pch))
+ pch++;
+
+ if (!*pch)
+ return T_EOC;
+
+ yylval.String = strdup(lexeme);
+ if (!yylval.String) {
fprintf(stderr, "Could not allocate memory for: %s\n",
lexeme);
exit(1);
#ifdef SYS_WINNT
# include <Mswsock.h>
# include <io.h>
+# ifdef OPENSSL
+# pragma warning(push)
+# pragma warning(disable: 4152)
+# include <openssl/applink.c>
+# pragma warning(pop)
+# endif /* OPENSSL */
#endif /* SYS_WINNT */
#if defined(HAVE_LIBREADLINE)
#ifndef SYS_WINNT
if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
#else
- if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL)
+ if ((fi = _fdopen(open("CONIN$", _O_TEXT), "r")) == NULL)
#endif /* SYS_WINNT */
fi = stdin;
else
#ifdef SYS_WINNT
# include <Mswsock.h>
# include <io.h>
+# ifdef OPENSSL
+# pragma warning(push)
+# pragma warning(disable: 4152)
+# include <openssl/applink.c>
+# pragma warning(pop)
+# endif /* OPENSSL */
#endif /* SYS_WINNT */
#if defined(HAVE_LIBREADLINE)
#ifndef SYS_WINNT
if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
#else
- if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL)
+ if ((fi = _fdopen(open("CONIN$", _O_TEXT), "r")) == NULL)
#endif /* SYS_WINNT */
fi = stdin;
else