]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl.h: make CURLOPT_WRITEINFO and CURLOPT_CLOSEPOLICY compile
authorDaniel Stenberg <daniel@haxx.se>
Sat, 31 Aug 2024 15:24:01 +0000 (17:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 2 Sep 2024 08:43:34 +0000 (10:43 +0200)
The symbols have not been in use for 17+ years and they did not do
anything for several years before that, but apparently there are still
code using them.

Follow-up to 3b057d4b7a7
Fixes #14747
Reported-by: Kai Pastor
Closes #14748

include/curl/curl.h
lib/optiontable.pl

index 1609ff6cf24374e5fed5c3e16d75bdf98fc9e690..dae533e32dd8c72e2d2054230b1a7e2eacf4396c 100644 (file)
@@ -721,6 +721,8 @@ typedef enum {
    with them. */
 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
+#define CURLOPT_OBSOLETE72 9999
+#define CURLOPT_OBSOLETE40 9999
 
 #endif /* !CURL_NO_OLDIES */
 
index 511322a3477bc166e7f0a03913ff6b3b2d9607d6..2727784e7bdd5dfbeb6ecd7bdf3a502c3da451b0 100755 (executable)
@@ -105,7 +105,7 @@ while(<STDIN>) {
     if(/^#define (CURLOPT_[^ ]*) *(CURLOPT_\S*)/) {
         my ($o, $n)=($1, $2);
         # skip obsolete ones
-        if($n !~ /OBSOLETE/) {
+        if(($n !~ /OBSOLETE/) && ($o !~ /OBSOLETE/)) {
             $o =~ s/^CURLOPT_//;
             $n =~ s/^CURLOPT_//;
             $alias{$o} = $n;