lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5067] Fix err_to_errno() macro for sockets API


From: Dmitry Potapov
Subject: [lwip-devel] [patch #5067] Fix err_to_errno() macro for sockets API
Date: Fri, 09 Mar 2007 09:57:52 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10

Follow-up Comment #5, patch #5067 (project lwip):

Simon,
when you say most compiler don't have size_t, do you mean C compilers or some
other languages? I am asking, because the C standard clearly mandates  this
type:

===
6.5.3.4 The sizeof operator
  ...
4 The value of the result is implementation-defined, and its type (an
unsigned integer type)
  is size_t, defined in <stddef.h> (and other headers).
====
7.17 Common definitions <stddef.h>
 ...
       size_t
which is the unsigned integer type of the result of the sizeof operator; and
===
and it is used in prototypes of many functions -- fread, fwrite, malloc,
calloc, strlen, just to name a few.

You just need to include stddef.h to use this type.

But if your compiler is so damn broken that it does not have size_t, there is
a simple workaround -- add to arch/cc.h for your port:
typedef unsigned size_t;



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5067>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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