RAPI
R_ext/libextern.h
Go to the documentation of this file.
00001 /*
00002  *  R : A Computer Language for Statistical Data Analysis
00003  *  Copyright (C) 2001, 2004  The R Core Team.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU Lesser General Public License as published by
00007  *  the Free Software Foundation; either version 2.1 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Lesser General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Lesser General Public License
00016  *  along with this program; if not, a copy is available at
00017  *  https://www.R-project.org/Licenses/
00018  */
00019 
00020 /* Included by R.h: API on Windows */
00021 
00022 /* don't disallow including this one more than once */
00023 
00024 /* This is intended to be called from other header files, so not callable
00025    from C++ */
00026 
00027 #undef LibExtern
00028 #undef LibImport
00029 #undef LibExport
00030 
00031 /* Don't try to include CYGWIN here: decorating some symbols breaks
00032    the auto-export that it relies on, even if R_DLL_BUILD were set. */
00033 #ifdef _WIN32 /* _WIN32 as does not depend on config.h */
00034 #define LibImport __declspec(dllimport)
00035 #define LibExport __declspec(dllexport)
00036 #else
00037 #define LibImport
00038 #define LibExport
00039 #endif
00040 
00041 #ifdef __MAIN__
00042 #define LibExtern LibExport
00043 #define extern
00044 #elif defined(R_DLL_BUILD)
00045 #define LibExtern extern
00046 #else
00047 #define LibExtern extern LibImport
00048 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines