Commit | Line | Data |
---|---|---|
959f3c4c JH |
1 | ?RCS: $Id: d_times.U,v 3.0.1.2 1995/07/25 14:07:50 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
4c42341b | 4 | ?RCS: |
65a32477 | 5 | ?RCS: You may redistribute only under the terms of the Artistic License, |
959f3c4c JH |
6 | ?RCS: as specified in the README file that comes with the distribution. |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
65a32477 | 8 | ?RCS: that same Artistic License; a copy of which may be found at the root |
959f3c4c JH |
9 | ?RCS: of the source tree for dist 3.0. |
10 | ?RCS: | |
11 | ?RCS: $Log: d_times.U,v $ | |
12 | ?RCS: Revision 3.0.1.2 1995/07/25 14:07:50 ram | |
13 | ?RCS: patch56: typo fix, sytem -> system | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.1 1994/08/29 16:14:00 ram | |
16 | ?RCS: patch32: now uses new Typedef unit to compute type information | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0 1993/08/18 12:07:46 ram | |
19 | ?RCS: Baseline for dist 3.0 netwide release. | |
20 | ?RCS: | |
21 | ?X: | |
22 | ?X: What is the type returned by times() ? | |
23 | ?X: | |
24 | ?X: Force inclusion of <sys/types.h> | |
25 | ?X:INC: i_systypes | |
26 | ?MAKE:d_times clocktype: Csym Myread Typedef i_systimes | |
27 | ?MAKE: -pick add $@ %< | |
28 | ?S:d_times: | |
29 | ?S: This variable conditionally defines the HAS_TIMES symbol, which indicates | |
4dd7201d | 30 | ?S: that the times() routine exists. The times() routine is normally |
959f3c4c JH |
31 | ?S: provided on UNIX systems. You may have to include <sys/times.h>. |
32 | ?S:. | |
33 | ?S:clocktype: | |
34 | ?S: This variable holds the type returned by times(). It can be long, | |
35 | ?S: or clock_t on BSD sites (in which case <sys/types.h> should be | |
36 | ?S: included). | |
37 | ?S:. | |
38 | ?C:HAS_TIMES (TIMES): | |
39 | ?C: This symbol, if defined, indicates that the times() routine exists. | |
40 | ?C: Note that this became obsolete on some systems (SUNOS), which now | |
41 | ?C: use getrusage(). It may be necessary to include <sys/times.h>. | |
42 | ?C:. | |
43 | ?C:Clock_t (CLOCKTYPE): | |
44 | ?C: This symbol holds the type returned by times(). It can be long, | |
45 | ?C: or clock_t on BSD sites (in which case <sys/types.h> should be | |
46 | ?C: included). | |
47 | ?C:. | |
48 | ?H:#$d_times HAS_TIMES /**/ | |
49 | ?H:#define Clock_t $clocktype /* Clock time */ | |
50 | ?H:. | |
959f3c4c JH |
51 | ?T:val inc |
52 | : see if times exists | |
53 | echo " " | |
54 | if set times val -f d_times; eval $csym; $val; then | |
55 | echo 'times() found.' >&4 | |
56 | d_times="$define" | |
57 | inc='' | |
58 | case "$i_systimes" in | |
59 | "$define") inc='sys/times.h';; | |
60 | esac | |
61 | rp="What is the type returned by times() on this system?" | |
62 | set clock_t clocktype long stdio.h sys/types.h $inc | |
63 | eval $typedef_ask | |
64 | else | |
65 | echo 'times() NOT found, hope that will do.' >&4 | |
66 | d_times="$undef" | |
67 | ?X: The following is needed for typedef (won't like an empty variable) | |
68 | clocktype='int' | |
69 | fi | |
70 |