File: adhoc.cpp.proto

package info (click to toggle)
libcrypto++ 5.6.4-8
  • links: PTS
  • area: main
  • in suites: buster
  • size: 11,896 kB
  • ctags: 13,256
  • sloc: cpp: 69,231; sh: 4,117; asm: 4,090; makefile: 373
file content (42 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "config.h"
#include <iosfwd>
#include <string>

#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4100 4189 4996)
#endif

#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
# pragma GCC diagnostic ignored "-Wunused-variable"
#endif

USING_NAMESPACE(CryptoPP)
USING_NAMESPACE(std)

#ifndef CRYPTOPP_UNUSED
# define CRYPTOPP_UNUSED(x) (void(x))
#endif

// 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[])
{
	CRYPTOPP_UNUSED(argc), CRYPTOPP_UNUSED(argv);
	return 0;
}

static int s_i = (AdhocTest = &MyAdhocTest, 0);

#endif