I have tried to compile lynx with djgpp.  This fails because the macro
USE_PERSISTENT_COOKIES is undefined.  The compilation of LYMain.c fails
at line 2364 because LYCookieFile and LYCookieSaveFile are used in the
if-clause when they are not defined at all in the case that
USE_PERSISTENT_COOKIES is undefined.  The if block starts at 2364 and
ends at 2439.  Now the question arises if this if block is needed at
all in case that USE_PERSISTENT_COOKIES is undefined.  Neitherless I
have solved the problem for me with the patch below.  It is clear that
this issue will impact on all systems where USE_PERSISTENT_COOKIES is
undefined.

Regards,
Juan M. Guerrero




diff -aprNU5 lynx2.8.9rel.1.orig/src/LYMain.c lynx2.8.9rel.1/src/LYMain.c
--- lynx2.8.9rel.1.orig/src/LYMain.c    2018-07-08 15:22:44 +0000
+++ lynx2.8.9rel.1/src/LYMain.c 2018-07-11 21:05:20 +0000
@@ -2359,11 +2359,15 @@ void reload_read_cfg(void)
        HTAlwaysAlert(NULL, OPTIONS_NOT_SAVED);
        (void) LYRemoveTemp(tempfile);
        FREE(tempfile);
        return;                 /* can not write the very own file :( */
     }
+#ifdef USE_PERSISTENT_COOKIES
     if (LYCookieFile != 0 && LYCookieSaveFile != 0) {
+#else
+    {
+#endif
        /* set few safe flags: */
 #ifdef USE_PERSISTENT_COOKIES
        BOOLEAN persistent_cookies_flag = persistent_cookies;
        char *LYCookieFile_flag = NULL;
        char *LYCookieSaveFile_flag = NULL;

_______________________________________________
Lynx-dev mailing list
Lynx-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lynx-dev

Reply via email to