As soon as I have time to work out a fix that is valid for all compilers I will
be committing changes for vfscanf.
The Microsoft compiler does not really support (long double) and was producing
errors that caused me to have to avoid va_arg() at that time.
I have subsequently made changes the var-arg support so just need to find time
to try, and test, some alternatives.
Since I can't test against the ARM compilers, I will submit the fix to Olivier
for verification before committing it to edk2.tianocore.org.
The issue is recorded and not forgotten.
Daryl McDaniel
"I have always wished for my computer to be as easy to use as my telephone;
my wish has come true because I can no longer figure out how to use my
telephone."
-- Bjarne Stoustrup
From: Carsey, Jaben
Sent: Monday, August 19, 2013 10:55 AM
To: Olivier Martin; Mcdaniel, Daryl
Cc: [email protected]; Carsey, Jaben
Subject: RE: StdLib: the long standing build error
Olivier,
I do not remember responding to that.
Daryl,
Do you have any info on this one?
-Jaben
From: Olivier Martin [mailto:[email protected]]
Sent: Tuesday, August 13, 2013 8:50 AM
To: Carsey, Jaben
Cc: [email protected]
Subject: StdLib: the long standing build error
Importance: High
Jaben,
I sent a patch a last year (25/06/2012) to fix the build issue below:
# ARM Toolchain:
/StdLib/LibC/Stdio/vfscanf.c(846,30) : error #171: invalid type conversion
/StdLib/LibC/Stdio/vfscanf.c(850,11) : error #41: expression must have
arithmetic or pointer type
/StdLib/LibC/Stdio/vfscanf.c: 2 warnings, 2 errors
# ARM GNU toolchain (GCC):
/StdLib/LibC/Stdio/vfscanf.c: In function '__svfscanf_unlocked':
/StdLib/LibC/Stdio/vfscanf.c:846:11: error: cannot convert to a pointer type
/StdLib/LibC/Stdio/vfscanf.c:850:14: error: invalid operands to binary + (have
'va_list' and 'unsigned int')
# My suggested fix was this one:
--- a/StdLib/LibC/Stdio/vfscanf.c
+++ b/StdLib/LibC/Stdio/vfscanf.c
@@ -843,12 +843,8 @@ literal:
goto match_failure;
if ((flags & SUPPRESS) == 0) {
if (flags & LONGDBL) {
- long double **mp = (long double **)ap;
long double res = strtold(buf, &p);
-
- *(*mp) = res;
- ap += sizeof(long double *);
-/*???*/ //*va_arg(ap, long double *) = res;
+ *va_arg(ap, long double *) = res;
} else if (flags & LONG) {
double res = strtod(buf, &p);
*va_arg(ap, double *) = res;
--
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin
<[email protected]<mailto:[email protected]>>
I though you answered me why this change could not be accepted. But I have not
found the email.
Any suggestion to fix my build issues?
Regards,
Olivier
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel