This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, bz #58312] Fix libssp handling of vsnprintf for cross-compilers


On Wed, Sep 4, 2013 at 12:01 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> That looks wrong, the test was intentionally looking for badly implemented
> vsnprintf, see
> http://www.gnu.org/software/gnulib/manual/html_node/snprintf.html
> "This function does not return a byte count as specified in C99 on some
> platforms: HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw."
>
> The implementation relies on the returned byte count to be exactly correct,
> so it can't be implemented on platforms where that is not the case.

Ah; thanks for the pointer.

> Not sure which of the targets from the above list we still support,
> certainly at least mingw, though in that case I don't know if it hasn't been
> fixed there.  So, as Joseph said, you probably should keep the runtime test
> as is, and just for cross compiling replace the unconditional =undef with
> an optimistic assumption followed by a blacklist of platforms where it is
> known not to work.

That makes sense.  Am I correct in understanding that the list I need
to be concerned with is only the one you quote?

I have access to a mingw compiler, so I can easily give that a test in
a current version.

The glibc manual has a list of supported/tested platforms, and all of
the above other than mingw are listed as "occasionally tested" as of
2011, so they should probably all be listed in the blacklist:
https://www.gnu.org/software/gnulib/manual/html_node/Target-Platforms.html

Thanks,
- Brooks


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]