1*06bfebdeSXin LI/**************************************************************************** 2*06bfebdeSXin LI * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. * 3*06bfebdeSXin LI * * 4*06bfebdeSXin LI * Permission is hereby granted, free of charge, to any person obtaining a * 5*06bfebdeSXin LI * copy of this software and associated documentation files (the * 6*06bfebdeSXin LI * "Software"), to deal in the Software without restriction, including * 7*06bfebdeSXin LI * without limitation the rights to use, copy, modify, merge, publish, * 8*06bfebdeSXin LI * distribute, distribute with modifications, sublicense, and/or sell * 9*06bfebdeSXin LI * copies of the Software, and to permit persons to whom the Software is * 10*06bfebdeSXin LI * furnished to do so, subject to the following conditions: * 11*06bfebdeSXin LI * * 12*06bfebdeSXin LI * The above copyright notice and this permission notice shall be included * 13*06bfebdeSXin LI * in all copies or substantial portions of the Software. * 14*06bfebdeSXin LI * * 15*06bfebdeSXin LI * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 16*06bfebdeSXin LI * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 17*06bfebdeSXin LI * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 18*06bfebdeSXin LI * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 19*06bfebdeSXin LI * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 20*06bfebdeSXin LI * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 21*06bfebdeSXin LI * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 22*06bfebdeSXin LI * * 23*06bfebdeSXin LI * Except as contained in this notice, the name(s) of the above copyright * 24*06bfebdeSXin LI * holders shall not be used in advertising or otherwise to promote the * 25*06bfebdeSXin LI * sale, use or other dealings in this Software without prior written * 26*06bfebdeSXin LI * authorization. * 27*06bfebdeSXin LI ****************************************************************************/ 28*06bfebdeSXin LI/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */ 29*06bfebdeSXin LI 30*06bfebdeSXin LI#ifndef NCURSES_DLL_H_incl 31*06bfebdeSXin LI#define NCURSES_DLL_H_incl 1 32*06bfebdeSXin LI 33*06bfebdeSXin LI/* 34*06bfebdeSXin LI * For reentrant code, we map the various global variables into SCREEN by 35*06bfebdeSXin LI * using functions to access them. 36*06bfebdeSXin LI */ 37*06bfebdeSXin LI#define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name 38*06bfebdeSXin LI#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) 39*06bfebdeSXin LI 40*06bfebdeSXin LI/* no longer needed on cygwin or mingw, thanks to auto-import */ 41*06bfebdeSXin LI/* but this structure may be useful at some point for an MSVC build */ 42*06bfebdeSXin LI/* so, for now unconditionally define the important flags */ 43*06bfebdeSXin LI/* "the right way" for proper static and dll+auto-import behavior */ 44*06bfebdeSXin LI#undef NCURSES_DLL 45*06bfebdeSXin LI#define NCURSES_STATIC 46*06bfebdeSXin LI 47*06bfebdeSXin LI#if defined(__CYGWIN__) || defined(__MINGW32__) 48*06bfebdeSXin LI# if defined(NCURSES_DLL) 49*06bfebdeSXin LI# if defined(NCURSES_STATIC) 50*06bfebdeSXin LI# undef NCURSES_STATIC 51*06bfebdeSXin LI# endif 52*06bfebdeSXin LI# endif 53*06bfebdeSXin LI# undef NCURSES_IMPEXP 54*06bfebdeSXin LI# undef NCURSES_API 55*06bfebdeSXin LI# undef NCURSES_EXPORT 56*06bfebdeSXin LI# undef NCURSES_EXPORT_VAR 57*06bfebdeSXin LI# if defined(NCURSES_DLL) 58*06bfebdeSXin LI/* building a DLL */ 59*06bfebdeSXin LI# define NCURSES_IMPEXP __declspec(dllexport) 60*06bfebdeSXin LI# elif defined(NCURSES_STATIC) 61*06bfebdeSXin LI/* building or linking to a static library */ 62*06bfebdeSXin LI# define NCURSES_IMPEXP /* nothing */ 63*06bfebdeSXin LI# else 64*06bfebdeSXin LI/* linking to the DLL */ 65*06bfebdeSXin LI# define NCURSES_IMPEXP __declspec(dllimport) 66*06bfebdeSXin LI# endif 67*06bfebdeSXin LI# define NCURSES_API __cdecl 68*06bfebdeSXin LI# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API 69*06bfebdeSXin LI# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type 70*06bfebdeSXin LI#endif 71*06bfebdeSXin LI 72*06bfebdeSXin LI/* Take care of non-cygwin platforms */ 73*06bfebdeSXin LI#if !defined(NCURSES_IMPEXP) 74*06bfebdeSXin LI# define NCURSES_IMPEXP /* nothing */ 75*06bfebdeSXin LI#endif 76*06bfebdeSXin LI#if !defined(NCURSES_API) 77*06bfebdeSXin LI# define NCURSES_API /* nothing */ 78*06bfebdeSXin LI#endif 79*06bfebdeSXin LI#if !defined(NCURSES_EXPORT) 80*06bfebdeSXin LI# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API 81*06bfebdeSXin LI#endif 82*06bfebdeSXin LI#if !defined(NCURSES_EXPORT_VAR) 83*06bfebdeSXin LI# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type 84*06bfebdeSXin LI#endif 85*06bfebdeSXin LI 86*06bfebdeSXin LI#endif /* NCURSES_DLL_H_incl */ 87