TNS/R Native Application Migration Guide
C and C++ Migration Tasks
TNS/R Native Application Migration Guide—523745-001
3-13
Checking Calls to Changed C Library Functions
Checking Calls to Changed C Library
Functions
The following functions have changes in ISO/ANSI C standard implementation-defined
behavior. These changes affect only Guardian C functions. These changes were made
to match the behavior of the TNS OSS environment and the UNIX computer industry.
See the function’s reference page in the Guardian TNS/R Native C Library Calls
Reference Manual for more information.
The ecvt() function has changed to match the XPG4 Version 2 (X/OPEN UNIX)
specification.
See the ecvt(3) reference page online, in the Open System Services Library Calls
Reference Manual, or the Guardian TNS/R Native C Library Calls Reference Manual
for more information.
Changed Function Changed Behavior Action Required
exit() In the TNS Guardian environment, a
nonzero status parameter value
indicates abnormal termination. In
the native Guardian environment,
any status parameter value indicates
normal termination.
Change calls to the
terminate_program()
function to use the status
parameter to indicate
abnormal termination
fscanf()
scanf()
sscanf()
In the TNS Guardian environment,
the hyphen character in a scan set
denotes the hyphen character. In the
native Guardian environment, the
hyphen character might denote a
range of characters.
Make the hyphen the first or
last character in the scan set
to maintain the TNS Guardian
environment behavior.
remove() In the TNS Guardian environment,
the remove() function returns
Guardian error codes. In the native
Guardian environment, the function
sets standard errno values.
Change error handling code
following calls to the
remove() function to check
errno values.
Changed Function Changed Behavior Action Required
ecvt() In the TNS Guardian and OSS
environments, the second, third, and
fourth parameters are type short.
In the native Guardian and OSS
environments, these parameters are
type int.
Change calls to the ecvt()
function to use type int
instead of type short.