aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/hpux/port.c
blob: 8f37cd44484ef20eeab237aadd94894e14ae724b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*-------------------------------------------------------------------------
 *
 * port.c--
 *	  port-specific routines for HP-UX
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *	  $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.3 1997/09/07 04:45:52 momjian Exp $
 *
 * NOTES
 *	  For the most part, this file gets around some non-POSIX calls
 *	  in POSTGRES.
 *
 *-------------------------------------------------------------------------
 */
#include <unistd.h>				/* for rand()/srand() prototypes */
#include <math.h>				/* for pow() prototype */
#include <sys/syscall.h>		/* for syscall #defines */

#include "c.h"

void
init_address_fixup()
{

	/*
	 * On PA-RISC, unaligned access fixup is handled by the compiler, not
	 * by the kernel.
	 */
}

long
random()
{
	return (lrand48());
}

void
srandom(unsigned seed)
{
	srand48((long int) seed);
}

getrusage(int who, struct rusage * ru)
{
	return (syscall(SYS_GETRUSAGE, who, ru));
}