sys/cdefs.h: Define __hidden as empty on Cygwin

Non-default visibility attributes are unsupported on PE/COFF, so don't
use in __hidden definition for Cygwin.  Add comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-11-08 16:14:43 +01:00
parent 172e2050d9
commit 9ba4744620
1 changed files with 5 additions and 0 deletions

View File

@ -466,8 +466,13 @@
#if __GNUC_PREREQ__(4, 0)
#define __sentinel __attribute__((__sentinel__))
#define __exported __attribute__((__visibility__("default")))
/* Only default visibility is supported on PE/COFF targets. */
#ifndef __CYGWIN__
#define __hidden __attribute__((__visibility__("hidden")))
#else
#define __hidden
#endif
#else
#define __sentinel
#define __exported
#define __hidden