cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patrick: Diff for /curl/lib/url.c between version 1.656 and 1.657

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 16 Oct 2007 11:44:32 -0700

On Tue, Oct 16, 2007 at 07:18:47PM +0200, Patrick Monnerat wrote:
> > I thought size_t was always unsigned? It seems to be on the systems I
> use (aix/linux/solaris/irix). For signed there's ssize_t.
> > -Tor
>
> It seems it's the case for most systems (probably a POSIX definition).

Both ANSI and ISO specify that size_t must be unsigned.

> However I found many code snippets on the internet assuming that
> "braindead systems" (named as such!) may have size_t signed.

...but not all compilers are ANSI compliant. Older versions of gcc,
apparently, fall into that group (older than 2.4, which is well over a
decade old).

> There are many trolls on the internet about this subject and I would'nt
> start another. It may be wise to delegate the decision of supporting
> size_t as a signed type to someone who has a wide vision of the current
> platform set supporting curl... Daniel/DanF/... ?

Well, my opinion is that, as far as it's possible, we cater to the
ANSI-conformant systems (eliminate compiler warnings on those) but
still allow nonconformant systems to work, even if it means warnings show
up there. The latter requirement might mean transfers will be limited
to 2 GiB, but those (presumably older) systems probably don't support
64-bit types, anyway, and therefore already don't support larger transfers.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-10-16