]> Savannah Git Hosting - gnulib.git/commit
test-open: port to cygwin, which lacks Fortify
authorEric Blake <eblake@redhat.com>
Wed, 30 Jul 2014 23:11:49 +0000 (17:11 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 31 Jul 2014 03:15:18 +0000 (21:15 -0600)
commitd98277fd170f238ec97972c27d96fe5db3ed0929
tree7f620cf73873ebc43385f1f1c20f81d4a08a215e
parent5acee27d5d25bdf9ae42a157856cf12f871494ea
test-open: port to cygwin, which lacks Fortify

On cygwin, with gcc 4.8.3, I get this compilation warning:

In file included from ../../gltests/test-open.c:35:0:
../../gltests/test-open.h:35:1: warning: always_inline function might not be inlinable [-Wattributes]
 test_open (int (*func) (char const *, int, ...), bool print)
 ^

On that platform, there are no Fortify enhancements, and the
internal macro __always_inline is always defined to turn on the
gcc attribute, contrary to our needs.  Since relying on a __
prefix is already risky, it's better to limit the workaround of
commit d6ba92ea to just glibc.

* tests/test-open.h (ALWAYS_INLINE): New macro.
(__always_inline): Don't abuse internal symbol on non-glibc.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
tests/test-open.h