Host: Windows XP Pro SP2
uname -a: UWIN-XP AQ6455 4.2/5.1 2600 i686 i686 i386 UWIN-XP
UWIN: UWIN 4.2 (2007-12-11 build)
MinGW: 3.2.0
The following trivial program fails to compile:
/d/uwin/site/local> print $PACKAGE_cc
/D/MinGW
/d/uwin/site/local> cc -V
/D/MinGW
/d/uwin/site/local> cat h.c
#include <stdio.h>
main()
{
printf( "Done" );
}
/d/uwin/site/local> cc -o h h.c
cpp: "/D/MinGW/lib/gcc/mingw32/3.4.2/include/stdarg.h", line 55:
warning: va_copy redefined
In file included from /usr/include/ast/ast_std.h:327,
from /usr/include/ast/ast_stdio.h:103,
from /usr/include/stdio.h:2,
from h.c:2,
from h.c:2:
/usr/include/ast/ast_map.h:107: error: conflicting types for 'strtold'
/D/MinGW/include/stdlib.h:315: error: previous declaration of 'strtold'
was here
/usr/include/ast/ast_map.h:107: error: conflicting types for 'strtold'
/D/MinGW/include/stdlib.h:315: error: previous declaration of 'strtold'
was here
/d/uwin/site/local>
Now looking in ast_map.h around line 107 showed:
106 #ifndef _ISOC99_SOURCE
107 extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*,
char**));
108 #endif
Moreover the only references to the symbol _ISOC99_SOURCE were in
ast/ast_map.h and ast/ast_standards.h in all of the files under
/usr/include. The ast_standards.h file merely sets this symbol (along
with several others).
When I included it manually, all was fine:
/d/uwin/site/local> cat h.c
#include <ast/ast_standards.h>
#include <stdio.h>
main()
{
printf( "Done\n" );
}
/d/uwin/site/local> cc -o h h.c
cpp: "/D/MinGW/lib/gcc/mingw32/3.4.2/include/stdarg.h", line 55:
warning: va_copy redefined
/d/uwin/site/local> ./h
Done
/d/uwin/site/local>
It seems that all that's needed is to introduce a #include
ast_standards.h directive into ast_map.h.
Howard Bryden,
UNIX Administrator,
Qld. Govt. Dept. of Emergency Services,
Tel. 07 3109 5087
------------------------------------------------------------------------
----------------------------------
Rocket J. Squirrel: "... we're going to have to think!"
Bullwinkle J. Moose: "There must be an easier way than that."
This correspondence is for the named persons only. It may contain confidential
or privileged information or both. No confidentiality or privilege is waived or
lost by any mis transmission. If you receive this correspondence in error
please delete it from your system immediately and notify the sender. You must
not disclose, copy or relay on any part of this correspondence, if you are not
the intended recipient. Any opinions expressed in this message are those of the
individual sender except where the sender expressly, and with the authority,
states them to be the opinions of the Department of Emergency Services,
Queensland.
_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users