cURL / Mailing Lists / curl-library / Single Mail

curl-library

lib/strcase.c refactoring

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 31 Oct 2016 19:48:16 +0100

The recent refactoring in strcase.c has a bit of a problem that's showing up in
Windows builds (/src/../lib/strcase.c:159:5: warning: 'curl_strequal'
redeclared without dllimport attribute: previous dllimport ignored). The issues
seems to stem from strcase.c exporting functions that are both public (i.e.
CURL_EXTERNAL) and part of the curlx interface, e.g. curlx_strcasecompare
a.k.a. curl_strequal. In Windows, this causes an issue since curl_strequal is
available in libcurl.dll AND it's defined in strcase.c which is included in
modules using curlx_strcasecompare, et. al.

If the curlx interface isn't expected to maintain API compatibility from
release to release, the easiest solution may be to simply drop
curlx_strcasecompare and curlx_strncasecompare from the curlx API altogether
and force users to the public curl functions curl_strequal and curl_strnequal
instead.

>>> Dan
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-10-31