From 82d8c4a8b5cb4ebeb0e1ffeef3550c1cb23909a4 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 2 Feb 2016 13:44:49 -0500 Subject: Fixed Asan and UBsan detection code. It appears GCC package maintainers are not going to fix the missing libraries --- adhoc.cpp.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'adhoc.cpp.proto') diff --git a/adhoc.cpp.proto b/adhoc.cpp.proto index ffe8e3b8..c8d59f94 100644 --- a/adhoc.cpp.proto +++ b/adhoc.cpp.proto @@ -12,6 +12,19 @@ USING_NAMESPACE(CryptoPP) USING_NAMESPACE(std) +// Used for testing the compiler and linker in cryptest.sh + +#if defined(CRYPTOPP_ADHOC_MAIN) + +int main(int argc, char *argv[]) +{ + CRYPTOPP_UNUSED(argc), CRYPTOPP_UNUSED(argv); + return 0; +} + +// Classic use of adhoc to setup calling convention +#else + extern int (*AdhocTest)(int argc, char *argv[]); int MyAdhocTest(int argc, char *argv[]) @@ -21,3 +34,5 @@ int MyAdhocTest(int argc, char *argv[]) } static int s_i = (AdhocTest = &MyAdhocTest, 0); + +#endif \ No newline at end of file -- cgit v1.2.1