>What's the difference between calling C/C++ runtime library functions and your 
>own library functions? There's no difference in the C/C++ languages per se.




Well, for the topic at hand, there is, I think.


If you code your own C/C++, the compiler generates the code, and it includes 
the C/C++ signature CSECT CEESG003 is included in the resulting load module. 
This way LE knows that this is C/C++ code and makes sure the C/C++ LE 
Environment is initialized before your code gets control.


If, on the other hand, you call C/C++ runtime library routines, the final code 
is not located via LOAD, but via some table with entry point addresses. This is 
what the stub code does. In the example given, the CUSERID code was not found, 
unless the stub was linked to the module, or the CUSERID stub was LOADed. 
Unfortunately, the stub does not contain the C/C+ signature CSECT, thus the 
entry point address was not found, hence the S0C1.




I agree that there is no difference between your own C/C++ code and runtime 
library functions when takling about parameters and return values.


I would assume all the above equally applies to the other LE HLLs, such as PL/I 
and Cobol.


--
Peter Hunkeler



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to