diff options
Diffstat (limited to 'tests/cpp-compiler/c-compile-pass-through-shared-library.c')
| -rw-r--r-- | tests/cpp-compiler/c-compile-pass-through-shared-library.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tests/cpp-compiler/c-compile-pass-through-shared-library.c b/tests/cpp-compiler/c-compile-pass-through-shared-library.c index 143817325..2dca175ee 100644 --- a/tests/cpp-compiler/c-compile-pass-through-shared-library.c +++ b/tests/cpp-compiler/c-compile-pass-through-shared-library.c @@ -1,24 +1,23 @@ -//TEST(smoke):CPP_COMPILER_COMPILE: -pass-through c -entry test -target callable +// TEST(smoke):CPP_COMPILER_COMPILE: -pass-through c -entry test -target callable -#include <stdlib.h> #include <stdio.h> -#include <string.h> - +#include <stdlib.h> +#include <string.h> + #if defined(_MSC_VER) -# define DLL_EXPORT __declspec(dllexport) -#else -# define DLL_EXPORT __attribute__((__visibility__("default"))) -#endif +#define DLL_EXPORT __declspec(dllexport) +#else +#define DLL_EXPORT __attribute__((__visibility__("default"))) +#endif -#ifdef __cplusplus +#ifdef __cplusplus #define EXTERN_C extern "C" #else -#define EXTERN_C -#endif - +#define EXTERN_C +#endif + EXTERN_C DLL_EXPORT int test(int intValue, const char* textValue, char* outTextValue) { strcpy(outTextValue, textValue); return intValue; } - |
