lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] possible mistake in mem.h


From: Jonathan Larmour
Subject: Re: [lwip-devel] possible mistake in mem.h
Date: Wed, 30 Jan 2008 12:46:49 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Goldschmidt Simon wrote:
>> Please look at mem.h, line 83:
>>  void *mem_calloc(size_t count, size_t size);
>>
>> We think that the type should be mem_size_t, not just size_t;
>>
>> Under VisualC there is no problem because size_t is defined.
>> However, when we ported the source to the embedded target, its
> compiler complained.
>> typedef  u16_t size_t; solves the problem, but it's not the right way
> to do it.
>> Are we right?
> 
> As far as I know, the type 'size_t' is C-standard. If it is not defined
> on your platform, you will have problems with the socket layer also. If
> it is not defined, defining it in your port's 'cc.h' will be the right
> thing to do.

It is C standard, but only if you have #included <stddef.h>. Perhaps that's
what mem.h should do if it is referencing size_t.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
Visit us @ Embedded World 2008, Nürnberg, Germany, 26-28 Feb:Stand 11-336
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]