The following differences exist for these functions:
In the SunOS 4.1 release, sprintf returns a pointer to its first argument; in the SunOS 5.x release, it returns the count of characters printed.
In the SunOS 4.1 release, printf and vprintf always return the number of characters printed or EOF, while the SunOS 5.x version returns only EOF in case of an error.
fprintf and vfprintf share the same differences as printf and vprintf (above); additionally, the buffering scheme for these routines is different for the SunOS 5.x and SunOS 4.1 release.
rand and srand
The SunOS 5.x returns the generated number shifted to the right by 16 and anded with 0x7fff, while the SunOS 4.1 release returns the generated number anded with 0x7fffffff.
re_comp and re_exec
These routines are similar to the regcmp(3G) and regex routines. re_comp compiles the regular expression in a string, returning 0 if it compiled successfully or returning a pointer to an error message if it did not. regcmp, on the other hand, returns a pointer to the compiled form or NULL if given an incorrect argument. re_exec returns 1 if the string s matches the last compiled regular expression, 0 if it fails to match, and -1 if the regular expression is invalid. regex, however, returns NULL on failure or a pointer to the next unmatched character on success.
readdir
Reads a directory entry. The SunOS 4.1 release readdir routine returns a pointer to struct direct, while the SunOS 5.x version returns a pointer to struct dirent.
setbuffer and setlinebuf
These routines are used to provide control over the buffering used for input and output.
Similar to setbuf(3S) and setvbuf, setbuffer may be used after a stream has been opened but before it is read or written. It uses the array pointer instead of an automatically allocated buffer. If the buffer is the NULL pointer, input/output is completely unbuffered.
setlinebuf is used to change the buffering on a stream from block buffered or unbuffered to line buffered. It can be used at any time that the file descriptor is active.
These routines are not available in the default SunOS 5.x release.
sleep
The SunOS 5.x version returns the ``unslept'' amount, that is, the requested time minus the time actually slept. The SunOS 4.1 version does not return anything.
sys_siglist
An array containing a message string for each SunOS 4.1 signal number.
times
The SunOS 4.1 version returns 0 when successful. The SunOS 5.x version returns the elapsed real time in clock ticks per second from an arbitrary point in the past.
ualarm and usleep
Simplified interfaces to the system calls handling high-resolution timers. These routines are not available in the default SunOS 5.x release.