X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2Fncurses_dll.h.in;h=437c54de0271560d58c112a65f096e7dd67016dc;hp=ac351e7ca7c51bd6985385ffdcd5afe115794ef0;hb=HEAD;hpb=04d942c3d98cf0a929c6afb17be8c10d4ae39af0 diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in index ac351e7c..401d47a8 100644 --- a/include/ncurses_dll.h.in +++ b/include/ncurses_dll.h.in @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2023 Thomas E. Dickey * * Copyright 2009,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -26,7 +26,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ -/* $Id: ncurses_dll.h.in,v 1.16 2020/07/04 23:07:54 tom Exp $ */ +/* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */ #ifndef NCURSES_DLL_H_incl #define NCURSES_DLL_H_incl 1 @@ -81,7 +81,7 @@ /* * These symbols hide dllimport/dllexport, for compilers which care about it. */ -#if defined(__CYGWIN__) || defined(_WIN32) +#if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64)) # if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */ # define NCURSES_EXPORT_GENERAL_IMPORT # define NCURSES_EXPORT_GENERAL_EXPORT @@ -92,7 +92,11 @@ # define NCURSES_API __cdecl #else # define NCURSES_EXPORT_GENERAL_IMPORT -# define NCURSES_EXPORT_GENERAL_EXPORT +# if (__GNUC__ >= 4) && !defined(__cplusplus) +# define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default"))) +# else +# define NCURSES_EXPORT_GENERAL_EXPORT +# endif # define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */ #endif