TNS/E Native Application Conversion Guide
C and C++ Conversion Tasks
TNS/E Native Application Conversion Guide—529659-003
3-11
Checking Calls to Changed C Library Functions
Checking Calls to Changed C Library
Functions
Functions Having Different Behavior
The following functions have changes in ISO/ANSI C standard implementation-defined
behavior. These changes affect only Guardian C functions and were made to match
the behavior of the TNS OSS environment and the UNIX computer industry
.
For more information, see the function’s reference page in the
Guardian Native C
Library Calls Reference Manual
.
The ecvt() function has changed to match the XPG4 Version 2 (X/OPEN UNIX)
specification.
For more information, see the ecvt(3) reference page online, in the
Open System
Services Library Calls Reference Manual
, or in the
Guardian Native C Library Calls
Reference Manual
.
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.










