mingw-dvlpr-bounces@... wrote on 09.04.2008 05:51:35:
> Kai Tietz wrote:
> > First in case a user wants to use snprintf or vsnprintf by ms format
> > arguments, and second, that by bultin definition of these functions
> > declared with attribute (printf,...) for the format argument, which is
> > mingw the ms format style (even warning until gcc 4.3 with patches).
> The unspoken philosophy of MinGW has always been focused on a mission of
> porting simple Unix applications to Windows, rather than providing a
> native Windows compiler that acts how one would expect a normal Windows
> compiler to act.
I am curious about this. I know and strongly embrace the porting of unix
tools, like make, msys, etc.. But on the mingw home page the description
sounnds different about the mission goals.
"MinGW: A collection of freely available and freely distributable Windows
specific header files and import libraries combined with GNU toolsets that
allow one to produce native Windows programs that do not rely on any
3rd-party C runtime DLLs."
May this mission statement needs clarification.
> It seems the non-MinGW GCC community often is expecting MinGW for the
> second goal, which occasionally causes these sorts of conflicts.
> In the long term, I think we could agree that the best option is a
> wrapper that will dispatch MSVC-specific formatters to the MSVC, and
> everything else to our custom printf--or vice versa, or something that
> has a similar effect. But this requires some nontrivial amount of work
> to code.
Especially not trivial in gcc and other toolchain tools, too.
> In the near term, since either choice throws away features someone
> wants, I think we should stick with what we have, because its what we
> have, and because its more consistent with what most people want to do
> with MinGW.
Why throwing away? I agree, that the mingw_(v)snprintf functions should
support 80-bit floating points, there is no discussion from my side. But
the aliases are contradicting the expected behaviour in general. If in a
long term all printf formatter functions would be wrapped and would have a
general format rule-set specific to mingw, then it is ok so IMHO. But of
couse by this, we would affront all users, which are using mingw to
generate windows applications out of window-ish source in a native way. Is
the unix (POSIX) environment issue not a subject mainly covered by cygwin?
> If we choose to stick with what we have, we probably should figure out a
> way to let people call the original function. We may be able to use the
> -p option to dlltool (I wrote support for this option.) to accomplish
Ok, this would be a work-a-round, but a bit uncomfortable. Isn't the best
solution for doing this to use a additional optional library/object with
implements this kind of aliases?
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.