provide for Coherent not having gettimeofday(2), imake style (bad, but this is not for others to use without a second thought anyway)
This commit is contained in:
11
sh.h
11
sh.h
@@ -152,7 +152,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.554 2012/05/04 21:15:34 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.555 2012/05/04 21:47:03 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R40 2012/04/27"
|
||||
|
||||
@@ -349,6 +349,15 @@ extern int __cdecl seteuid(uid_t);
|
||||
extern int __cdecl setegid(gid_t);
|
||||
#endif
|
||||
|
||||
#if defined(__COHERENT__)
|
||||
#define mksh_TIME(tv) do { \
|
||||
(tv).tv_usec = 0; \
|
||||
(tv).tv_sec = time(NULL); \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
#else
|
||||
#define mksh_TIME(tv) gettimeofday(&(tv), NULL)
|
||||
#endif
|
||||
|
||||
/* remove redundancies */
|
||||
|
||||
#if defined(MirBSD) && (MirBSD >= 0x08A8) && !defined(MKSH_OPTSTATIC)
|
||||
|
Reference in New Issue
Block a user