curl / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
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...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-31