Received: from argh.demon.co.uk (IDENT:grim@argh.demon.co.uk [193.237.6.55]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA42927; Sun, 24 Oct 1999 10:13:54 -0400 (EDT) (envelope-from grim@argh.demon.co.uk) Received: (from grim@localhost) by argh.demon.co.uk (8.9.3/8.9.3) id PAA06008; Sun, 24 Oct 1999 15:19:55 +0100 From: Michael Simms Message-Id: <199910241419.PAA06008@argh.demon.co.uk> Subject: Re: [GENERAL] Re: Errors in Postgres To: maillist@candle.pha.pa.us (Bruce Momjian) Date: Sun, 24 Oct 1999 15:19:55 +0100 (BST) Cc: oleg@pine.krs.ru, vadim@krs.ru, pgsql-interfaces@postgreSQL.org, pgsql-general@postgreSQL.org In-Reply-To: <199910241242.IAA14822@candle.pha.pa.us> from "Bruce Momjian" at Oct 24, 1999 08:42:53 AM X-Mailer: ELM [version 2.5 PL0pre8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > > This is a standard C++ problem. Some platforms need string.h, and some > just string. We have not figured out a way to make this work on all > platforms. > > Any ideas? We kept switching them back and forth until we realized > this. Sun's seem to have the problem. > Why not just add an extra thing into the config scripts. Something like: echo '#include ' > test.c echo 'int main(int argc,char **argv) {' >> test.c Something here where you have a clash... echo 'return 1;}' >> test.c $CC test.c -o test if [ -f test ] then echo '#define NEED_STRING_H' >> someheader.h else echo '#include ' > test.c echo 'int main(int argc,char **argv) {' >> test.c Something here where you have a clash... echo 'return 1;}' >> test.c $CC test.c -o test if [ -f test ] then echo '#define NEED_STRING' >> someheader.h else echo '#define UNKNOWN_STRING' >> soneheader.h fi fi and then in your main program files #include "someheader.h" #ifdef NEED_STRING #include #endif #ifdef NEED_STRING_H #include #endif This is how I test for things like that. OK so I wrote all of my config stuff before I knew about gnu's autoconf, and to be honest I dont know how well this would integrate with that, but it works for me to compile my own projects on just about any un*x flavor Ive been able to get access too, plus cygwin32 ~Michael