cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Link error building curl.exe on Windows using VC9

From: Guenter <lists_at_gknw.net>
Date: Thu, 02 Sep 2010 00:11:45 +0200

Hi Adam,
Am 01.09.2010 20:16, schrieb Adam Light:
> Using the most recent git checkout, I get a link error when building
> curl.exe on Windows using Visual Studio 2008 (VC9) as the compiler.
>
> The error is an unresolved external symbol error. We get it because of
> the addition of the following line (4944) in src/main.c:
> if(S_ISREG(fileinfo.st_mode))
>
> On Windows, the sys/stat.h header file does not define S_ISREG.
> However, it does define S_IFREG and S_IFMT. I've attached a simple
> patch which fixes the error on Windows.
thanks for the patch, but this is IMO the wrong place; we need to do it
globally so that we're safe for future use when some other file makes
use of S_ISREG too (f.e. lib/nss.c needs it also, and if you would build
with nss instead of openssl you would there already run into same prob);
therefore I've added the define to config-win32.h (both lib and src).

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-02