EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
testMain.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * SPDX-License-Identifier: EPICS
5 * EPICS BASE is distributed subject to a Software License Agreement found
6 * in file LICENSE that is included with this distribution.
7 \*************************************************************************/
8 
9 #ifndef INC_testMain_H
10 #define INC_testMain_H
11 
42 #if defined(__rtems__)
43  #ifdef __cplusplus
44  #define MAIN(prog) extern "C" int prog(void); extern "C" int main() __attribute__((weak, alias(#prog))); extern "C" int prog(void)
45  #else
46  #define MAIN(prog) int prog(); int main() __attribute__((weak, alias(#prog))); int prog()
47  #endif
48 #elif defined(vxWorks)
49  #ifdef __cplusplus
50  #define MAIN(prog) extern "C" int prog(void)
51  #else
52  #define MAIN(prog) int prog()
53  #endif
54 #else
55  #ifdef __cplusplus
56  #define MAIN(prog) int main(int /*argc*/, char * /*argv*/ [] )
57  #else
58  #define MAIN(prog) int main(int argc, char *argv[] )
59  #endif
60 #endif
61 
62 
63 #endif /* INC_testMain_H */