CVS update: samba/source/ubiqx
Christopher R. Hertel
crh at NTS.Umn.EDU
Tue May 12 12:51:26 EST 1998
Let me go over this again...
The reason that I object is that I think that the ubiqx modules, and parts
of the "main" Samba code, should be able to stand alone. Mangle.c, for
example, would be great as a stand-alone module. It should not depend
upon the rest of the code to work. I'm also thinking about the smb.conf
parsing and config database management in these terms. Make this
*really* re-usable code.
The ubiqx modules are supposed to work this way. Sure, the AVL and Splay
trees need the base Binary trees from which they descend, but that's
because they are descendant types. You can separate them from the
Linked Lists without breaking anything. The real key is that you can
separate them from Samba and still use them. I'd like to see us make
this happen with chunks of Samba, too.
So, with regard to the definition of NULL, I'd really rather re-solve the
specific problem within the ubiqx code. These modules should work on just
about any system anyway, so I have a real need to solve them.
According to K&R 2ndEd., NULL should be defined in stdio.h (see pg. 102).
I happen to have a SunOS4 system handy, and NULL is defined there, so I
think that the correct & simple solution would be to include that *instead
of* <stdlib.h>. I have also checked Amiga, Linux, and SGI systems and
find that NULL is suitably defined.
Okay, so two options:
1) Remove includes.h and stdlib.h, replacing them with stdio.h
2) Remove includes.h, and put in:
#include <stdlib.h> /* Intended to get a define for NULL. */
#include <stdio.h> /* The correct way to get NULL defined, per K&R. */
The latter ensures that I won't break the code on any system on which it
already works (in case they're broken).
Please send comments and/or objections!
> Date: Monday May 11, 1998 @ 18:32
> Author: tridge
> Update of /data/cvs/samba/source/ubiqx
> In directory samba:/tmp/cvs-serv27550
> Modified Files:
> ubi_AVLtree.c ubi_BinTree.c ubi_Cache.c ubi_SplayTree.c
> Log Message:
> include includes.h in all the ubiqx files. I know Chris won't like
> this but it really is necessary (sorry Chris!)
> ubiqx code didn't compile on SunOS4 otherwise as stdlib didn't define
Christopher R. Hertel -)----- University of Minnesota
crh at nts.umn.edu Networking and Telecommunications Services
More information about the samba-cvs