-
Notifications
You must be signed in to change notification settings - Fork 68
/
callout.c
64 lines (53 loc) · 1002 Bytes
/
callout.c
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "testLibrary.h"
//Deprecated
EXPORT(int) returnAnswer(){
return 42;
}
//Deprecated
EXPORT(int) sumTwoNumbers(int a, int b){
return a+b;
}
//Deprecated
EXPORT(float) sumAFloatAndADouble(float a, double b){
return a+b;
}
EXPORT(int) shortCallout(){
return 42;
}
EXPORT(int) longCallout(int seconds){
// will sleep for number of seconds
#if defined(_WIN32)
Sleep(seconds * 1000);
#else
sleep(seconds);
#endif
return 1;
}
EXPORT(int) multipleArgumentCallout(
int arg1,
int arg2,
int arg3,
int arg4,
int arg5,
int arg6,
int arg7,
int arg8,
int arg9,
int arg10){
return arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10;
}
#if (defined (__x86_64__) && defined (__APPLE__))
__attribute__((ms_abi)) EXPORT(int) w64Convention(
int arg1,
int arg2,
int arg3,
int arg4,
int arg5,
int arg6,
int arg7,
int arg8,
int arg9,
int arg10){
return arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10;
}
#endif