Re: [HACKERS] Macro From Hell

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: daybee(at)bellatlantic(dot)net, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Macro From Hell
Date: 1998-09-08 15:44:22
Message-ID: 199809081544.LAA10898@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > This is a very recent addition at line 664 of copy.c It will not
> > compile on AIX 4.1 Help!
> >
> > gmake[2]: Entering directory `/gnu/postgresql-6.4f/src/backend/commands'
> >
> > xlc -I../../include -I../../backend -qchars=signed -qmaxmem=8192
> > -qhalt=w -qsrcmsg -qcheck=divzero -I/usr/local/include -I.. -c
> > copy.c -o copy.o
> > 664 | ptr = (
> > ((attr[i]->attlen) < sizeof(int32)) ? ( ((attr[i]->attlen) == -1
> > ) ? ( ((attr[i]->attalign) == 'd') ? (((long)(ptr) + (sizeof (double) -
> > 1)) & ~(sizeof (double) -1)) : (((long)(ptr) + (sizeof (int)
> > - 1)) & ~(sizeof (int) -1)) ) : ( ((attr[i]->attlen) == sizeof(char)) ?
> > ( (ptr) ) : ( (void)((char) 1), (((long)(ptr) + (sizeof (sh
> > ort) - 1)) & ~(sizeof (short) - 1)) ) ) ) : ( ((attr[i]->attlen) ==
> > sizeof(int32)) ? ( (((long)(ptr) + (sizeof (int) - 1)) & ~(sizeo
> > f (int) -1)) ) : ( (void)((char) 1), ((attr[i]->attalign) == 'd') ?
> > (((long)(ptr) + (sizeof (double) - 1)) & ~(sizeof (double) -1))
> > : (((long)(ptr) + (sizeof (long) - 1)) & ~(sizeof (long) -1)) ) ) );
> >
> > ........................................................................................................................
> >
> > ....................................................................................................................................
> >
> > .......................................................................a..........
> >
> > a - 1506-226 (S) The ":" operator is not allowed between "char*" and
> > "unsigned long".
> > gmake[2]: *** [copy.o] Error 1
> >
>
> Looks like I am going to have to do another DISABLE_COMPLEX_MACROS entry
> for that new macro, just like heap_getattr().
>
> --
> Bruce Momjian | 830 Blythe Avenue
> maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
> + If your life is a hard drive, | (610) 353-9879(w)
> + Christ can be your backup. | (610) 853-3000(h)
>
>

> > ( (long)(ptr) ) : ( (void)((char) 1), (((long)(ptr) + (sizeof (sh
^^^^^^

This was the fix. In the code it was:

((attlen) == sizeof(char)) ? \
( \
(long)(cur_offset) \
) \

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-09-08 16:44:02 Re: [HACKERS] Problem with the constraints test and PRIMARY KEY on UnixWare 7.
Previous Message Bruce Momjian 1998-09-08 15:40:16 Re: [HACKERS] Macro From Hell