Data types in samba4

Christopher R. Hertel crh at
Thu Jan 15 17:53:29 GMT 2004


I like this idea.  I have a few nit-picky questions but they're mostly to 
help me understand what you're trying to do.

- why "uint_t" instead of just "uint"?  It seems inconsistent with the 
  rest of the list.

- would these be #defined or typedef'd?  (With a #define you can also do
  #ifdefs to see if they're already defined.)

- Which of these are consistently defined across the platforms to which we 
  port?  Any?  I've had trouble with conflicting definitions in the past, 
  which is why I ask.

If this gets worked out to a simple, workable set I want to adopt it for 
some of my own (non-Samba) coding as well.  It would be nice to have a 
standard to work toward.


Chris -)-----

On Thu, Jan 15, 2004 at 11:53:29AM +0100, Stefan (metze) Metzmacher wrote:
> Hi tridge,
> while reading through some samba4 code, I noticed
> that we use 'unsigned', 'unsigned int' and 'uint_t'.
> isn't it all the same?
> 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
> or something like this.
> and not
> short, long,...
> I'm not sure about the large_t, uint64 or int64 would be better, but we 
> can't expect 64-Bit vars on all platforms:-(
> Comments?
> -- 
> metze
> Stefan Metzmacher <metze at>

"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team --     -)-----   Christopher R. Hertel
jCIFS Team --   -)-----   ubiqx development, uninq.
ubiqx Team --     -)-----   crh at
OnLineBook --    -)-----   crh at

More information about the samba-technical mailing list