Thread: Re: [BUGS] BUG #3770: Follow up: Fail to make bcc32.mak for libpq

Re: [BUGS] BUG #3770: Follow up: Fail to make bcc32.mak for libpq

From
Bruce Momjian
Date:
CN wrote:
>
> The following bug has been logged online:
>
> Bug reference:      3770
> Logged by:          CN
> Email address:      cnliou9@fastmail.fm
> PostgreSQL version: 8.3beta3
> Operating system:   Win 98
> Description:        Follow up: Fail to make bcc32.mak for libpq
> Details:
>
> I manually copied ~/src/include/port/win32.h to
> ~/src/include/pg_config_os.h. BCC55 make produces different errors:

OK, you did what my patch did.

> --------------
> bcc32.exe
> -I\borland\bcc55\include;..\..\include;..\..\include\port\win32;..\..\includ
> e\port\win32_msvc;..\..\port -n".\Release" -WD -c
> -DFRONTEND;NDEBUG;WIN32;_WINDOWS -tWM   -a8 -X -w-use -w-par -w-pia -w-csu
> -w-aus -w-ccc -O -Oi -OS -DNDEBUG fe-auth.c
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> fe-auth.c:
> Warning W8017 ..\..\include\getaddrinfo.h 47: Redefinition of
> 'WSATYPE_NOT_FOUND' is not identical
> Error E2141 libpq-int.h 532: Declaration syntax error
> Error E2141 libpq-int.h 533: Declaration syntax error
> *** 2 errors in Compile ***
>
> ** error 1 ** deleting ".\Release\fe-auth.obj"

Uh, try the attached, applied patch.  Seems you already have
WSATYPE_NOT_FOUND defined in BCC.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/include/getaddrinfo.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/getaddrinfo.h,v
retrieving revision 1.23
diff -c -c -r1.23 getaddrinfo.h
*** src/include/getaddrinfo.h    5 Jan 2007 22:19:50 -0000    1.23
--- src/include/getaddrinfo.h    21 Nov 2007 23:11:25 -0000
***************
*** 44,51 ****
--- 44,53 ----
  #ifndef WSA_NOT_ENOUGH_MEMORY
  #define WSA_NOT_ENOUGH_MEMORY    (WSAENOBUFS)
  #endif
+ #ifndef __BORLANDC__
  #define WSATYPE_NOT_FOUND        (WSABASEERR+109)
  #endif
+ #endif
  #define EAI_AGAIN        WSATRY_AGAIN
  #define EAI_BADFLAGS    WSAEINVAL
  #define EAI_FAIL        WSANO_RECOVERY