Make verify=helo do the verification on the fly it if was not done
[exim.git] / src / OS / os.c-HI-OSF
CommitLineData
61ec970d
PH
1/* $Cambridge: exim/src/OS/os.c-HI-OSF,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */
2
3/*************************************************
4* Exim - an Internet mail transport agent *
5*************************************************/
6
7/* Copyright (c) University of Cambridge 2001 */
8/* See the file NOTICE for conditions of use and distribution. */
9
10/* HI-OSF-specific code. This is concatenated onto the generic
11src/os.c file. OSF has an apparently unique way of getting the
12load average, so we provide a unique function here, and define
13OS_LOAD_AVERAGE to stop src/os.c trying to provide the function. */
14
15#ifndef OS_LOAD_AVERAGE
16#define OS_LOAD_AVERAGE
17
18#include <sys/table.h>
19
20int
21os_getloadavg(void)
22{
23double avg;
24struct tbl_loadavg load_avg;
25
26table (TBL_LOADAVG, 0, &load_avg, 1, sizeof (load_avg));
27
28avg = (load_avg.tl_lscale == 0)?
29 load_avg.tl_avenrun.d[0] :
30 (load_avg.tl_avenrun.l[0] / (double)load_avg.tl_lscale);
31
32return (int)(avg * 1000.0);
33}
34
35#endif /* OS_LOAD_AVERAGE */
36
37/* End of os.c-HI-OSF */