Re: MD5 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: MD5
Date
Msg-id Pine.LNX.4.21.0005092335390.387-100000@localhost.localdomain
Whole thread Raw
In response to Re: MD5  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: MD5  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> We've required ANSI-style prototypes all along.  There are some other
> ANSI features we're willing to work around the lack of, like token
> pasting in macros ---

You must mean this stuff: :-)

[src/include/nodes/nodes.h]
| #define nodeTag(nodeptr)                (((Node*)(nodeptr))->type)
| 
| #define makeNode(_type_)                ((_type_*) newNode(sizeof(_type_),T_##_type_))
| #define NodeSetTag(nodeptr,t)   (((Node*)(nodeptr))->type = (t))
| 
| #define IsA(nodeptr,_type_)             (nodeTag(nodeptr) == T_##_type_)

There are some provisions for working around this, but evidently they're
not used uniformly (which leads me to believe that there's little need to
do so).

> so the real question is *what* ANSI features does the code require?

I think it's fair to assume an ANSI C89 compiler in the year 2000, based
on the fact that we don't actually seem to consciously avoid any
constructs I know of, modulo the Autoconf safety net.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Malcolm Beattie
Date:
Subject: Re: pg_hba.conf && ident ...
Next
From: Tom Lane
Date:
Subject: Re: MD5