cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Undefined macros in curl/curl.h

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 5 Jan 2012 10:42:43 -0800

On Thu, Jan 05, 2012 at 07:26:53PM +0100, Daniel Stenberg wrote:
> More seriously though, we can make them survive better in some ways
> with this fix:
>
> @@ -520,6 +520,10 @@ typedef enum {
> #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
> the obsolete stuff removed! */
>
> +/* Obsolete error codes re-used in 7.24.0 */
> +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
> +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
> +
> /* compatibility with older names */
> #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING

That's probably the best option if you want to maintain backwards
compatibility. It won't be perfect (e.g. if someone tries to add
both CURLE_FTP_USER_PASSWORD_INCORRECT and CURLE_FTP_ACCEPT_FAILED to
the same switch statement), but anyone making such a modification could
simply remove any references to the obsolete entries at the same time.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-05