Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: i_systimeb.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
4 | ?RCS: | |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, | |
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 | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 4.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: i_systimeb.U,v $ | |
12 | ?RCS: Revision 3.0 1993/08/18 12:08:37 ram | |
13 | ?RCS: Baseline for dist 3.0 netwide release. | |
14 | ?RCS: | |
15 | ?X: | |
16 | ?X: This unit looks wether <sys/timeb.h> should be included | |
17 | ?X: or not when using ftime() (for struct timeb definition). | |
18 | ?X: | |
19 | ?X: Force looking for <sys/time.h> for struct timeb. | |
20 | ?X:INC: i_systime | |
21 | ?MAKE:i_systimeb: test contains Loc Setvar Findhdr | |
22 | ?MAKE: -pick add $@ %< | |
23 | ?S:i_systimeb: | |
24 | ?S: This variable conditionally defines I_SYS_TIMEB, which indicates | |
25 | ?S: to the C program that it should include <sys/timeb.h>. | |
26 | ?S:. | |
27 | ?C:I_SYS_TIMEB (I_SYSTIMEB): | |
28 | ?C: This symbol, if defined, indicates to the C program that it should | |
29 | ?C: include <sys/timeb.h>, in order to define struct timeb (some systems | |
30 | ?C: define this in <sys/time.h>). This is useful when using ftime(). | |
31 | ?C: You should include <sys/time.h> if I_SYS_TIMEB is not defined, | |
32 | ?C: nor is I_SYS_TIME. | |
33 | ?C:. | |
34 | ?H:#$i_systimeb I_SYS_TIMEB /**/ | |
35 | ?H:. | |
36 | ?T:xxx | |
37 | ?LINT:set i_systimeb | |
38 | : see where struct timeb is defined | |
39 | echo " " | |
40 | xxx=`./findhdr sys/timeb.h` | |
41 | if $test "$xxx"; then | |
42 | if $contains 'struct timeb' $xxx >/dev/null 2>&1; then | |
43 | val="$define" | |
44 | echo "You have struct timeb defined in <sys/timeb.h>." >&4 | |
45 | else | |
46 | val="$undef" | |
47 | echo "Assuming struct timeb is defined in <sys/time.h>." >&4 | |
48 | fi | |
49 | else | |
50 | val="$undef" | |
51 | echo "No <sys/timeb.h> -- Assuming struct timeb is defined in <sys/time.h>." >&4 | |
52 | fi | |
53 | set i_systimeb | |
54 | eval $setvar | |
55 |