fixes for c_interface.h (Roberto Bagnara).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@533 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-06-14 21:28:02 +00:00
parent fe75673528
commit f48a21bbcb

View File

@ -24,6 +24,26 @@
#include "yap_structs.h"
#ifndef _Yap_c_interface_h
#define _Yap_c_interface_h 1
/*
__BEGIN_DECLS should be used at the beginning of the C declarations,
so that C++ compilers don't mangle their names. __END_DECLS is used
at the end of C declarations.
*/
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
__BEGIN_DECLS
#if defined(_MSC_VER) && defined(YAP_EXPORTS)
#define X_API __declspec(dllexport)
#else
@ -721,3 +741,7 @@ static int (*YapICurrentModule)() = YapCurrentModule;
#define InitCPred(N,A,F) UserCPredicate(N,F,A)
__END_DECLS
#endif