From 602ca418986f3b5499c2164bfa69fb252b88cd1f Mon Sep 17 00:00:00 2001 From: cgf Date: Fri, 11 Nov 2005 04:07:29 +0000 Subject: [PATCH] * times.cc (hires_ms::prime): Comment out call to timeBeginPeriod for now. (hires_ms::usecs): Call prime if haven't called began_period(). * param.h: Don't define stuff that is already defined in endian.h. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/include/sys/param.h | 2 ++ winsup/cygwin/times.cc | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0c93d695c7..14da5b4058 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,13 @@ 2005-11-10 Christopher Faylor + * times.cc (hires_ms::prime): Comment out call to timeBeginPeriod for + now. + (hires_ms::usecs): Call prime if haven't called began_period(). + + * param.h: Don't define stuff that is already defined in endian.h. + +2005-11-10 Christopher Faylor + * include/endian.h: Remove USE_BSD ifdef since it is never defined on Cygwin. diff --git a/winsup/cygwin/include/sys/param.h b/winsup/cygwin/include/sys/param.h index 811b5ee565..349313f20a 100644 --- a/winsup/cygwin/include/sys/param.h +++ b/winsup/cygwin/include/sys/param.h @@ -38,6 +38,7 @@ BSD variant of this constant. */ #define DEV_BSIZE 1024 +#if 0 /* defined in endian.h */ /* Some autoconf'd packages check for endianness. When cross-building we can't run programs on the target. Fortunately, autoconf supports the definition of byte order in sys/param.h (that's us!). @@ -48,6 +49,7 @@ /* All known win32 systems are little endian. */ #define BYTE_ORDER LITTLE_ENDIAN +#endif #ifndef NULL #define NULL 0L diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 3d762464f8..be091dad2b 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -649,7 +649,9 @@ stupid_printf ("inited %d, minperiod %u, began_period %d", minperiod, began_peri if (!began_period) { +#if 0 timeBeginPeriod (minperiod); +#endif began_period = true; stupid_printf ("timeBeginPeriod called"); } @@ -681,7 +683,7 @@ LONGLONG hires_ms::usecs (bool justdelta) { stupid_printf ("before call to prime(), minperiod %u, process priority %d", minperiod, GetThreadPriority (GetCurrentThread ())); - if (!minperiod) /* NO_COPY variable */ + if (!inited || !began_period) /* NO_COPY variable */ prime (); stupid_printf ("after call to prime(), process priority %d", GetThreadPriority (GetCurrentThread ())); -- 2.11.0