svn commit: samba r11658 - in branches/SAMBA_3_0/source: .
Green, Paul
Paul.Green at stratus.com
Fri Nov 11 19:54:09 GMT 2005
Jeremy Allison [mailto:jra at samba.org]
> The reason is this :
>
> { NTSTATUS fn_foo(); }
>
> is not seen as a function call, it is seen as a declaration. This
> means that none of the passdb modules get initialized. At all.
>
> As you can imagine this breaks everything...
>
> Now, if you replaced this with :
>
> { NTSTATUS foo_ret = fn_foo(); }
>
> (when you modify foo_ret for each call so that you don't get duplicate
> declarations) then that should work.
>
> Jeremy.
Yes. I confused the initialization and the declaration of the
functions.
I apologize profusely and twice. Once for getting the analysis wrong
and once for getting the testing wrong. I am embarrassed to return to
the Samba scene only to make such a fool of myself in public.
I'm working up a patch that creates a declaration string independently
of the initialization string. Programs like lib/iconv.c can then be
changed to say
static_decl_charset; /* expands to "extern NTSTATUS
charset_CP850_init(); ..." */
At the top, and continue to say
static_init_charset; /* expands to "{ charset_CP850(); ... } */
When they are ready to invoke the initialization functions. There are
6 such source programs, and 6 such variables.
I'll post the patch here, and **properly** test it before committing it.
PG
More information about the samba-technical
mailing list