X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5626B3A2B9F for ; Wed, 19 Jan 2005 22:04:12 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75787-06 for ; Wed, 19 Jan 2005 22:04:06 +0000 (GMT) Received: from hotmail.com (bay16-f38.bay16.hotmail.com [65.54.186.88]) by svr1.postgresql.org (Postfix) with ESMTP id CC5093A1D6B for ; Wed, 19 Jan 2005 22:04:07 +0000 (GMT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 19 Jan 2005 14:04:06 -0800 Message-ID: Received: from 137.75.58.66 by by16fd.bay16.hotmail.msn.com with HTTP; Wed, 19 Jan 2005 22:03:52 GMT X-Originating-IP: [137.75.58.66] X-Originating-Email: [mytofi@hotmail.com] X-Sender: mytofi@hotmail.com From: "none none" To: pgsql-sql@postgresql.org Subject: include in both ecpg and C++ Date: Wed, 19 Jan 2005 17:03:52 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 19 Jan 2005 22:04:06.0823 (UTC) FILETIME=[CB912370:01C4FE72] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.807 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER X-Spam-Level: X-Archive-Number: 200501/154 X-Sequence-Number: 19942 I have a header file that gets included by both C/C++ code and ecpg code. In this header are a few structs that get used by both code (C/C++ and ecpg). In order to get this to work for Informix, we had to do something like this in the header file: #ifdef TFLG EXEC SQL BEGIN DECLARE SECTION #endif struct definitions #ifdef TFLG EXEC SQL END DECLARE SECTION #endif I use the EXEC SQL INCLUDE headerfile statement in my ecpg code, but of course, not the C/C++ code. I believe the TFLG macro gets defined by the Informix precompiler (though I have not been able to verify this). I also have not been able to find any sort of PostGres counterpart. I am using the Informix compatibility switch when compiling ecpg, but do not get a successful compile (with a number of compile variations attempted). Does anyone know how to implement such a design? Is there a PostGres macro that is basically the same thing or is there another method I may be able to use? Thanks, Tom