svn commit: samba r25456 - in branches/SAMBA_4_0: . source/lib/charset source/param

Jelmer Vernooij jelmer at samba.org
Tue Oct 2 00:37:15 GMT 2007


Am Montag, den 01.10.2007, 17:29 -0700 schrieb Andrew Bartlett:
> On Mon, 2007-10-01 at 23:26 +0000, jelmer at samba.org wrote:
> > Author: jelmer
> > Date: 2007-10-01 23:26:37 +0000 (Mon, 01 Oct 2007)
> > New Revision: 25456
> > 
> > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25456
> > 
> > Log:
> > Avoid externs for charsets for now - it breaks openchange.
> > Modified:
> >    branches/SAMBA_4_0/
> >    branches/SAMBA_4_0/source/lib/charset/charcnv.c
> >    branches/SAMBA_4_0/source/lib/charset/charset.h
> >    branches/SAMBA_4_0/source/param/loadparm.c
> 
> > Modified: branches/SAMBA_4_0/source/lib/charset/charset.h
> > ===================================================================
> > --- branches/SAMBA_4_0/source/lib/charset/charset.h	2007-10-01 23:18:26 UTC (rev 25455)
> > +++ branches/SAMBA_4_0/source/lib/charset/charset.h	2007-10-01 23:26:37 UTC (rev 25456)
> > @@ -77,9 +77,4 @@
> >  #define strlower(s) strlower_m(s)
> >  #define strupper(s) strupper_m(s)
> >  
> > -/* from lib/charset */
> > -extern char *dos_charset;
> > -extern char *unix_charset;
> > -extern char *display_charset;
> > -
> >  #endif /* __CHARSET_H__ */
> > 
> Why was this a good idea in the first place?  There is a lot of value in
> moving *from* extern variables, in that it is a lot harder to get the
> type wrong with a function...
It made sure that lib/charset (and thus lib/util) don't necessarily need
a smb.conf loaded before usable. The variables in the structs used by
lp_*() are globals anyway. 

I don't see how having this in a function is better - the type of
externs is checked, just like it is for functions.

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.samba.org/archive/samba-technical/attachments/20071002/e42eb3bc/attachment.bin


More information about the samba-technical mailing list