git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Patch for http-fetch.c and older curl releases

From
Junio C Hamano <junkio@cox.net>
Date
Sep 18, 2006, 23:06 UTC
Message-ID
<7v4pv4pyey.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060918225445.GF1261@artsapartment.org>
"Art Haas" <ahaas@airmail.net> writes:
Show 8 quoted lines
> Older curl releases do not define CURLE_HTTP_RETURNED_ERROR, they
> use CURLE_HTTP_NOT_FOUND instead. The trivial patch below fixes
> the build error. Newer curl releases keep the CURLE_HTTP_NOT_FOUND
> definition but using a -DCURL_NO_OLDIES preprocessor flag
> the old name will not be present in the 'curl.h' header. The
> comments in 'curl.h' have more info about the name change.
>
> Signed-off-by:  Art Haas <ahaas@airmail.net>

The patch to use older name in a recent program feels going backwards. The header is only trying to be nice so you can compile old programs written for older interface that use older names. If the new way is the primary way with the new interface, and if we are writing a new program, I think we should write for the new interface.

Can we have the main code to target the more recent version, while working around problems with older versions with backward compatibility macros?

In other words, if the macro HTTP_RETURNED_ERROR is not defined in the header (i.e. older version), you define it to be the same as HTTP_NOT_FOUND.

Previous: Art HaasNext: Art Haas
Message 2 of 8 in “Patch for http-fetch.c and older curl releases”
  1. Art HaasSep 18, 2006
  2. Junio C HamanoSep 18, 2006
  3. Art HaasSep 18, 2006
  4. Junio C HamanoSep 19, 2006
  5. Art HaasSep 19, 2006
  6. Junio C HamanoSep 19, 2006
  7. Johannes SchindelinSep 19, 2006
  8. Art HaasSep 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.