lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] LYMain.c fails to compile if USE_PERSISTENT_COOKIES is undefi


From: Juan Manuel Guerrero
Subject: [Lynx-dev] LYMain.c fails to compile if USE_PERSISTENT_COOKIES is undefined.
Date: Wed, 11 Jul 2018 21:15:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7

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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]