On Mon, 2012-10-15 at 00:00 +0200, Samuel Thibault wrote: > Svante Signell, le Thu 11 Oct 2012 17:46:33 +0200, a écrit : > > The functions realpath and getcwd are already checked for in > > configure.ac/configure > > But not whether they support being passed NULL, which is what Guillem > was referring to in "And getcwd(NULL, 0) has also been supported on > FreeBSD and GNU/* for a long time, it would be better to check for its > availabilty at configure time and use that whenever possible." Assuming > that the support is available whenever the function is, is probably not > going to be accepted by upstream. You need to add a real execution test > in configure.ac Attached is a small configure.ac test snippet to check if getcwd(NULL, 0) is supported. Jeremie Koenig proposed to use __GNUC__ as a compromise, but this might be a better solution, and can be used at many places. Should the cross-compiling message be added? Comments please!