From: Pierre Habouzit Date: Mon, 28 May 2007 09:44:49 +0000 (+0200) Subject: Ignoble trick to allow us to override _init with a macro. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=75913a512139c8276433a954cdbb2a9ffd2ed4ab;p=apps%2Fmadmutt.git Ignoble trick to allow us to override _init with a macro. Will be changed in a (I hope) near future. Used in madmutt.cpkg Signed-off-by: Pierre Habouzit --- diff --git a/tools/cpkg2c.mll b/tools/cpkg2c.mll index 0abfe8b..b04a849 100644 --- a/tools/cpkg2c.mll +++ b/tools/cpkg2c.mll @@ -496,7 +496,7 @@ and ext_member m f = parse fprintf ob "};\n"; (* dump struct init func *) - fprintf ob "\nstatic void %s_init(void)\n{\n" pkg.name; + fprintf ob "\nstatic void (%s_init)(void)\n{\n" pkg.name; List.iter (function (m, _, _) -> if not (fst m.typ) then let init, f, l = m.init in