summaryrefslogtreecommitdiff
path: root/mcon/U/i_systimeb.U
blob: 63dd0e672b063e7e2ad536066e55aa871aead39a (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
50
51
52
53
54
55
?RCS: $Id: i_systimeb.U 1 2006-08-24 12:32:52Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS: 
?RCS: You may redistribute only under the terms of the Artistic Licence,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_systimeb.U,v $
?RCS: Revision 3.0  1993/08/18  12:08:37  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?X:
?X: This unit looks wether <sys/timeb.h> should be included
?X: or not when using ftime() (for struct timeb definition).
?X:
?X:	Force looking for <sys/time.h> for struct timeb.
?X:INC: i_systime
?MAKE:i_systimeb: test contains Loc Setvar Findhdr
?MAKE:	-pick add $@ %<
?S:i_systimeb:
?S:	This variable conditionally defines I_SYS_TIMEB, which indicates
?S:	to the C program that it should include <sys/timeb.h>.
?S:.
?C:I_SYS_TIMEB (I_SYSTIMEB):
?C:	This symbol, if defined, indicates to the C program that it should
?C:	include <sys/timeb.h>, in order to define struct timeb (some systems
?C:	define this in <sys/time.h>). This is useful when using ftime().
?C:	You should include <sys/time.h> if I_SYS_TIMEB is not defined,
?C:	nor is I_SYS_TIME.
?C:.
?H:#$i_systimeb I_SYS_TIMEB		/**/
?H:.
?T:xxx
?LINT:set i_systimeb
: see where struct timeb is defined
echo " "
xxx=`./findhdr sys/timeb.h`
if $test "$xxx"; then
	if $contains 'struct timeb' $xxx >/dev/null 2>&1; then
		val="$define"
		echo "You have struct timeb defined in <sys/timeb.h>." >&4
	else
		val="$undef"
		echo "Assuming struct timeb is defined in <sys/time.h>." >&4
	fi
else
	val="$undef"
echo "No <sys/timeb.h> -- Assuming struct timeb is defined in <sys/time.h>." >&4
fi
set i_systimeb
eval $setvar