1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Fix macros that were not properly surrounded by parens or braces.

This commit is contained in:
Bruce Momjian
1998-06-15 18:40:05 +00:00
parent 3af536a15b
commit 27db9ecd0b
29 changed files with 469 additions and 386 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.53 1998/05/09 22:38:18 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.54 1998/06/15 18:39:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -66,8 +66,12 @@ char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
/* TMODULO()
* Macro to replace modf(), which is broken on some platforms.
*/
#define TMODULO(t,q,u) {q = ((t < 0)? ceil(t / u): floor(t / u)); \
if (q != 0) t -= rint(q * u);}
#define TMODULO(t,q,u) \
do { \
q = ((t < 0)? ceil(t / u): floor(t / u)); \
if (q != 0) \
t -= rint(q * u); \
} while(0)
static void GetEpochTime(struct tm * tm);