Util: include assert.h in pthreads_nosig.h when required
[openafs.git] / src / util / hputil.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include <afsconfig.h>
11 #include <afs/param.h>
12
13
14 #ifdef AFS_HPUX_ENV
15 #include <stdio.h>
16 #include <sys/types.h>
17 #include <sys/time.h>
18 #include <utime.h>
19
20 /* insque/remque moved to timer.c where they are used. */
21
22 #ifndef AFS_HPUX102_ENV
23 int
24 utimes(char *file, struct timeval tvp[2])
25 {
26     struct utimbuf times;
27
28     times.actime = tvp[0].tv_sec;
29     times.modtime = tvp[1].tv_sec;
30     return (utime(file, &times));
31 }
32 #endif
33
34 int
35 random(void)
36 {
37     return rand();
38 }
39
40 void
41 srandom(int seed)
42 {
43     srand(seed);
44 }
45
46 int
47 getdtablesize(void)
48 {
49     return (20);
50 }
51
52 void
53 setlinebuf(FILE * file)
54 {
55     setbuf(file, NULL);
56 }
57
58 void
59 psignal(unsigned int sig, char *s)
60 {
61     fprintf(stderr, "%s: signal %d\n", s, sig);
62 }
63 #endif /* AFS_HPUX_ENV */