Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-05-18 08:30:09

0001 /****************************************************************************
0002  * Copyright 2018,2020 Thomas E. Dickey                                     *
0003  * Copyright 2009,2014 Free Software Foundation, Inc.                       *
0004  *                                                                          *
0005  * Permission is hereby granted, free of charge, to any person obtaining a  *
0006  * copy of this software and associated documentation files (the            *
0007  * "Software"), to deal in the Software without restriction, including      *
0008  * without limitation the rights to use, copy, modify, merge, publish,      *
0009  * distribute, distribute with modifications, sublicense, and/or sell       *
0010  * copies of the Software, and to permit persons to whom the Software is    *
0011  * furnished to do so, subject to the following conditions:                 *
0012  *                                                                          *
0013  * The above copyright notice and this permission notice shall be included  *
0014  * in all copies or substantial portions of the Software.                   *
0015  *                                                                          *
0016  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
0017  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
0018  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
0019  * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
0020  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
0021  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
0022  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
0023  *                                                                          *
0024  * Except as contained in this notice, the name(s) of the above copyright   *
0025  * holders shall not be used in advertising or otherwise to promote the     *
0026  * sale, use or other dealings in this Software without prior written       *
0027  * authorization.                                                           *
0028  ****************************************************************************/
0029 /* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen Exp $ */
0030 
0031 #ifndef NCURSES_DLL_H_incl
0032 #define NCURSES_DLL_H_incl 1
0033 
0034 /*
0035  * MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64.
0036  */
0037 #if defined(__MINGW64__)
0038 
0039 #ifndef _WIN64
0040 #define _WIN64 1
0041 #endif
0042 
0043 #elif defined(__MINGW32__)
0044 
0045 #ifndef _WIN32
0046 #define _WIN32 1
0047 #endif
0048 
0049 /* 2014-08-02 workaround for broken MinGW compiler.
0050  * Oddly, only TRACE is mapped to trace - the other -D's are okay.
0051  * suggest TDM as an alternative.
0052  */
0053 #if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
0054 
0055 #ifdef trace
0056 #undef trace
0057 #define TRACE
0058 #endif
0059 
0060 #endif  /* broken compiler */
0061 
0062 #endif  /* MingW */
0063 
0064 /*
0065  * For reentrant code, we map the various global variables into SCREEN by
0066  * using functions to access them.
0067  */
0068 #define NCURSES_PUBLIC_VAR(name) _nc_##name
0069 
0070 #if defined(BUILDING_NCURSES)
0071 # define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
0072 #else
0073 # define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
0074 #endif
0075 
0076 #define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
0077 
0078 #define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
0079 #define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
0080 
0081 /*
0082  * These symbols hide dllimport/dllexport, for compilers which care about it.
0083  */
0084 #if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
0085 # if defined(NCURSES_STATIC)    /* "static" here only implies "not-a-DLL" */
0086 #   define NCURSES_EXPORT_GENERAL_IMPORT
0087 #   define NCURSES_EXPORT_GENERAL_EXPORT
0088 # else
0089 #   define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
0090 #   define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
0091 # endif
0092 # define NCURSES_API __cdecl
0093 #else
0094 # define NCURSES_EXPORT_GENERAL_IMPORT
0095 # define NCURSES_EXPORT_GENERAL_EXPORT
0096 # define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
0097 #endif
0098 
0099 #endif /* NCURSES_DLL_H_incl */