Quick and dirty malloc() support for realpath.

Ricard Wanderlof ricard.wanderlof at axis.com
Tue Oct 27 07:54:50 UTC 2009


On Mon, 26 Oct 2009, Rob Landley wrote:

> ... Also, in my experience _Bool is about as real-world useful as the 
> bit field notation with the colons, and is really there to keep the 
> language pedants and the c++ guys happy without actually accomplishing 
> much.  I've never seen it actually produce better code.

It can produce more readable, less error-prone C code though. We use 
hardware register definitions such as

typedef struct {
   unsigned int x : 8;
   unsigned int y : 8;
   unsigned int control_bit : 1;
   unsigned int dummy1  : 15;
} reg_foo;

at great length for the C definitions for the registers in our chips, and 
it really does avoid nasty errors that crop up when using shifting and 
masking.

Just another opinion.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30


More information about the uClibc mailing list