Subject: Re: pkg/5618: libscsi fails to build on alpha.
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Tim Rightnour <root@garbled.net>
List: netbsd-bugs
Date: 06/20/1998 02:53:50
On 19-Jun-98 Chris G. Demetriou spoke unto us all:
# Uh, code which does this, or tries to do this, is almost certainly
# (conceptually) broken.
You are quite correct, and with quite alot of help from Ross on this, I managed
another patch. I'm uuencoding it to maintain the tabs properly.. however this
is what it is doing:
create a wrapper call for the routines that want a fixed set of arguments (and
are called from routines with variable argument sets)
the wrapper call does:
va_start(ap,arg);
return real_function(blah,blah,blah,arg,ap);
This ensures that the real_function gets the proper number of fixed arguments,
it doesn't get a bogus va_list, and the API doesn't change.
Thanks for calling me on this.
patch below:
begin 644 patch-ac
M+2TM('-C<VDN8RYO<FEG"5-A="!*=6X@,C`@,#(Z,S`Z,#,@,3DY.`HK*RL@
M<V-S:2YC"5-A="!*=6X@,C`@,#,Z,#`Z,#<@,3DY.`I`0"`M,S4S+#(@*S,U
M,RPQ,2!`0`H@"BMS=&%T:6,@:6YT('=R87!?9&]?8G5F9E]D96-O9&4H=5]C
M:&%R("ID871A8G5F+"!S:7IE7W0@;&5N+`HK=F]I9"`H*F%R9U]P=70I*'9O
M:60@*BP@:6YT("P@=F]I9"`J+"!I;G0L(&-H87(@*BDL('9O:60@*G!U=&AO
M;VLL"BMC:&%R("IF;70L("XN+BD**WL**PEV85]L:7-T(&%P.PHK"79A7W-T
M87)T*&%P+&9M="D["BL)<F5T=7)N(&1O7V)U9F9?9&5C;V1E*&1A=&%B=68L
M;&5N+&%R9U]P=70L<'5T:&]O:RQF;70L87`I.PHK?0HK"B!I;G0@<V-S:7)E
M<5]D96-O9&4H<V-S:7)E<5]T("IS8W-I<F5Q+"!C:&%R("IF;70L("XN+BD*
M0$`@+3,V-"PU("LS-S,L-"!`0`H@>PHM"79A7VQI<W0@87`@/2`H=F%?;&ES
M="DP.PHM"7)E='5R;B!D;U]B=69F7V1E8V]D92AS8W-I<F5Q+3YD871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3@R-BPT("LX
M-#`L-"!`0`H@"BT@"6EF("AD;U]E;F-O9&4H<V-S:7)E<2T^8VUD+"!#341?
M0E5&3$5.+"`F8VUD;&5N+"!A<F=?9V5T+"!G971H;V]K+`HM"6-M9%]S<&5C
M+"!A<"D@/3T@+3$I"BL@"6EF("AW<F%P7V1O7V5N8V]D92AS8W-I<F5Q+3YC
M;60L($--1%]"549,14XL("9C;61L96XL(&%R9U]G970L(&=E=&AO;VLL"BL)
M8VUD7W-P96,I(#T]("TQ*0H@(`D)<F5T=7)N(#`["D!`("TX-3$L-2`K.#8U
M+#0@0$`*('L*+0EV85]L:7-T(&%P(#T@*'9A7VQI<W0I,#L*+0ER971U<FX@
M9&]?96YC;V1E*&)U9F8L(&QE;BP@,"P*+0EA<F=?9V5T+"!G971H;V]K+"!F
M;70L(&%P*3L**PER971U<FX@=W)A<%]D;U]E;F-O9&4H8G5F9BP@;&5N+"`P
M+`HK"6%R9U]G970L(&=E=&AO;VLL(&9M="D["B!]"D!`("TX-3DL-2`K.#<R
M+#0@0$`*('L*+0EV85]L:7-T(&%P(#T@*'9A7VQI<W0I,#L*+0ER971U<FX@
M9&]?96YC;V1E*'-C<VER97$M/F1A=&%B=68L('-C<VER97$M/F1A=&%L96XL
M(#`L"BT)87)G7V=E="P@9V5T:&]O:RP@9FUT+"!A<"D["BL)<F5T=7)N('=R
M87!?9&]?96YC;V1E*'-C<VER97$M/F1A=&%B=68L('-C<VER97$M/F1A=&%L
D96XL(#`L"BL)87)G7V=E="P@9V5T:&]O:RP@9FUT*3L*('T*
`
end
---
Tim Rightnour - root@garbled.net
http://www.zynetwc.com/~garbled/garbled.html