annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/ncurses_dll.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /****************************************************************************
jpayne@69 2 * Copyright 2018-2020,2023 Thomas E. Dickey *
jpayne@69 3 * Copyright 2009,2014 Free Software Foundation, Inc. *
jpayne@69 4 * *
jpayne@69 5 * Permission is hereby granted, free of charge, to any person obtaining a *
jpayne@69 6 * copy of this software and associated documentation files (the *
jpayne@69 7 * "Software"), to deal in the Software without restriction, including *
jpayne@69 8 * without limitation the rights to use, copy, modify, merge, publish, *
jpayne@69 9 * distribute, distribute with modifications, sublicense, and/or sell *
jpayne@69 10 * copies of the Software, and to permit persons to whom the Software is *
jpayne@69 11 * furnished to do so, subject to the following conditions: *
jpayne@69 12 * *
jpayne@69 13 * The above copyright notice and this permission notice shall be included *
jpayne@69 14 * in all copies or substantial portions of the Software. *
jpayne@69 15 * *
jpayne@69 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
jpayne@69 17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
jpayne@69 18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
jpayne@69 19 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
jpayne@69 20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
jpayne@69 21 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
jpayne@69 22 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
jpayne@69 23 * *
jpayne@69 24 * Except as contained in this notice, the name(s) of the above copyright *
jpayne@69 25 * holders shall not be used in advertising or otherwise to promote the *
jpayne@69 26 * sale, use or other dealings in this Software without prior written *
jpayne@69 27 * authorization. *
jpayne@69 28 ****************************************************************************/
jpayne@69 29 /* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */
jpayne@69 30
jpayne@69 31 #ifndef NCURSES_DLL_H_incl
jpayne@69 32 #define NCURSES_DLL_H_incl 1
jpayne@69 33
jpayne@69 34 /*
jpayne@69 35 * MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64.
jpayne@69 36 */
jpayne@69 37 #if defined(__MINGW64__)
jpayne@69 38
jpayne@69 39 #ifndef _WIN64
jpayne@69 40 #define _WIN64 1
jpayne@69 41 #endif
jpayne@69 42
jpayne@69 43 #elif defined(__MINGW32__)
jpayne@69 44
jpayne@69 45 #ifndef _WIN32
jpayne@69 46 #define _WIN32 1
jpayne@69 47 #endif
jpayne@69 48
jpayne@69 49 /* 2014-08-02 workaround for broken MinGW compiler.
jpayne@69 50 * Oddly, only TRACE is mapped to trace - the other -D's are okay.
jpayne@69 51 * suggest TDM as an alternative.
jpayne@69 52 */
jpayne@69 53 #if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
jpayne@69 54
jpayne@69 55 #ifdef trace
jpayne@69 56 #undef trace
jpayne@69 57 #define TRACE
jpayne@69 58 #endif
jpayne@69 59
jpayne@69 60 #endif /* broken compiler */
jpayne@69 61
jpayne@69 62 #endif /* MingW */
jpayne@69 63
jpayne@69 64 /*
jpayne@69 65 * For reentrant code, we map the various global variables into SCREEN by
jpayne@69 66 * using functions to access them.
jpayne@69 67 */
jpayne@69 68 #define NCURSES_PUBLIC_VAR(name) _nc_##name
jpayne@69 69
jpayne@69 70 #if defined(BUILDING_NCURSES)
jpayne@69 71 # define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
jpayne@69 72 #else
jpayne@69 73 # define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
jpayne@69 74 #endif
jpayne@69 75
jpayne@69 76 #define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
jpayne@69 77
jpayne@69 78 #define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
jpayne@69 79 #define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
jpayne@69 80
jpayne@69 81 /*
jpayne@69 82 * These symbols hide dllimport/dllexport, for compilers which care about it.
jpayne@69 83 */
jpayne@69 84 #if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
jpayne@69 85 # if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
jpayne@69 86 # define NCURSES_EXPORT_GENERAL_IMPORT
jpayne@69 87 # define NCURSES_EXPORT_GENERAL_EXPORT
jpayne@69 88 # else
jpayne@69 89 # define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
jpayne@69 90 # define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
jpayne@69 91 # endif
jpayne@69 92 # define NCURSES_API __cdecl
jpayne@69 93 #else
jpayne@69 94 # define NCURSES_EXPORT_GENERAL_IMPORT
jpayne@69 95 # if (__GNUC__ >= 4) && !defined(__cplusplus)
jpayne@69 96 # define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default")))
jpayne@69 97 # else
jpayne@69 98 # define NCURSES_EXPORT_GENERAL_EXPORT
jpayne@69 99 # endif
jpayne@69 100 # define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
jpayne@69 101 #endif
jpayne@69 102
jpayne@69 103 #endif /* NCURSES_DLL_H_incl */