curl / Mailing Lists / curl-library / Single Mail


Re: Getting away from the generated header file [RFC]

From: Daniel Stenberg <>
Date: Fri, 31 Mar 2017 00:51:15 +0200 (CEST)

On Thu, 30 Mar 2017, Florian Weimer wrote:

> I think you could write run-time tests for most of the macro values. The
> formats could probably be checked using sscanf and sprintf. For the type
> sizes and type definitions, it should even be possible to write compile-time
> tests.
> This would quickly tell users (well, the folks who compile libcurl) that the
> header definitions do not work on their platform.

Yeah, a good idea! I figure it is all about how confident we can be that the
new file works for most people or not.

A careful approach that avoids causing incompatible builds without the user
noticing, would be to make the new header file define different names and use
it in parallel with the current system to start with, and then have some
checks in the compiled code designed to trigger compiler warnings or errors if
the defines differ in incompatible ways.

Once we've seen it used for a while without any users screaming, we can deduce
that it works for a large enough portion of the users to switch off the old
system and go completely over to the new.

I'll try get something like that working...

Received on 2017-03-31