This code shows how extern "OS" with a function definition is used
to replace the #pragma linkage directive. See Chapter 23, Using ILE C/C++ Call Conventions for additional information.
Do not use this: | Use this: |
---|---|
#pragma datamodel (p128) typedef void (FUNC)(int); #pragma linkage (FUNC, OS) #pragma datamodel(pop) |
extern "OS" typedef void (FUNC) (int); |
typedef void (FUNC)(int) extern "OS" FUNC; //error |
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.