curl / Mailing Lists / curl-library / Single Mail

curl-library

RE: configure for ISO C90

From: Marcel Raad <Marcel.Raad_at_teamviewer.com>
Date: Mon, 3 Apr 2017 16:07:14 +0000

Hi Daniel,

> I would strongly recommend using "./configure --enable-debug" instead.
> Simpler
> to write, adds many more pendantic compiler options and runs 'make
> checksrc'
> by default on the code etc.

Thanks! I had assumed that option was for debug symbols or preprocessor definitions.

> If the configure check wrongly detects your strdup as present when it is fact
> isn't, then CURL_CHECK_FUNC_STRDUP in m4/curl-functions.m4 is bad.
> Which is
> surprising to me since it has been around unmodified for a very long time
> now.
> The test seems rather complete to me...

Thanks for the pointer. tst_compi_strdup seems incomplete. According to the documentation of AC_LANG_PROGRAM, it puts the second argument into a main function. Calling strdup inside a function works fine and only results in warnings. What doesn't work is referencing it at the file scope, which is what easy.c does:
curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)system_strdup;

Probably noone tried to compile with -std=c90 yet, or they fixed curl_config.h manually.

Marcel

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