Re: Borland c++ compile problems...

From: Steve Holdoway <steve(at)treshna(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: Borland c++ compile problems...
Date: 2004-07-21 04:09:54
Message-ID: 40FDEC92.5020403@treshna.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

Bruce Momjian wrote:

>OK, patch attached that fixes it. Should that define just check for GCC
>instead of checking if the compiler isn't MS or Borland?
>
>---------------------------------------------------------------------------
>
>Steve Holdoway wrote:
>
>
>>Hi folks,
>>
>>It seems that Borland C++ ( I'm using the command line version 5.5 )
>>takes exception to #defines like the following...
>>
>>#define open(a, b...) win32_open ( a, b, ##__VA_ARGS__ )
>> [ to be found in port.h on the current development snapshot ]
>>
>>This causes compilation to fail. I'm after a version of blibpq.dll that
>>supports ssl connections, and the one I compiled previously ( 7.4.2 I
>>think ) doesn't seem to.
>>
>>Can anyone suggest a solution. I speak C fluently... it's this pesky
>>windows stuff that causes me grief!
>>
>>Cheers,
>>
>>Steve
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 8: explain analyze is your friend
>>
>>
>>
>
>
>
>------------------------------------------------------------------------
>
>Index: src/include/port.h
>===================================================================
>RCS file: /cvsroot/pgsql-server/src/include/port.h,v
>retrieving revision 1.43
>diff -c -c -r1.43 port.h
>*** src/include/port.h 11 Jun 2004 16:10:09 -0000 1.43
>--- src/include/port.h 21 Jul 2004 03:01:33 -0000
>***************
>*** 151,157 ****
> #ifdef WIN32
>
> /* open() replacement to allow delete of held files */
>! #ifndef _MSC_VER
> extern int win32_open(const char*,int,...);
> #define open(a,b,...) win32_open(a,b,##__VA_ARGS__)
> #endif
>--- 151,157 ----
> #ifdef WIN32
>
> /* open() replacement to allow delete of held files */
>! #if !defined(_MSC_VER) && !defined(__BORLANDC__)
> extern int win32_open(const char*,int,...);
> #define open(a,b,...) win32_open(a,b,##__VA_ARGS__)
> #endif
>
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
Sorry to be a pest, and all that. However, it looks like make needs to
be run in src\port, to create pg_config_paths.h, and compile stuff to
resolve externals _set_noblock, _pg_strcasecmp, _pg_tolower, and _popen
(? bit worried about that one!)

I had a go at rewriting an existing bcc32.mak, but just seemed to
generate more errors!

Cheers,

Steve

In response to

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Justin Wyer 2004-07-21 07:00:27 Re: FAT or NTFS on W2k
Previous Message chips42 2004-07-21 03:40:48 FAT or NTFS on W2k

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-07-21 05:49:54 Re: [HACKERS] Point in Time Recovery
Previous Message Bruce Momjian 2004-07-21 03:26:50 Re: Patch for pg_dump: Multiple -t options and new -T option