curl-library
Re: Two Borland Compilation Recommendations
Date: Wed, 4 Dec 2002 12:12:18 +0100 (MET)
On Tue, 3 Dec 2002, Alexander J. Oss wrote:
> I think I'm going to hold off trying to eliminate the warnings I get with
> Borland C++ Builder 5 right now; I don't have the time to attack all 135 in
> a consistent manner (especially tough ones where I'm warned that parameters
> are unused, but removing the names causes an *error* since C requires
> parameter names).
Right, removing the parameters is not the way to fix the warnings. Something
like this is better:
void function(int unused)
{
(void)unused; /* prevents compiler warning */
}
> 1. Borland defines __WIN32__ (that's two underscores on each side), not
> WIN32 or _WIN32. There's a comment in setup.h about trying some
> preprocessor tricks out to help with that.
Aha! Me fix. The Borland makefile does however set -DWIN32 on the command
line so it makes little practical difference now.
> 2. In curl.h, the include files easy.h and multi.h are #include'd in the
> *middle* of the file, which causes some interesting problems because they
> are in the middle of an extern "C" block. It'd probably be better to end
> the block before the inclusion, and start a new one right after. Or
> perhaps to only make extern "C" blocks around function prototypes...?
Oops. I'll correct that too.
Thanks for your feedback.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003enReceived on 2002-12-04