cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using strequal.c in curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 22 Oct 2008 16:38:53 +0200 (CEST)

On Wed, 22 Oct 2008, Gisle Vanem wrote:

> Since adding ../lib/strequal.c to the sources for ./src/curl.exe, the
> compilation fails here (on MingW). The reason is that curl_strequal() and
> curl_strnequal() are exported from libcurl and then linked in again from
> ../lib/strequal.c. What should we do about this?

Aaah...

> An easy fix I used here is to simply export Curl_raw_equal();

Right, but Curl_raw_equal has its capital C because it isn't exported to the
public libcurl API and I don't want it be that either.

> Should we perhaps add curl_raw_equal() to <curl.h> instead?

What if we turned it the other way around and made sure that the other
functions (curl_strequal and curl_strnequal) in strequal.c don't get the
extern on them when the curl tool uses them? Like if we define some magic
define before curl.h is included.

After all, they are done the "curlx_" way already since I want them removed in
a future.

-- 
  / daniel.haxx.se
Received on 2008-10-22