ENH: Add support to C compiler identification for void return type from main. Cross-compilers for embedded platforms may require it.

This commit is contained in:
Brad King 2008-02-25 18:47:19 -05:00
parent 0a9f041d2f
commit 83c5f1b3f0
1 changed files with 7 additions and 0 deletions

View File

@ -3,7 +3,14 @@
#endif #endif
/* Provide main() so the program can link. */ /* Provide main() so the program can link. */
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#ifdef ID_VOID_MAIN
void main() {}
#else
int main() { return 0; } int main() { return 0; }
#endif
#if defined(__INTEL_COMPILER) || defined(__ICC) #if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel" # define COMPILER_ID "Intel"