Addition of macro parentheses - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Addition of macro parentheses |
Date | |
Msg-id | 200505252158.j4PLwwG13638@candle.pha.pa.us Whole thread Raw |
List | pgsql-patches |
I have applied the following patch to properly use parentheses around macro arguments used in computations. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ? config.log ? GNUmakefile ? log ? config.status ? contrib/btree_gist/btree_gist.sql ? contrib/btree_gist/libbtree_gist.so.0.0 ? contrib/chkpass/chkpass.sql ? contrib/chkpass/libchkpass.so.0.0 ? contrib/cube/cube.sql ? contrib/cube/cubescan.c ? contrib/cube/cubeparse.c ? contrib/cube/cubeparse.h ? contrib/cube/libcube.so.0.0 ? contrib/dbase/dbf2pg ? contrib/dblink/dblink.sql ? contrib/dblink/libdblink.so.0.0 ? contrib/dbsize/dbsize.sql ? contrib/earthdistance/earthdistance.sql ? contrib/findoidjoins/findoidjoins ? contrib/fulltextindex/fti.sql ? contrib/fuzzystrmatch/fuzzystrmatch.sql ? contrib/fuzzystrmatch/libfuzzystrmatch.so.0.0 ? contrib/intagg/int_aggregate.sql ? contrib/intarray/_int.sql ? contrib/intarray/lib_int.so.0.0 ? contrib/isbn_issn/isbn_issn.sql ? contrib/lo/lo.sql ? contrib/ltree/ltree.sql ? contrib/ltree/libltree.so.0.0 ? contrib/miscutil/misc_utils.sql ? contrib/noupdate/noup.sql ? contrib/oid2name/oid2name ? contrib/pg_autovacuum/pg_autovacuum ? contrib/pg_buffercache/pg_buffercache.sql ? contrib/pg_buffercache/libpg_buffercache.so.0.0 ? contrib/pg_dumplo/pg_dumplo ? contrib/pg_trgm/pg_trgm.sql ? contrib/pg_trgm/libpg_trgm.so.0.0 ? contrib/pgbench/pgbench ? contrib/pgcrypto/pgcrypto.sql ? contrib/pgcrypto/libpgcrypto.so.0.0 ? contrib/pgstattuple/pgstattuple.sql ? contrib/pgstattuple/libpgstattuple.so.0.0 ? contrib/rtree_gist/rtree_gist.sql ? contrib/seg/seg.sql ? contrib/seg/segscan.c ? contrib/seg/segparse.c ? contrib/seg/segparse.h ? contrib/seg/libseg.so.0.0 ? contrib/spi/autoinc.sql ? contrib/spi/insert_username.sql ? contrib/spi/moddatetime.sql ? contrib/spi/refint.sql ? contrib/spi/timetravel.sql ? contrib/string/string_io.sql ? contrib/tablefunc/tablefunc.sql ? contrib/tsearch/tsearch.sql ? contrib/tsearch/parser.c ? contrib/tsearch/libtsearch.so.0.0 ? contrib/tsearch2/tsearch2.sql ? contrib/tsearch2/untsearch2.sql ? contrib/tsearch2/libtsearch2.so.0.0 ? contrib/tsearch2/wordparser/parser.c ? contrib/userlock/user_locks.sql ? contrib/vacuumlo/vacuumlo ? doc/FAQ.html ? doc/FAQ_DEV.html ? doc/src/build.dates ? src/log ? src/Makefile.global ? src/backend/postgres ? src/backend/access/transam/_xlk ? src/backend/catalog/postgres.bki ? src/backend/catalog/postgres.description ? src/backend/po/af.mo ? src/backend/po/cs.mo ? src/backend/po/de.mo ? src/backend/po/es.mo ? src/backend/po/fr.mo ? src/backend/po/hr.mo ? src/backend/po/hu.mo ? src/backend/po/it.mo ? src/backend/po/ko.mo ? src/backend/po/nb.mo ? src/backend/po/pt_BR.mo ? src/backend/po/ro.mo ? src/backend/po/ru.mo ? src/backend/po/sk.mo ? src/backend/po/sl.mo ? src/backend/po/sv.mo ? src/backend/po/tr.mo ? src/backend/po/zh_CN.mo ? src/backend/po/zh_TW.mo ? src/backend/postmaster/_xlk ? src/backend/utils/mb/conversion_procs/conversion_create.sql ? src/backend/utils/mb/conversion_procs/ascii_and_mic/libascii_and_mic.so.0.0 ? src/backend/utils/mb/conversion_procs/cyrillic_and_mic/libcyrillic_and_mic.so.0.0 ? src/backend/utils/mb/conversion_procs/euc_cn_and_mic/libeuc_cn_and_mic.so.0.0 ? src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/libeuc_jp_and_sjis.so.0.0 ? src/backend/utils/mb/conversion_procs/euc_kr_and_mic/libeuc_kr_and_mic.so.0.0 ? src/backend/utils/mb/conversion_procs/euc_tw_and_big5/libeuc_tw_and_big5.so.0.0 ? src/backend/utils/mb/conversion_procs/latin2_and_win1250/liblatin2_and_win1250.so.0.0 ? src/backend/utils/mb/conversion_procs/latin_and_mic/liblatin_and_mic.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_ascii/libutf8_and_ascii.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_big5/libutf8_and_big5.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/libutf8_and_cyrillic.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/libutf8_and_euc_cn.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/libutf8_and_euc_jp.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/libutf8_and_euc_kr.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/libutf8_and_euc_tw.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_gb18030/libutf8_and_gb18030.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_gbk/libutf8_and_gbk.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_iso8859/libutf8_and_iso8859.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/libutf8_and_iso8859_1.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_johab/libutf8_and_johab.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_sjis/libutf8_and_sjis.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_uhc/libutf8_and_uhc.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_win1250/libutf8_and_win1250.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_win1252/libutf8_and_win1252.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_win1256/libutf8_and_win1256.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_win1258/libutf8_and_win1258.so.0.0 ? src/backend/utils/mb/conversion_procs/utf8_and_win874/libutf8_and_win874.so.0.0 ? src/bin/initdb/initdb ? src/bin/initdb/po/cs.mo ? src/bin/initdb/po/de.mo ? src/bin/initdb/po/es.mo ? src/bin/initdb/po/fr.mo ? src/bin/initdb/po/it.mo ? src/bin/initdb/po/ko.mo ? src/bin/initdb/po/pl.mo ? src/bin/initdb/po/pt_BR.mo ? src/bin/initdb/po/ro.mo ? src/bin/initdb/po/ru.mo ? src/bin/initdb/po/sk.mo ? src/bin/initdb/po/sl.mo ? src/bin/initdb/po/sv.mo ? src/bin/initdb/po/tr.mo ? src/bin/initdb/po/zh_CN.mo ? src/bin/initdb/po/zh_TW.mo ? src/bin/ipcclean/ipcclean ? src/bin/pg_config/pg_config ? src/bin/pg_config/po/cs.mo ? src/bin/pg_config/po/de.mo ? src/bin/pg_config/po/es.mo ? src/bin/pg_config/po/fr.mo ? src/bin/pg_config/po/ko.mo ? src/bin/pg_config/po/pl.mo ? src/bin/pg_config/po/ro.mo ? src/bin/pg_config/po/pt_BR.mo ? src/bin/pg_config/po/ru.mo ? src/bin/pg_config/po/sl.mo ? src/bin/pg_config/po/sv.mo ? src/bin/pg_config/po/tr.mo ? src/bin/pg_config/po/zh_CN.mo ? src/bin/pg_config/po/zh_TW.mo ? src/bin/pg_controldata/pg_controldata ? src/bin/pg_controldata/po/cs.mo ? src/bin/pg_controldata/po/de.mo ? src/bin/pg_controldata/po/es.mo ? src/bin/pg_controldata/po/fa.mo ? src/bin/pg_controldata/po/fr.mo ? src/bin/pg_controldata/po/hu.mo ? src/bin/pg_controldata/po/it.mo ? src/bin/pg_controldata/po/ko.mo ? src/bin/pg_controldata/po/nb.mo ? src/bin/pg_controldata/po/pl.mo ? src/bin/pg_controldata/po/pt_BR.mo ? src/bin/pg_controldata/po/ro.mo ? src/bin/pg_controldata/po/ru.mo ? src/bin/pg_controldata/po/sk.mo ? src/bin/pg_controldata/po/sl.mo ? src/bin/pg_controldata/po/sv.mo ? src/bin/pg_controldata/po/tr.mo ? src/bin/pg_controldata/po/zh_CN.mo ? src/bin/pg_controldata/po/zh_TW.mo ? src/bin/pg_ctl/pg_ctl ? src/bin/pg_ctl/_xlk ? src/bin/pg_ctl/po/cs.mo ? src/bin/pg_ctl/po/de.mo ? src/bin/pg_ctl/po/es.mo ? src/bin/pg_ctl/po/fr.mo ? src/bin/pg_ctl/po/ko.mo ? src/bin/pg_ctl/po/pt_BR.mo ? src/bin/pg_ctl/po/ro.mo ? src/bin/pg_ctl/po/ru.mo ? src/bin/pg_ctl/po/sk.mo ? src/bin/pg_ctl/po/sl.mo ? src/bin/pg_ctl/po/sv.mo ? src/bin/pg_ctl/po/tr.mo ? src/bin/pg_ctl/po/zh_CN.mo ? src/bin/pg_ctl/po/zh_TW.mo ? src/bin/pg_dump/pg_dump ? src/bin/pg_dump/pg_restore ? src/bin/pg_dump/pg_dumpall ? src/bin/pg_dump/po/cs.mo ? src/bin/pg_dump/po/de.mo ? src/bin/pg_dump/po/es.mo ? src/bin/pg_dump/po/fr.mo ? src/bin/pg_dump/po/it.mo ? src/bin/pg_dump/po/ko.mo ? src/bin/pg_dump/po/nb.mo ? src/bin/pg_dump/po/pt_BR.mo ? src/bin/pg_dump/po/ro.mo ? src/bin/pg_dump/po/ru.mo ? src/bin/pg_dump/po/sk.mo ? src/bin/pg_dump/po/sl.mo ? src/bin/pg_dump/po/sv.mo ? src/bin/pg_dump/po/tr.mo ? src/bin/pg_dump/po/zh_CN.mo ? src/bin/pg_dump/po/zh_TW.mo ? src/bin/pg_resetxlog/pg_resetxlog ? src/bin/pg_resetxlog/po/cs.mo ? src/bin/pg_resetxlog/po/de.mo ? src/bin/pg_resetxlog/po/es.mo ? src/bin/pg_resetxlog/po/fr.mo ? src/bin/pg_resetxlog/po/hu.mo ? src/bin/pg_resetxlog/po/it.mo ? src/bin/pg_resetxlog/po/ko.mo ? src/bin/pg_resetxlog/po/nb.mo ? src/bin/pg_resetxlog/po/pt_BR.mo ? src/bin/pg_resetxlog/po/ro.mo ? src/bin/pg_resetxlog/po/ru.mo ? src/bin/pg_resetxlog/po/sk.mo ? src/bin/pg_resetxlog/po/sl.mo ? src/bin/pg_resetxlog/po/sv.mo ? src/bin/pg_resetxlog/po/tr.mo ? src/bin/pg_resetxlog/po/zh_CN.mo ? src/bin/pg_resetxlog/po/zh_TW.mo ? src/bin/psql/psql ? src/bin/psql/po/cs.mo ? src/bin/psql/po/de.mo ? src/bin/psql/po/es.mo ? src/bin/psql/po/fa.mo ? src/bin/psql/po/fr.mo ? src/bin/psql/po/hu.mo ? src/bin/psql/po/it.mo ? src/bin/psql/po/ko.mo ? src/bin/psql/po/nb.mo ? src/bin/psql/po/ro.mo ? src/bin/psql/po/pt_BR.mo ? src/bin/psql/po/ru.mo ? src/bin/psql/po/sk.mo ? src/bin/psql/po/sl.mo ? src/bin/psql/po/sv.mo ? src/bin/psql/po/tr.mo ? src/bin/psql/po/zh_CN.mo ? src/bin/psql/po/zh_TW.mo ? src/bin/scripts/createdb ? src/bin/scripts/createlang ? src/bin/scripts/createuser ? src/bin/scripts/dropdb ? src/bin/scripts/droplang ? src/bin/scripts/dropuser ? src/bin/scripts/clusterdb ? src/bin/scripts/vacuumdb ? src/bin/scripts/po/cs.mo ? src/bin/scripts/po/de.mo ? src/bin/scripts/po/es.mo ? src/bin/scripts/po/fr.mo ? src/bin/scripts/po/it.mo ? src/bin/scripts/po/ko.mo ? src/bin/scripts/po/pt_BR.mo ? src/bin/scripts/po/ro.mo ? src/bin/scripts/po/ru.mo ? src/bin/scripts/po/sk.mo ? src/bin/scripts/po/sl.mo ? src/bin/scripts/po/sv.mo ? src/bin/scripts/po/tr.mo ? src/bin/scripts/po/zh_CN.mo ? src/bin/scripts/po/zh_TW.mo ? src/include/pg_config.h ? src/include/stamp-h ? src/include/port/_xlk ? src/interfaces/ecpg/compatlib/libecpg_compat.so.2.1 ? src/interfaces/ecpg/ecpglib/libecpg.so.5.1 ? src/interfaces/ecpg/pgtypeslib/libpgtypes.so.2.1 ? src/interfaces/ecpg/preproc/ecpg ? src/interfaces/libpq/MAKE0002.@@@ ? src/interfaces/libpq/MAKE0003.@@@ ? src/interfaces/libpq/MAKE0004.@@@ ? src/interfaces/libpq/MAKE0005.@@@ ? src/interfaces/libpq/MAKE0006.@@@ ? src/interfaces/libpq/MAKE0007.@@@ ? src/interfaces/libpq/MAKE0008.@@@ ? src/interfaces/libpq/MAKE0009.@@@ ? src/interfaces/libpq/MAKE0010.@@@ ? src/interfaces/libpq/MAKE0011.@@@ ? src/interfaces/libpq/MAKE0001.@@@ ? src/interfaces/libpq/MAKE0000.@@@ ? src/interfaces/libpq/Release ? src/interfaces/libpq/libpq.so.4.1 ? src/interfaces/libpq/po/af.mo ? src/interfaces/libpq/po/cs.mo ? src/interfaces/libpq/po/de.mo ? src/interfaces/libpq/po/es.mo ? src/interfaces/libpq/po/fr.mo ? src/interfaces/libpq/po/hr.mo ? src/interfaces/libpq/po/it.mo ? src/interfaces/libpq/po/ko.mo ? src/interfaces/libpq/po/nb.mo ? src/interfaces/libpq/po/pl.mo ? src/interfaces/libpq/po/pt_BR.mo ? src/interfaces/libpq/po/ru.mo ? src/interfaces/libpq/po/sk.mo ? src/interfaces/libpq/po/sl.mo ? src/interfaces/libpq/po/sv.mo ? src/interfaces/libpq/po/tr.mo ? src/interfaces/libpq/po/zh_CN.mo ? src/interfaces/libpq/po/zh_TW.mo ? src/pl/plperl/SPI.c ? src/pl/plperl/libplperl.so.0.0 ? src/pl/plpgsql/src/libplpgsql.so.1.0 ? src/pl/tcl/libpltcl.so.2.0 ? src/pl/tcl/modules/pltcl_loadmod ? src/pl/tcl/modules/pltcl_delmod ? src/pl/tcl/modules/pltcl_listmod ? src/port/pg_config_paths.h ? src/port/_xlk ? src/test/regress/pg_regress ? src/test/regress/testtablespace ? src/test/regress/log ? src/test/regress/results ? src/test/regress/expected/copy.out ? src/test/regress/expected/create_function_1.out ? src/test/regress/expected/create_function_2.out ? src/test/regress/expected/misc.out ? src/test/regress/expected/constraints.out ? src/test/regress/expected/tablespace.out ? src/test/regress/sql/copy.sql ? src/test/regress/sql/create_function_1.sql ? src/test/regress/sql/create_function_2.sql ? src/test/regress/sql/misc.sql ? src/test/regress/sql/constraints.sql ? src/test/regress/sql/tablespace.sql ? src/timezone/zic Index: contrib/intarray/_int_bool.c =================================================================== RCS file: /cvsroot/pgsql/contrib/intarray/_int_bool.c,v retrieving revision 1.3 diff -r1.3 _int_bool.c 469c469 < #define RESIZEBUF(inf,addsize) while( ( inf->cur - inf->buf ) + addsize + 1 >= inf->buflen ) { \ --- > #define RESIZEBUF(inf,addsize) while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) { \ Index: contrib/ltree/crc32.c =================================================================== RCS file: /cvsroot/pgsql/contrib/ltree/crc32.c,v retrieving revision 1.4 diff -r1.4 crc32.c 23c23 < #define _CRC32_(crc, ch) (crc = (crc >> 8) ^ crc32tab[(crc ^ (ch)) & 0xff]) --- > #define _CRC32_(crc, ch) ((crc) = ((crc) >> 8) ^ crc32tab[((crc) ^ (ch)) & 0xff]) Index: contrib/ltree/ltree.h =================================================================== RCS file: /cvsroot/pgsql/contrib/ltree/ltree.h,v retrieving revision 1.10 diff -r1.10 ltree.h 112c112 < #define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + size * sizeof(ITEM) + lenofoperand ) --- > #define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + (size) * sizeof(ITEM) + (lenofoperand) ) Index: contrib/ltree/ltxtquery_io.c =================================================================== RCS file: /cvsroot/pgsql/contrib/ltree/ltxtquery_io.c,v retrieving revision 1.6 diff -r1.6 ltxtquery_io.c 389c389 < while( ( inf->cur - inf->buf ) + addsize + 1 >= inf->buflen ) \ --- > while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \ 391,394c391,394 < int4 len = inf->cur - inf->buf; \ < inf->buflen *= 2; \ < inf->buf = (char*) repalloc( (void*)inf->buf, inf->buflen ); \ < inf->cur = inf->buf + len; \ --- > int4 len = (inf)->cur - (inf)->buf; \ > (inf)->buflen *= 2; \ > (inf)->buf = (char*) repalloc( (void*)(inf)->buf, (inf)->buflen ); \ > (inf)->cur = (inf)->buf + len; \ Index: contrib/pgcrypto/crypt-blowfish.c =================================================================== RCS file: /cvsroot/pgsql/contrib/pgcrypto/crypt-blowfish.c,v retrieving revision 1.8 diff -r1.8 crypt-blowfish.c 455,456c455,456 < tmp1 = L & 0xFF; \ < tmp2 = L >> 8; \ --- > tmp1 = (L) & 0xFF; \ > tmp2 = (L) >> 8; \ 458c458 < tmp3 = L >> 16; \ --- > tmp3 = (L) >> 16; \ 460c460 < tmp4 = L >> 24; \ --- > tmp4 = (L) >> 24; \ 466c466 < R ^= data.ctx.P[N + 1]; \ --- > (R) ^= data.ctx.P[(N) + 1]; \ 468c468 < R ^= tmp3; --- > (R) ^= tmp3; 472c472 < (*((BF_word *)(((unsigned char *)S) + (i)))) --- > (*((BF_word *)(((unsigned char *)(S)) + (i)))) 474c474 < tmp1 = L & 0xFF; \ --- > tmp1 = (L) & 0xFF; \ 476c476 < tmp2 = L >> 6; \ --- > tmp2 = (L) >> 6; \ 478c478 < tmp3 = L >> 14; \ --- > tmp3 = (L) >> 14; \ 480c480 < tmp4 = L >> 22; \ --- > tmp4 = (L) >> 22; \ 487c487 < R ^= data.ctx.P[N + 1]; \ --- > (R) ^= data.ctx.P[(N) + 1]; \ 489c489 < R ^= tmp3; --- > (R) ^= tmp3; Index: contrib/pgcrypto/rijndael.c =================================================================== RCS file: /cvsroot/pgsql/contrib/pgcrypto/rijndael.c,v retrieving revision 1.9 diff -r1.9 rijndael.c 60c60 < #define bswap(x) ((rotl(x, 8) & 0x00ff00ff) | (rotr(x, 8) & 0xff00ff00)) --- > #define bswap(x) ((rotl((x), 8) & 0x00ff00ff) | (rotr((x), 8) & 0xff00ff00)) 64c64 < #define byte(x,n) ((u1byte)((x) >> (8 * n))) --- > #define byte(x,n) ((u1byte)((x) >> (8 * (n)))) 103c103 < #define ff_mult(a,b) (a && b ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0) --- > #define ff_mult(a,b) ((a) && (b) ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0) 105,109c105,109 < #define f_rn(bo, bi, n, k) \ < bo[n] = ft_tab[0][byte(bi[n],0)] ^ \ < ft_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ < ft_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ < ft_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) --- > #define f_rn(bo, bi, n, k) \ > (bo)[n] = ft_tab[0][byte((bi)[n],0)] ^ \ > ft_tab[1][byte((bi)[((n) + 1) & 3],1)] ^ \ > ft_tab[2][byte((bi)[((n) + 2) & 3],2)] ^ \ > ft_tab[3][byte((bi)[((n) + 3) & 3],3)] ^ *((k) + (n)) 112,115c112,115 < bo[n] = it_tab[0][byte(bi[n],0)] ^ \ < it_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ < it_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ < it_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) --- > (bo)[n] = it_tab[0][byte((bi)[n],0)] ^ \ > it_tab[1][byte((bi)[((n) + 3) & 3],1)] ^ \ > it_tab[2][byte((bi)[((n) + 2) & 3],2)] ^ \ > it_tab[3][byte((bi)[((n) + 1) & 3],3)] ^ *((k) + (n)) 125,135c125,135 < #define f_rl(bo, bi, n, k) \ < bo[n] = fl_tab[0][byte(bi[n],0)] ^ \ < fl_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ < fl_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ < fl_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) < < #define i_rl(bo, bi, n, k) \ < bo[n] = il_tab[0][byte(bi[n],0)] ^ \ < il_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ < il_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ < il_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) --- > #define f_rl(bo, bi, n, k) \ > (bo)[n] = fl_tab[0][byte((bi)[n],0)] ^ \ > fl_tab[1][byte((bi)[((n) + 1) & 3],1)] ^ \ > fl_tab[2][byte((bi)[((n) + 2) & 3],2)] ^ \ > fl_tab[3][byte((bi)[((n) + 3) & 3],3)] ^ *((k) + (n)) > > #define i_rl(bo, bi, n, k) \ > (bo)[n] = il_tab[0][byte((bi)[n],0)] ^ \ > il_tab[1][byte((bi)[((n) + 3) & 3],1)] ^ \ > il_tab[2][byte((bi)[((n) + 2) & 3],2)] ^ \ > il_tab[3][byte((bi)[((n) + 1) & 3],3)] ^ *((k) + (n)) 145,155c145,155 < #define f_rl(bo, bi, n, k) \ < bo[n] = (u4byte)sbx_tab[byte(bi[n],0)] ^ \ < rotl(((u4byte)sbx_tab[byte(bi[(n + 1) & 3],1)]), 8) ^ \ < rotl(((u4byte)sbx_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ < rotl(((u4byte)sbx_tab[byte(bi[(n + 3) & 3],3)]), 24) ^ *(k + n) < < #define i_rl(bo, bi, n, k) \ < bo[n] = (u4byte)isb_tab[byte(bi[n],0)] ^ \ < rotl(((u4byte)isb_tab[byte(bi[(n + 3) & 3],1)]), 8) ^ \ < rotl(((u4byte)isb_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ < rotl(((u4byte)isb_tab[byte(bi[(n + 1) & 3],3)]), 24) ^ *(k + n) --- > #define f_rl(bo, bi, n, k) \ > (bo)[n] = (u4byte)sbx_tab[byte((bi)[n],0)] ^ \ > rotl(((u4byte)sbx_tab[byte((bi)[((n) + 1) & 3],1)]), 8) ^ \ > rotl(((u4byte)sbx_tab[byte((bi)[((n) + 2) & 3],2)]), 16) ^ \ > rotl(((u4byte)sbx_tab[byte((bi)[((n) + 3) & 3],3)]), 24) ^ *((k) + (n)) > > #define i_rl(bo, bi, n, k) \ > (bo)[n] = (u4byte)isb_tab[byte((bi)[n],0)] ^ \ > rotl(((u4byte)isb_tab[byte((bi)[((n) + 3) & 3],1)]), 8) ^ \ > rotl(((u4byte)isb_tab[byte((bi)[((n) + 2) & 3],2)]), 16) ^ \ > rotl(((u4byte)isb_tab[byte((bi)[((n) + 1) & 3],3)]), 24) ^ *((k) + (n)) 285,290c285,290 < t ^= e_key[6 * i]; e_key[6 * i + 6] = t; \ < t ^= e_key[6 * i + 1]; e_key[6 * i + 7] = t; \ < t ^= e_key[6 * i + 2]; e_key[6 * i + 8] = t; \ < t ^= e_key[6 * i + 3]; e_key[6 * i + 9] = t; \ < t ^= e_key[6 * i + 4]; e_key[6 * i + 10] = t; \ < t ^= e_key[6 * i + 5]; e_key[6 * i + 11] = t; \ --- > t ^= e_key[6 * (i)]; e_key[6 * (i) + 6] = t; \ > t ^= e_key[6 * (i) + 1]; e_key[6 * (i) + 7] = t; \ > t ^= e_key[6 * (i) + 2]; e_key[6 * (i) + 8] = t; \ > t ^= e_key[6 * (i) + 3]; e_key[6 * (i) + 9] = t; \ > t ^= e_key[6 * (i) + 4]; e_key[6 * (i) + 10] = t; \ > t ^= e_key[6 * (i) + 5]; e_key[6 * (i) + 11] = t; \ 295,303c295,303 < t ^= e_key[8 * i]; e_key[8 * i + 8] = t; \ < t ^= e_key[8 * i + 1]; e_key[8 * i + 9] = t; \ < t ^= e_key[8 * i + 2]; e_key[8 * i + 10] = t; \ < t ^= e_key[8 * i + 3]; e_key[8 * i + 11] = t; \ < t = e_key[8 * i + 4] ^ ls_box(t); \ < e_key[8 * i + 12] = t; \ < t ^= e_key[8 * i + 5]; e_key[8 * i + 13] = t; \ < t ^= e_key[8 * i + 6]; e_key[8 * i + 14] = t; \ < t ^= e_key[8 * i + 7]; e_key[8 * i + 15] = t; \ --- > t ^= e_key[8 * (i)]; e_key[8 * (i) + 8] = t; \ > t ^= e_key[8 * (i) + 1]; e_key[8 * (i) + 9] = t; \ > t ^= e_key[8 * (i) + 2]; e_key[8 * (i) + 10] = t; \ > t ^= e_key[8 * (i) + 3]; e_key[8 * (i) + 11] = t; \ > t = e_key[8 * (i) + 4] ^ ls_box(t); \ > e_key[8 * (i) + 12] = t; \ > t ^= e_key[8 * (i) + 5]; e_key[8 * (i) + 13] = t; \ > t ^= e_key[8 * (i) + 6]; e_key[8 * (i) + 14] = t; \ > t ^= e_key[8 * (i) + 7]; e_key[8 * (i) + 15] = t; \ Index: contrib/pgcrypto/sha1.c =================================================================== RCS file: /cvsroot/pgsql/contrib/pgcrypto/sha1.c,v retrieving revision 1.14 diff -r1.14 sha1.c 62c62 < #define S(n, x) (((x) << (n)) | ((x) >> (32 - n))) --- > #define S(n, x) (((x) << (n)) | ((x) >> (32 - (n)))) Index: contrib/rtree_gist/rtree_gist.c =================================================================== RCS file: /cvsroot/pgsql/contrib/rtree_gist/rtree_gist.c,v retrieving revision 1.11 diff -r1.11 rtree_gist.c 279,282c279,282 < if ( unionD->high.x < cur->high.x ) unionD->high.x = cur->high.x; \ < if ( unionD->low.x > cur->low.x ) unionD->low.x = cur->low.x; \ < if ( unionD->high.y < cur->high.y ) unionD->high.y = cur->high.y; \ < if ( unionD->low.y > cur->low.y ) unionD->low.y = cur->low.y; \ --- > if ( (unionD)->high.x < cur->high.x ) (unionD)->high.x = cur->high.x; \ > if ( (unionD)->low.x > cur->low.x ) (unionD)->low.x = cur->low.x; \ > if ( (unionD)->high.y < cur->high.y ) (unionD)->high.y = cur->high.y; \ > if ( (unionD)->low.y > cur->low.y ) (unionD)->low.y = cur->low.y; \ 284c284 < memcpy( (void*)unionD, (void*) cur, sizeof( BOX ) ); \ --- > memcpy( (void*)(unionD), (void*) cur, sizeof( BOX ) ); \ 286c286 < list[pos] = num; \ --- > (list)[pos] = num; \ Index: contrib/tsearch/crc32.c =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch/crc32.c,v retrieving revision 1.2 diff -r1.2 crc32.c 16c16 < #define _CRC32_(crc, ch) (crc = (crc >> 8) ^ crc32tab[(crc ^ (ch)) & 0xff]) --- > #define _CRC32_(crc, ch) ((crc) = ((crc) >> 8) ^ crc32tab[((crc) ^ (ch)) & 0xff]) Index: contrib/tsearch/gistidx.h =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch/gistidx.h,v retrieving revision 1.6 diff -r1.6 gistidx.h 30c30 < #define GETBITBYTE(x,i) ( ((char)(x)) >> i & 0x01 ) --- > #define GETBITBYTE(x,i) ( ((char)(x)) >> (i) & 0x01 ) 53,55c53,55 < #define ISARRKEY(x) ( ((GISTTYPE*)x)->flag & ARRKEY ) < #define ISSIGNKEY(x) ( ((GISTTYPE*)x)->flag & SIGNKEY ) < #define ISALLTRUE(x) ( ((GISTTYPE*)x)->flag & ALLISTRUE ) --- > #define ISARRKEY(x) ( ((GISTTYPE*)(x))->flag & ARRKEY ) > #define ISSIGNKEY(x) ( ((GISTTYPE*)(x))->flag & SIGNKEY ) > #define ISALLTRUE(x) ( ((GISTTYPE*)(x))->flag & ALLISTRUE ) 57c57 < #define GTHDRSIZE ( sizeof(int4)*2 ) --- > #define GTHDRSIZE ( sizeof(int4)* 2 ) 60,62c60,62 < #define GETSIGN(x) ( (BITVECP)( (char*)x+GTHDRSIZE ) ) < #define GETARR(x) ( (int4*)( (char*)x+GTHDRSIZE ) ) < #define ARRNELEM(x) ( ( ((GISTTYPE*)x)->len - GTHDRSIZE )/sizeof(int4) ) --- > #define GETSIGN(x) ( (BITVECP)( (char*)(x) + GTHDRSIZE ) ) > #define GETARR(x) ( (int4*)( (char*)(x) + GTHDRSIZE ) ) > #define ARRNELEM(x) ( ( ((GISTTYPE*)(x))->len - GTHDRSIZE ) / sizeof(int4) ) Index: contrib/tsearch/query.c =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch/query.c,v retrieving revision 1.16 diff -r1.16 query.c 661c661 < while( ( inf->cur - inf->buf ) + addsize + 1 >= inf->buflen ) \ --- > while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \ 663,666c663,666 < int4 len = inf->cur - inf->buf; \ < inf->buflen *= 2; \ < inf->buf = (char*) repalloc( (void*)inf->buf, inf->buflen ); \ < inf->cur = inf->buf + len; \ --- > int4 len = (inf)->cur - (inf)->buf; \ > (inf)->buflen *= 2; \ > (inf)->buf = (char*) repalloc( (void*)(inf)->buf, (inf)->buflen ); \ > (inf)->cur = (inf)->buf + len; \ Index: contrib/tsearch/query.h =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch/query.h,v retrieving revision 1.4 diff -r1.4 query.h 34c34 < #define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + size * sizeof(ITEM) + lenofoperand ) --- > #define COMPUTESIZE(size, lenofoperand) ( HDRSIZEQT + (size) * sizeof(ITEM) + (lenofoperand) ) 36c36 < #define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)x)->size * sizeof(ITEM) ) --- > #define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)(x))->size * sizeof(ITEM) ) Index: contrib/tsearch2/crc32.c =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch2/crc32.c,v retrieving revision 1.1 diff -r1.1 crc32.c 16c16 < #define _CRC32_(crc, ch) (crc = (crc >> 8) ^ crc32tab[(crc ^ (ch)) & 0xff]) --- > #define _CRC32_(crc, ch) ((crc) = ((crc) >> 8) ^ crc32tab[((crc) ^ (ch)) & 0xff]) Index: contrib/tsearch2/gistidx.h =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch2/gistidx.h,v retrieving revision 1.2 diff -r1.2 gistidx.h 15,16c15,16 < #define SIGLEN ( sizeof(int4)*SIGLENINT ) < #define SIGLENBIT (SIGLEN*BITBYTE) --- > #define SIGLEN ( sizeof(int4) * SIGLENINT ) > #define SIGLENBIT (SIGLEN * BITBYTE) 31c31 < #define GETBITBYTE(x,i) ( ((char)(x)) >> i & 0x01 ) --- > #define GETBITBYTE(x,i) ( ((char)(x)) >> (i) & 0x01 ) 54,56c54,56 < #define ISARRKEY(x) ( ((GISTTYPE*)x)->flag & ARRKEY ) < #define ISSIGNKEY(x) ( ((GISTTYPE*)x)->flag & SIGNKEY ) < #define ISALLTRUE(x) ( ((GISTTYPE*)x)->flag & ALLISTRUE ) --- > #define ISARRKEY(x) ( ((GISTTYPE*)(x))->flag & ARRKEY ) > #define ISSIGNKEY(x) ( ((GISTTYPE*)(x))->flag & SIGNKEY ) > #define ISALLTRUE(x) ( ((GISTTYPE*)(x))->flag & ALLISTRUE ) 58c58 < #define GTHDRSIZE ( sizeof(int4)*2 ) --- > #define GTHDRSIZE ( sizeof(int4) * 2 ) 61,63c61,63 < #define GETSIGN(x) ( (BITVECP)( (char*)x+GTHDRSIZE ) ) < #define GETARR(x) ( (int4*)( (char*)x+GTHDRSIZE ) ) < #define ARRNELEM(x) ( ( ((GISTTYPE*)x)->len - GTHDRSIZE )/sizeof(int4) ) --- > #define GETSIGN(x) ( (BITVECP)( (char*)(x)+GTHDRSIZE ) ) > #define GETARR(x) ( (int4*)( (char*)(x)+GTHDRSIZE ) ) > #define ARRNELEM(x) ( ( ((GISTTYPE*)(x))->len - GTHDRSIZE )/sizeof(int4) ) Index: contrib/tsearch2/query.c =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch2/query.c,v retrieving revision 1.13 diff -r1.13 query.c 683c683 < while( ( inf->cur - inf->buf ) + addsize + 1 >= inf->buflen ) \ --- > while( ( (inf)->cur - (inf)->buf ) + (addsize) + 1 >= (inf)->buflen ) \ 685,688c685,688 < int4 len = inf->cur - inf->buf; \ < inf->buflen *= 2; \ < inf->buf = (char*) repalloc( (void*)inf->buf, inf->buflen ); \ < inf->cur = inf->buf + len; \ --- > int4 len = (inf)->cur - (inf)->buf; \ > (inf)->buflen *= 2; \ > (inf)->buf = (char*) repalloc( (void*)(inf)->buf, (inf)->buflen ); \ > (inf)->cur = (inf)->buf + len; \ Index: contrib/tsearch2/query.h =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch2/query.h,v retrieving revision 1.3 diff -r1.3 query.h 36,37c36,37 < #define HDRSIZEQT ( 2*sizeof(int4) ) < #define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + size * sizeof(ITEM) + lenofoperand ) --- > #define HDRSIZEQT ( 2 * sizeof(int4) ) > #define COMPUTESIZE(size,lenofoperand) ( HDRSIZEQT + (size) * sizeof(ITEM) + (lenofoperand) ) 39c39 < #define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)x)->size * sizeof(ITEM) ) --- > #define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)(x))->size * sizeof(ITEM) ) Index: contrib/tsearch2/ts_stat.h =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch2/ts_stat.h,v retrieving revision 1.4 diff -r1.4 ts_stat.h 27,31c27,31 < #define STATHDRSIZE (sizeof(int4)*4) < #define CALCSTATSIZE(x, lenstr) ( x * sizeof(StatEntry) + STATHDRSIZE + lenstr ) < #define STATPTR(x) ( (StatEntry*) ( (char*)x + STATHDRSIZE ) ) < #define STATSTRPTR(x) ( (char*)x + STATHDRSIZE + ( sizeof(StatEntry) * ((tsvector*)x)->size ) ) < #define STATSTRSIZE(x) ( ((tsvector*)x)->len - STATHDRSIZE - ( sizeof(StatEntry) * ((tsvector*)x)->size ) ) --- > #define STATHDRSIZE (sizeof(int4) * 4) > #define CALCSTATSIZE(x, lenstr) ( (x) * sizeof(StatEntry) + STATHDRSIZE + (lenstr) ) > #define STATPTR(x) ( (StatEntry*) ( (char*)(x) + STATHDRSIZE ) ) > #define STATSTRPTR(x) ( (char*)(x) + STATHDRSIZE + ( sizeof(StatEntry) * ((tsvector*)(x))->size ) ) > #define STATSTRSIZE(x) ( ((tsvector*)(x))->len - STATHDRSIZE - ( sizeof(StatEntry) * ((tsvector*)(x))->size ) ) Index: contrib/tsearch2/tsvector.h =================================================================== RCS file: /cvsroot/pgsql/contrib/tsearch2/tsvector.h,v retrieving revision 1.4 diff -r1.4 tsvector.h 40c40 < #define WEP_GETPOS(x) ( (x) & 0x3fff ) --- > #define WEP_GETPOS(x) ( (x) & 0x3fff ) 57,61c57,61 < #define DATAHDRSIZE (sizeof(int4)*2) < #define CALCDATASIZE(x, lenstr) ( x * sizeof(WordEntry) + DATAHDRSIZE + lenstr ) < #define ARRPTR(x) ( (WordEntry*) ( (char*)x + DATAHDRSIZE ) ) < #define STRPTR(x) ( (char*)x + DATAHDRSIZE + ( sizeof(WordEntry) * ((tsvector*)x)->size ) ) < #define STRSIZE(x) ( ((tsvector*)x)->len - DATAHDRSIZE - ( sizeof(WordEntry) * ((tsvector*)x)->size ) ) --- > #define DATAHDRSIZE (sizeof(int4) * 2) > #define CALCDATASIZE(x, lenstr) ( (x) * sizeof(WordEntry) + DATAHDRSIZE + (lenstr) ) > #define ARRPTR(x) ( (WordEntry*) ( (char*)(x) + DATAHDRSIZE ) ) > #define STRPTR(x) ( (char*)(x) + DATAHDRSIZE + ( sizeof(WordEntry) * ((tsvector*)(x))->size ) ) > #define STRSIZE(x) ( ((tsvector*)(x))->len - DATAHDRSIZE - ( sizeof(WordEntry) * ((tsvector*)(x))->size ) ) Index: src/backend/access/hash/hashfunc.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v retrieving revision 1.43 diff -r1.43 hashfunc.c 195,203c195,203 < a -= b; a -= c; a ^= (c>>13); \ < b -= c; b -= a; b ^= (a<<8); \ < c -= a; c -= b; c ^= (b>>13); \ < a -= b; a -= c; a ^= (c>>12); \ < b -= c; b -= a; b ^= (a<<16); \ < c -= a; c -= b; c ^= (b>>5); \ < a -= b; a -= c; a ^= (c>>3); \ < b -= c; b -= a; b ^= (a<<10); \ < c -= a; c -= b; c ^= (b>>15); \ --- > a -= b; a -= c; a ^= ((c)>>13); \ > b -= c; b -= a; b ^= ((a)<<8); \ > c -= a; c -= b; c ^= ((b)>>13); \ > a -= b; a -= c; a ^= ((c)>>12); \ > b -= c; b -= a; b ^= ((a)<<16); \ > c -= a; c -= b; c ^= ((b)>>5); \ > a -= b; a -= c; a ^= ((c)>>3); \ > b -= c; b -= a; b ^= ((a)<<10); \ > c -= a; c -= b; c ^= ((b)>>15); \ Index: src/backend/regex/regcomp.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/regex/regcomp.c,v retrieving revision 1.42 diff -r1.42 regcomp.c 235c235 < #define ISCELEADER(v,c) (v->mcces != NULL && haschr(v->mcces, (c))) --- > #define ISCELEADER(v,c) ((v)->mcces != NULL && haschr((v)->mcces, (c))) Index: src/backend/utils/adt/formatting.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v retrieving revision 1.86 diff -r1.86 formatting.c 174c174 < #define YEAR_ABS(_y) (_y <= 0 ? -(_y -1) : _y) --- > #define YEAR_ABS(_y) ((_y) <= 0 ? -((_y) - 1) : _y) 283c283 < #define NUM_F_ZERO (1 << 3) --- > #define NUM_F_ZERO (1 << 3) 289c289 < #define NUM_F_PLUS (1 << 9) --- > #define NUM_F_PLUS (1 << 9) 291c291 < #define NUM_F_MULTI (1 << 11) --- > #define NUM_F_MULTI (1 << 11) 460,463c460,463 < #define S_THth(_s) (((_s & DCH_S_TH) || (_s & DCH_S_th)) ? 1 : 0) < #define S_TH(_s) ((_s & DCH_S_TH) ? 1 : 0) < #define S_th(_s) ((_s & DCH_S_th) ? 1 : 0) < #define S_TH_TYPE(_s) ((_s & DCH_S_TH) ? TH_UPPER : TH_LOWER) --- > #define S_THth(_s) ((((_s) & DCH_S_TH) || ((_s) & DCH_S_th)) ? 1 : 0) > #define S_TH(_s) (((_s) & DCH_S_TH) ? 1 : 0) > #define S_th(_s) (((_s) & DCH_S_th) ? 1 : 0) > #define S_TH_TYPE(_s) (((_s) & DCH_S_TH) ? TH_UPPER : TH_LOWER) 465,466c465,466 < #define S_FM(_s) ((_s & DCH_S_FM) ? 1 : 0) < #define S_SP(_s) ((_s & DCH_S_SP) ? 1 : 0) --- > #define S_FM(_s) (((_s) & DCH_S_FM) ? 1 : 0) > #define S_SP(_s) (((_s) & DCH_S_SP) ? 1 : 0) Index: src/backend/utils/adt/pg_lzcompress.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/pg_lzcompress.c,v retrieving revision 1.18 diff -r1.18 pg_lzcompress.c 331,332c331,332 < *__ctrlp = __ctrlb; \ < __ctrlp = __buf++; \ --- > *(__ctrlp) = __ctrlb; \ > __ctrlp = (__buf)++; \ 349c349 < *_buf++ = (unsigned char)(_byte); \ --- > *(_buf)++ = (unsigned char)(_byte); \ 369,372c369,372 < _buf[0] = (unsigned char)((((_off) & 0xf00) >> 4) | 0x0f); \ < _buf[1] = (unsigned char)((_off & 0xff)); \ < _buf[2] = (unsigned char)((_len) - 18); \ < _buf += 3; \ --- > (_buf)[0] = (unsigned char)((((_off) & 0xf00) >> 4) | 0x0f); \ > (_buf)[1] = (unsigned char)(((_off) & 0xff)); \ > (_buf)[2] = (unsigned char)((_len) - 18); \ > (_buf) += 3; \ 374,376c374,376 < _buf[0] = (unsigned char)((((_off) & 0xf00) >> 4) | (_len - 3)); \ < _buf[1] = (unsigned char)((_off) & 0xff); \ < _buf += 2; \ --- > (_buf)[0] = (unsigned char)((((_off) & 0xf00) >> 4) | ((_len) - 3)); \ > (_buf)[1] = (unsigned char)((_off) & 0xff); \ > (_buf) += 2; \ Index: src/backend/utils/sort/tuplesort.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v retrieving revision 1.48 diff -r1.48 tuplesort.c 1567c1567 < (checkIndex && (index1 != index2) ? index1 - index2 : \ --- > (checkIndex && (index1 != index2) ? (index1) - (index2) : \ Index: src/bin/pg_dump/pg_backup_archiver.h =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v retrieving revision 1.63 diff -r1.63 pg_backup_archiver.h 46,47c46,47 < #define GZWRITE(p, s, n, fh) gzwrite(fh, p, n * s) < #define GZREAD(p, s, n, fh) gzread(fh, p, n * s) --- > #define GZWRITE(p, s, n, fh) gzwrite(fh, p, (n) * (s)) > #define GZREAD(p, s, n, fh) gzread(fh, p, (n) * (s)) 50c50 < #define GZWRITE(p, s, n, fh) (fwrite(p, s, n, fh) * s) --- > #define GZWRITE(p, s, n, fh) (fwrite(p, s, n, fh) * (s)) Index: src/include/c.h =================================================================== RCS file: /cvsroot/pgsql/src/include/c.h,v retrieving revision 1.183 diff -r1.183 c.h 538c538 < #define endof(array) (&array[lengthof(array)]) --- > #define endof(array) (&(array)[lengthof(array)]) 552c552 < (((long) (LEN) + (ALIGNVAL-1)) & ~((long) (ALIGNVAL-1))) --- > (((long) (LEN) + ((ALIGNVAL) - 1)) & ~((long) ((ALIGNVAL) - 1))) Index: src/include/port.h =================================================================== RCS file: /cvsroot/pgsql/src/include/port.h,v retrieving revision 1.74 diff -r1.74 port.h 258,259c258,259 < #define fseeko(a, b, c) fseek((a), (b), (c)) < #define ftello(a) ftell((a)) --- > #define fseeko(a, b, c) fseek(a, b, c) > #define ftello(a) ftell(a) Index: src/include/access/attnum.h =================================================================== RCS file: /cvsroot/pgsql/src/include/access/attnum.h,v retrieving revision 1.20 diff -r1.20 attnum.h 61c61 < ((AttrNumber) (1 + attributeOffset)) --- > ((AttrNumber) (1 + (attributeOffset))) Index: src/include/catalog/pg_trigger.h =================================================================== RCS file: /cvsroot/pgsql/src/include/catalog/pg_trigger.h,v retrieving revision 1.22 diff -r1.22 pg_trigger.h 84c84 < #define TRIGGER_CLEAR_TYPE(type) (type = 0) --- > #define TRIGGER_CLEAR_TYPE(type) ((type) = 0) 86,90c86,90 < #define TRIGGER_SETT_ROW(type) (type |= TRIGGER_TYPE_ROW) < #define TRIGGER_SETT_BEFORE(type) (type |= TRIGGER_TYPE_BEFORE) < #define TRIGGER_SETT_INSERT(type) (type |= TRIGGER_TYPE_INSERT) < #define TRIGGER_SETT_DELETE(type) (type |= TRIGGER_TYPE_DELETE) < #define TRIGGER_SETT_UPDATE(type) (type |= TRIGGER_TYPE_UPDATE) --- > #define TRIGGER_SETT_ROW(type) ((type) |= TRIGGER_TYPE_ROW) > #define TRIGGER_SETT_BEFORE(type) ((type) |= TRIGGER_TYPE_BEFORE) > #define TRIGGER_SETT_INSERT(type) ((type) |= TRIGGER_TYPE_INSERT) > #define TRIGGER_SETT_DELETE(type) ((type) |= TRIGGER_TYPE_DELETE) > #define TRIGGER_SETT_UPDATE(type) ((type) |= TRIGGER_TYPE_UPDATE) 92,96c92,96 < #define TRIGGER_FOR_ROW(type) (type & TRIGGER_TYPE_ROW) < #define TRIGGER_FOR_BEFORE(type) (type & TRIGGER_TYPE_BEFORE) < #define TRIGGER_FOR_INSERT(type) (type & TRIGGER_TYPE_INSERT) < #define TRIGGER_FOR_DELETE(type) (type & TRIGGER_TYPE_DELETE) < #define TRIGGER_FOR_UPDATE(type) (type & TRIGGER_TYPE_UPDATE) --- > #define TRIGGER_FOR_ROW(type) ((type) & TRIGGER_TYPE_ROW) > #define TRIGGER_FOR_BEFORE(type) ((type) & TRIGGER_TYPE_BEFORE) > #define TRIGGER_FOR_INSERT(type) ((type) & TRIGGER_TYPE_INSERT) > #define TRIGGER_FOR_DELETE(type) ((type) & TRIGGER_TYPE_DELETE) > #define TRIGGER_FOR_UPDATE(type) ((type) & TRIGGER_TYPE_UPDATE) Index: src/include/libpq/crypt.h =================================================================== RCS file: /cvsroot/pgsql/src/include/libpq/crypt.h,v retrieving revision 1.30 diff -r1.30 crypt.h 20c20 < #define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \ --- > #define isMD5(passwd) (strncmp(passwd, "md5", 3) == 0 && \ Index: src/include/regex/regguts.h =================================================================== RCS file: /cvsroot/pgsql/src/include/regex/regguts.h,v retrieving revision 1.3 diff -r1.3 regguts.h 66c66 < #define FUNCPTR(name, args) (*name) args --- > #define FUNCPTR(name, args) (*(name)) args Index: src/include/storage/itempos.h =================================================================== RCS file: /cvsroot/pgsql/src/include/storage/itempos.h,v retrieving revision 1.20 diff -r1.20 itempos.h 35c35 < #define PNOBREAK(OBJP, LEN) ((OBJP)->op_len >= LEN) --- > #define PNOBREAK(OBJP, LEN) ((OBJP)->op_len >= (LEN)) Index: src/include/utils/pg_lzcompress.h =================================================================== RCS file: /cvsroot/pgsql/src/include/utils/pg_lzcompress.h,v retrieving revision 1.10 diff -r1.10 pg_lzcompress.h 49c49 < #define PGLZ_RAW_SIZE(_lzdata) (_lzdata->rawsize) --- > #define PGLZ_RAW_SIZE(_lzdata) ((_lzdata)->rawsize) 58,59c58,59 < #define PGLZ_IS_COMPRESSED(_lzdata) (_lzdata->varsize != \ < _lzdata->rawsize + \ --- > #define PGLZ_IS_COMPRESSED(_lzdata) ((_lzdata)->varsize != \ > e (_lzdata)->rawsize + e \ 183c183 < #define pglz_decomp_init(_ds,_lz) do { \ --- > #define pglz_decomp_init(_ds,_lz) do { \ Index: src/include/utils/timestamp.h =================================================================== RCS file: /cvsroot/pgsql/src/include/utils/timestamp.h,v retrieving revision 1.42 diff -r1.42 timestamp.h 126c126 < #define TIMESTAMP_NOBEGIN(j) do {j = DT_NOBEGIN;} while (0) --- > #define TIMESTAMP_NOBEGIN(j) do {(j) = DT_NOBEGIN;} while (0) 129c129 < #define TIMESTAMP_NOEND(j) do {j = DT_NOEND;} while (0) --- > #define TIMESTAMP_NOEND(j) do {(j) = DT_NOEND;} while (0) Index: src/interfaces/ecpg/pgtypeslib/dt.h =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/ecpg/pgtypeslib/dt.h,v retrieving revision 1.22 diff -r1.22 dt.h 196,197c196,197 < q = ((t < 0) ? ceil(t / u): floor(t / u)); \ < if (q != 0) t -= rint(q * u); \ --- > (q) = (((t) < 0) ? ceil((t) / (u)): floor((t) / (u))); \ > if ((q) != 0) (t) -= rint((q) * (u)); \ 208,209c208,209 < q = (t / u); \ < if (q != 0) t -= (q * u); \ --- > (q) = ((t) / (u)); \ > if ((q) != 0) (t) -= ((q) * (u)); \ 214,215c214,215 < q = ((t < 0) ? ceil(t / u): floor(t / u)); \ < if (q != 0) t -= rint(q * u); \ --- > (q) = (((t) < 0) ? ceil((t) / (u)): floor((t) / (u))); \ > if ((q) != 0) (t) -= rint((q) * (u)); \ 280,281c280,281 < #define TIMESTAMP_NOBEGIN(j) do {j = DT_NOBEGIN;} while (0) < #define TIMESTAMP_NOEND(j) do {j = DT_NOEND;} while (0) --- > #define TIMESTAMP_NOBEGIN(j) do {(j) = DT_NOBEGIN;} while (0) > #define TIMESTAMP_NOEND(j) do {(j) = DT_NOEND;} while (0) Index: src/port/crypt.c =================================================================== RCS file: /cvsroot/pgsql/src/port/crypt.c,v retrieving revision 1.11 diff -r1.11 crypt.c 743c743 < (*(int32_t *)((unsigned char *)t + i*(sizeof(int32_t)/4))) --- > (*(int32_t *)((unsigned char *)(t) + (i)*(sizeof(int32_t)/4))) 758,760c758,760 < k = (q0 ^ q1) & SALT; \ < B.b32.i0 = k ^ q0 ^ kp->b32.i0; \ < B.b32.i1 = k ^ q1 ^ kp->b32.i1; \ --- > k = ((q0) ^ (q1)) & SALT; \ > B.b32.i0 = k ^ (q0) ^ kp->b32.i0; \ > B.b32.i1 = k ^ (q1) ^ kp->b32.i1; \ Index: src/port/qsort.c =================================================================== RCS file: /cvsroot/pgsql/src/port/qsort.c,v retrieving revision 1.5 diff -r1.5 qsort.c 66,67c66,67 < #define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ < es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; --- > #define SWAPINIT(a, es) swaptype = ((char *)(a) - (char *)0) % sizeof(long) || \ > (es) % sizeof(long) ? 2 : (es) == sizeof(long)? 0 : 1;
pgsql-patches by date: