Back to index

tetex-bin  3.0
ncurses_dll.h
Go to the documentation of this file.
00001 /* $Id: ncurses_dll.h,v 1.4 2003/07/19 18:44:32 Charles.Wilson Exp $ */
00002 
00003 #ifndef NCURSES_DLL_H_incl
00004 #define NCURSES_DLL_H_incl 1
00005 
00006 /* no longer needed on cygwin or mingw, thanks to auto-import       */
00007 /* but this structure may be useful at some point for an MSVC build */
00008 /* so, for now unconditionally define the important flags           */
00009 /* "the right way" for proper static and dll+auto-import behavior   */
00010 #undef NCURSES_DLL
00011 #define NCURSES_STATIC
00012 
00013 #if defined(__CYGWIN__)
00014 #  if defined(NCURSES_DLL)
00015 #    if defined(NCURSES_STATIC)
00016 #      undef NCURSES_STATIC
00017 #    endif
00018 #  endif
00019 #  undef NCURSES_IMPEXP
00020 #  undef NCURSES_API
00021 #  undef NCURSES_EXPORT
00022 #  undef NCURSES_EXPORT_VAR
00023 #  if defined(NCURSES_DLL)
00024 /* building a DLL */
00025 #    define NCURSES_IMPEXP __declspec(dllexport)
00026 #  elif defined(NCURSES_STATIC)
00027 /* building or linking to a static library */
00028 #    define NCURSES_IMPEXP /* nothing */
00029 #  else
00030 /* linking to the DLL */
00031 #    define NCURSES_IMPEXP __declspec(dllimport)
00032 #  endif
00033 #  define NCURSES_API __cdecl
00034 #  define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
00035 #  define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
00036 #endif
00037 
00038 /* Take care of non-cygwin platforms */
00039 #if !defined(NCURSES_IMPEXP)
00040 #  define NCURSES_IMPEXP /* nothing */
00041 #endif
00042 #if !defined(NCURSES_API)
00043 #  define NCURSES_API /* nothing */
00044 #endif
00045 #if !defined(NCURSES_EXPORT)
00046 #  define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
00047 #endif
00048 #if !defined(NCURSES_EXPORT_VAR)
00049 #  define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
00050 #endif
00051 
00052 #endif /* NCURSES_DLL_H_incl */