File tree 1 file changed +7
-7
lines changed 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 9
9
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
10
10
* Portions Copyright (c) 1994, Regents of the University of California
11
11
*
12
- * $PostgreSQL: pgsql/src/include/utils/datetime.h,v 1.52 2004/12/31 22 :03:45 pgsql Exp $
12
+ * $PostgreSQL: pgsql/src/include/utils/datetime.h,v 1.53 2005/05/24 04 :03:01 momjian Exp $
13
13
*
14
14
*-------------------------------------------------------------------------
15
15
*/
@@ -203,8 +203,8 @@ typedef struct
203
203
*/
204
204
#define FMODULO (t ,q ,u ) \
205
205
do { \
206
- q = ((t < 0) ? ceil(t / u) : floor(t / u )); \
207
- if (q != 0) t -= rint(q * u ); \
206
+ (q) = (((t) < 0) ? ceil((t) / (u)) : floor((t) / (u) )); \
207
+ if ((q) != 0) (t) -= rint((q) * (u) ); \
208
208
} while(0)
209
209
210
210
/* TMODULO()
@@ -215,14 +215,14 @@ do { \
215
215
#ifdef HAVE_INT64_TIMESTAMP
216
216
#define TMODULO (t ,q ,u ) \
217
217
do { \
218
- q = (t / u ); \
219
- if (q != 0) t -= (q * u ); \
218
+ (q) = ((t) / (u) ); \
219
+ if ((q) != 0) (t) -= ((q) * (u) ); \
220
220
} while(0)
221
221
#else
222
222
#define TMODULO (t ,q ,u ) \
223
223
do { \
224
- q = ((t < 0) ? ceil(t / u) : floor(t / u )); \
225
- if (q != 0) t -= rint(q * u ); \
224
+ (q) = (((t) < 0) ? ceil((t) / (u)) : floor((t) / (u) )); \
225
+ if ((q) != 0) (t) -= rint((q) * (u) ); \
226
226
} while(0)
227
227
#endif
228
228
You can’t perform that action at this time.
0 commit comments