Installation guide
Table 7–9: Terminal Capability Differences (cont.)
If You Use this
ULTRIX Option
Use this DIGITAL
UNIX Option
Library Used by C Compiler
−lcursesX −lcurses
X/Open curses library (System V
Release 3 curses and terminfo
functions on a DIGITAL UNIX
system)
−lcurses −D_BSD −lcurses
BSD 4.2 curses library
(BSD 4.3-5 curses functions on a
DIGITAL UNIX system)
In addition, the /usr/include/cursesX.h header file is replaced by
/usr/include/curses.h, so that you must change all pertinent cursesX
references in your source files and makefile.
7.8 Differences in Standard Interfaces
As described earlier, there are different versions of some library calls
included for compatibility with the ULTRIX system. There are a few areas
where ULTRIX specific library behavior is not in the DIGITAL UNIX
system. The following list describes the known differences in library
behavior that are not reflected by changes in the call interface or header
file. These differences require that you change your source code.
• The ULTRIX sprintf routine returns its first argument for success
and end-of-file (EOF) for failure. The DIGITAL UNIX sprintf routine
returns the number of displayable characters in the output (not
necessarily the number of bytes) for success and a negative number for
failure. The number returned for success does not include the
terminating \0 character.
• The printf, sprintf, and fprintf routines do not support the use of
the %D parameter. If applications use the %D parameter to display a
long number in decimal format, the routines print the character D
instead of the number. Instead, use the %d or %ld parameter in your
print routines.
• On ULTRIX systems, if you call malloc for a zero length buffer, a
pointer to the buffer is returned. The DIGITAL UNIX malloc call
returns a NULL pointer and sets errno to EINVAL.
• On ULTRIX systems, the default definition of the getpgrp system call
is:
int getpgrp(pid_t, pid_t)
Migrating Your ULTRIX Application to a DIGITAL UNIX System 7–41