On Tue, Sep 16, 2014 at 05:49:26PM +0000, eocene wrote:
Johannes wrote:
I would suggest testing for this specific (v)snprintf() behaviour in configure and ifdef based on the result rather than on the OS.
I thought about that, and between - it sounding like Irix == this behaviour and - relearning enough about autoconf to do anything is always somewhere between unpleasant and painful I felt disinclined, but I could give it some effort.
There might even be some builtin support for this check in autoconf as the issue is mentioned in [1].
I looked a bit yesterday and didn't get the impression that there was anything.
AX_FUNC_SNPRINTF might help. It worked on my system after I installed an autoconf-archive package. Here is some documentation: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4... I think it will define PREFER_PORTABLE_SNPRINTF in config.h in case it detects a broken (v)snprintf().