C99 structure initialisers and Samba3

tridge at samba.org tridge at samba.org
Tue Aug 22 22:47:31 GMT 2006


 > Can we #ifdef this currently for Samba3, and move towards
 > C99 requirements slowly ?

I'm not quite sure how to move to C99 'slowly' - its a bit like being
'a bit pregnant' :-)

Note that requiring C99 doesn't involve any Samba3 code changes - its
purely a policy change. C99 compilers will compile all of Samba3 fine,
its just that non-C99 compilers won't compile this style of structure

 > It's not used anywhere else in Samba3 and so shouldn't be too hard
 > to keep up to date in this one place for now.

you're right that this one place isn't a big problem, but lack of C99
structure initialisers will likely cause more problems in the
future. For example, the tdb code currently doesn't use C99
initialisers, but it probably should in order to gain the additional
code robustness (see for example the io_methods structure in io.c)

These things tend to become more common as code get more modularised,
as strucure initialisers are the classic way to setup abstraction

Cheers, Tridge

More information about the samba-technical mailing list