Data types in samba4

Andrew Bartlett abartlet at samba.org
Fri Jan 16 13:20:07 GMT 2004


On Fri, Jan 16, 2004 at 02:08:38PM +0100, Stefan (metze) Metzmacher wrote:
> Sorry, file is attached now
> 
> I call it with
> 
> sh convert.sh */*.h */*.c */*/*.h */*/*.c librpc/idl/*.idl build/pidl/*.*
> 
> tridge at samba.org wrote:
> 
> > Tim,
> > 
> >  > How about the C99 types intN_t and uintN_t where N is 8,16,32,64(?).
> >  > Use configure to declare typedefs for compilers that aren't C99.
> > 
> > ok, sounds great.
> > 
> > So, who wants to do the big patch for Samba4 to do this?  Metze, feel
> > like doing another big patch? :-)
> 
> Tridge,
> 
> I have a small converting script, can you check if the translations are
> ok, plaese!
> 
> I'll commit this on the weekend then,
> 

I think we need to be careful with this.  We don't want to be casting
every printf(), so we are constrained in the types we should be using.
For example, we should ensure that we make very good use of the 'int'
and 'unsigned int' types in particular, as these are the most common
to pass to printf().  

That is to say, we have good printf warnings on some compilers - but
if we play casty-foo with every printf, we will stuff it up at some
point, and the results may not be pretty.

Natually, where we have wire types, we should use it, and I don't
object to using the standard names for such data.

Andrew Bartlett


More information about the samba-technical mailing list