diff options
Diffstat (limited to 'src/include/cvc4_public.h')
-rw-r--r-- | src/include/cvc4_public.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/include/cvc4_public.h b/src/include/cvc4_public.h new file mode 100644 index 000000000..4de3faf4c --- /dev/null +++ b/src/include/cvc4_public.h @@ -0,0 +1,50 @@ +/********************* */ +/** cvc4_public.h + ** Original author: mdeters + ** Major contributors: none + ** Minor contributors (to current version): none + ** This file is part of the CVC4 prototype. + ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys) + ** Courant Institute of Mathematical Sciences + ** New York University + ** See the file COPYING in the top-level source directory for licensing + ** information. + ** + ** Macros that should be defined everywhere during the building of + ** the libraries and driver binary, and also exported to the user. + **/ + +#ifndef __CVC4_PUBLIC_H +#define __CVC4_PUBLIC_H + +#if defined _WIN32 || defined __CYGWIN__ +# ifdef BUILDING_DLL +# ifdef __GNUC__ +# define CVC4_PUBLIC __attribute__((dllexport)) +# else /* ! __GNUC__ */ +# define CVC4_PUBLIC __declspec(dllexport) +# endif /* __GNUC__ */ +# else /* BUILDING_DLL */ +# ifdef __GNUC__ +# define CVC4_PUBLIC __attribute__((dllimport)) +# else /* ! __GNUC__ */ +# define CVC4_PUBLIC __declspec(dllimport) +# endif /* __GNUC__ */ +# endif /* BUILDING_DLL */ +#else /* !( defined _WIN32 || defined __CYGWIN__ ) */ +# if __GNUC__ >= 4 +# define CVC4_PUBLIC __attribute__ ((visibility("default"))) +# else /* !( __GNUC__ >= 4 ) */ +# define CVC4_PUBLIC +# endif /* __GNUC__ >= 4 */ +#endif /* defined _WIN32 || defined __CYGWIN__ */ + +#define EXPECT_TRUE(x) __builtin_expect( (x), true) +#define EXPECT_FALSE(x) __builtin_expect( (x), false) +#define NORETURN __attribute__ ((noreturn)) + +#ifndef NULL +# define NULL ((void*) 0) +#endif + +#endif /* __CVC4_PUBLIC_H */ |