Data types in samba4

tridge at samba.org tridge at samba.org
Fri Jan 16 01:18:33 GMT 2004


Metze,

 > while reading through some samba4 code, I noticed
 > that we use 'unsigned', 'unsigned int' and 'uint_t'.
 > isn't it all the same?

yep

There are historical reasons for this - a good topic for an after
dinner discussion at SambaXP :-)

 > 
 > I think it would be a good idea to use only one off this in all places,
 > because this will make us much more independent of system headers.
 > so we only need to check if this choosen type is defined, otherwise 
 > we'll just typedef this *one* type!
 > 
 > we should write a list to the progguide.txt containing all types
 > we're needing in samba and that only this types should be used inside
 > of samba.
 > 
 > 
 > I would preferr:
 > int
 > int8
 > int16
 > int32
 > int64
 > uint_t
 > uint8
 > uint16
 > uint32
 > uint64

yes, I'd be happy with that. 

Alternatively we could standardise on *_t naming, as that allows
syntax highlighting editors (such as emacs) to do a better job. So we
would have uint32_t, uint64_t etc. 

Anyone else have any preference?

Cheers, Tridge


More information about the samba-technical mailing list