[net.unix-wizards] Question on "#include <time.h>" vs "#include <sys/time.h>"

ado@elsie.UUCP (Arthur David Olson) (03/20/85)

UNIX systems have a file that you can include with the preprocessor directive
	#include <time.h>
4.1bsd systems also have such a file.  However, on 4.2bsd systems you include
the file with the preprocessor directive
	#include <sys/time.h>

I'd appreciate it if some wizard could fill in the blanks below:

	#include _________________
	#ifdef ___________________
	#include <time.h>
	#else
	#include <sys/time.h>
	#endif

I'd also appreciate fill-ins for these blanks:

	#include _________________
	#ifdef ___________________
	#include <time.h>
	#else
	#include <sys/time.h>
	#endif

(where, ideally, the blanks get filled in the same way).  Thanks for your help.
--
UNIX is an AT&T Bell Laboratories trademark.
Time is a Time, Incorporated trademark.
--
	UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!ado@seismo.ARPA
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks

chris@umcp-cs.UUCP (Chris Torek) (03/21/85)

(To refresh memories [RAS*]: the problem is that 4.2 moved various include
files from <foo.h> to <sys/foo.h>.)

How about this solution?  [Yes, yes, I realize it doesn't work when someone
*else* wants to run your code....]

	1 haigha # ln -s sys/time.h /usr/include/time.h
	2 haigha # ln -s sys/dir.h /usr/include/dir.h
	3 haigha #

Symbolic links do have their uses,
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland