From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Elliot Chance <elliotchance(at)gmail(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: C++ keywords in headers (was Re: [GENERAL] #include <funcapi.h>) |
Date: | 2010-12-26 21:54:24 |
Message-ID: | 4D17B990.4020005@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 12/26/2010 12:31 PM, Tom Lane wrote:
>
>> In any case, I think it's very likely the issue is a C/C++
>> incompatibility in the Pg headers. It fails for me in a different place
>> using Pg 9.1git and g++ 4.5, complaining about the use of "private" as
>> an identifier in fmgr.h, because it's a keyword in C++.
> We did clean up C++ keyword uses in the header files in 9.0, but your
> report shows it's already gotten broken again. I'm disinclined to fix
> it unless someone steps up to create an automated test that will get run
> reasonably often. We had that discussion when the patch to rename
> keyword-named fields was proposed, and nothing got done, and the current
> state of affairs is the entirely predictable result.
Here's a script to play with. It needs some tuning but it's a start. Run
in the top level directory (where configure etc live).
Sample output:
found new in src/timezone/private.h
found private in src/include/fmgr.h
found not in src/include/libpq/pqcomm.h
found typeid in src/include/access/htup.h
found bitor, bitand in src/include/catalog/pg_operator.h
found bitor, bitand in src/include/catalog/pg_proc.h
found bitand in src/include/catalog/pg_aggregate.h
found using in src/include/catalog/indexing.h
found inline in src/include/nodes/pg_list.h
found or in src/include/port/win32.h
found or in src/include/port/cygwin.h
found typeid in src/include/parser/parse_type.h
found inline in src/include/portability/instr_time.h
found inline in src/include/utils/palloc.h
found bitor, bitand in src/include/utils/varbit.h
found wchar_t in src/include/mb/pg_wchar.h
found inline, not, using, this, asm in src/include/storage/s_lock.h
found new in src/interfaces/ecpg/preproc/type.h
found new in src/pl/plpgsql/src/plpgsql.h
found namespace in src/bin/pg_dump/pg_dump.h
found namespace, public in src/bin/pg_dump/pg_backup_archiver.h
found namespace in src/bin/pg_dump/pg_backup.h
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
find_c_plus_plus_keywords.pl | application/x-perl | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | gvim | 2010-12-27 00:22:47 | Standard schemas for common features? |
Previous Message | Radosław Smogura | 2010-12-26 18:42:51 | Binary procedures for few types |
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2010-12-27 00:52:59 | Re: knngist - 0.8 |
Previous Message | Tom Lane | 2010-12-26 21:18:23 | Re: Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED. |