CVS update: samba/source/ubiqx

Andrew Tridgell tridge at samba.anu.edu.au
Tue May 12 10:30:28 GMT 1998


> 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.  

how about:

#ifdef SAMBA
#include "../includes.h"
#else
#include <some_system_includes>
#endif

the problem with your suggestion is maintainence. Using includes.h
guarantees that if one module in Samba is OK for includes then all
are. It is a nightmare trying to do include files in every module. I
know you could get it right for specific cases but for every case? You
will end up as complex as includes.h.

quoting K&R doesn't really solve the problem. What about the Amiga,
OS/2, Novell and VMS ports? What about XYZ port in the future?

> 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.

nope. It's a marvelous idea but it won't work until we go to autoconf
and standardise on HAVE_XXX style stuff. Even then we will need the
equivalent of includes.h to handle the nightmare of conflicting
include files.

Reusable code (in the sense of taking a whole file and putting it in
another package with no changes whatsoever) doesn't exist. You can
almost do it with very simple code that calls very few functions. With
code that calls lots of functions it doesn't happen at all.

Cheers, Andrew



More information about the samba-technical mailing list