|
12 | 12 | * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
13 | 13 | * Portions Copyright (c) 1994, Regents of the University of California
|
14 | 14 | *
|
15 |
| - * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.143 2004/01/0921:08:50 momjian Exp $ |
| 15 | + * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.144 2004/01/0923:29:31 momjian Exp $ |
16 | 16 | *
|
17 | 17 | * NOTES
|
18 | 18 | * some of the information in this file should be moved to
|
@@ -96,19 +96,22 @@ do { \
|
96 | 96 | CritSectionCount--; \
|
97 | 97 | } while(0)
|
98 | 98 |
|
| 99 | +#ifndefWIN32 |
99 | 100 | #definePG_USLEEP(_usec) \
|
100 | 101 | do { \
|
101 |
| -#ifndef WIN32 |
102 | 102 | /* This will overflow on systems with 32-bit ints for > ~2000 secs */ \
|
103 | 103 | struct timeval delay; \
|
104 | 104 | \
|
105 | 105 | delay.tv_sec = (_usec) / 1000000; \
|
106 | 106 | delay.tv_usec = ((_usec) % 1000000); \
|
107 | 107 | (void) select(0, NULL, NULL, NULL, &delay); \
|
| 108 | +} while(0) |
108 | 109 | #else
|
109 |
| -Sleep(_usec<500) ?1 : (_usec+500)/1000); |
110 |
| -#endif |
| 110 | +#definePG_USLEEP(_usec) \ |
| 111 | +do { \ |
| 112 | +Sleep(_usec < 500) ? 1 : (_usec+500)/ 1000); \ |
111 | 113 | } while(0)
|
| 114 | +#endif |
112 | 115 |
|
113 | 116 | /*****************************************************************************
|
114 | 117 | * globals.h -- *
|
|