Installation guide
Table 7–7: Routines in the ULTRIX BSD Compatibility Library (cont.)
Routine Name Compatibility
int rand()
void srand(u_int seed)
The rand() routine returns a number
in the range of 0 to 2
31
−1. The srand()
routine provides a seed for the random
number generator.
char *re_comp(char *)
Converts a string into an internal form
suitable for pattern matching. Returns 0
if the string was compiled successfully;
otherwise, returns a pointer to an error
message.
int re_exec(char *)
Compares the string parameter with the
last string passed to the re_comp()
function. Returns 1 if the string matches
the last compiled regular expression.
(The default returns 1 when the string
fails to match the regular expression.)
Returns 0 if the string fails to match the
last compiled regular expression. (The
default returns 0 if the string does
match the regular expression.) Returns
−1 if the compiled regular expression is
invalid (indicating an internal error).
int siginterrupt(int, int)
Allows you to set the signal state so that
system calls are restarted if they are
interrupted by the specified signal and
no data has been transferred.
sig_t signal(int, sig_t)
Causes the system to preserve the value
of the SA_RESTART flag if your process
explicitly enables or disables system call
restart by using the siginterrupt()
call.
char *timezone(int, int)
The arguments are the number of
minutes of time you are westward from
Greenwich and whether daylight saving
time (DST) is in effect. Returns a string
giving the name of the local time zone.
Provided for compatibility only.
char * valloc(size_t)
Allocates bytes aligned on a page
boundary. Provided for compatibility
only.
int vtimes(struct vtimes*, struct
vtimes*)
Returns accounting information for the
current process and for the terminated
child processes of the current process.
Provided for compatibility only;
superseded by the getrusage()
function.
7–38 Migrating Your ULTRIX Application to a DIGITAL UNIX System