This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
B20.1: <sys/time.h> missing timercmp macro
- To: <cygwin@sourceware.cygnus.com>
- Subject: B20.1: <sys/time.h> missing timercmp macro
- From: "Eric Tang" <etang@ind.tansu.com.au>
- Date: Mon, 24 May 1999 23:52:46 +1000
- Organization: Telstra Corporation
- Reply-To: "Eric Tang" <etang@ind.tansu.com.au>
Problem: When compiling cgoban-1.9.5, error reported on missing timercmp.
Solution: In <sys/time.h>, the following should be added:
#ifndef _GNU_H_WINDOWS32_SOCKETS
struct timeval {
long tv_sec;
long tv_usec;
};
// <- add the following:
/*
Operations on timevals.
NB: timercmp does not work for >= or <=.
*/
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) \
|| (tvp)->tv_sec cmp (uvp)->tv_sec)
#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
// <- end of addition
--
Eric
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com