source: git/src-cryptopp/adhoc.cpp.proto

Last change on this file was e230cb0, checked in by David Stainton <dstainton415@…>, at 2016-10-12T13:27:29Z

Add cryptopp from tag CRYPTOPP_5_6_5

  • Property mode set to 100644
File size: 847 bytes
Line 
1#include "config.h"
2#include <iosfwd>
3#include <string>
4
5#if CRYPTOPP_MSC_VERSION
6# pragma warning(disable: 4100 4189 4996)
7#endif
8
9#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
10# pragma GCC diagnostic ignored "-Wunused-variable"
11#endif
12
13USING_NAMESPACE(CryptoPP)
14USING_NAMESPACE(std)
15
16#ifndef CRYPTOPP_UNUSED
17# define CRYPTOPP_UNUSED(x) (void(x))
18#endif
19
20// Used for testing the compiler and linker in cryptest.sh
21#if defined(CRYPTOPP_ADHOC_MAIN)
22
23int main(int argc, char *argv[])
24{
25        CRYPTOPP_UNUSED(argc), CRYPTOPP_UNUSED(argv);
26        return 0;
27}
28
29// Classic use of adhoc to setup calling convention
30#else
31
32extern int (*AdhocTest)(int argc, char *argv[]);
33
34int MyAdhocTest(int argc, char *argv[])
35{
36        CRYPTOPP_UNUSED(argc), CRYPTOPP_UNUSED(argv);
37        return 0;
38}
39
40static int s_i = (AdhocTest = &MyAdhocTest, 0);
41
42#endif
Note: See TracBrowser for help on using the repository browser.