Skip site navigation (1) Skip section navigation (2)

1-line fix to port/thread.c for compiling libpq with Borland C

From: L J Bayuk <ljb220(at)mindspring(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: 1-line fix to port/thread.c for compiling libpq with Borland C
Date: 2004-02-25 00:43:15
Message-ID: 200402250043.i1P0hFhd000409@mindspring.com (view raw or flat)
Thread:
Lists: pgsql-patches
Below please find a tiny patch to PostgreSQL-7.4.1 src/port/thread.c that I
found was necessary to compile libpq on Windows using Borland C++ Builder.
The patch causes the the WIN32 code to be included, and <pwd.h> skipped, if
under either WIN32 compiler, rather than just with MSVC.
(Alternative is to just use "#if defined(WIN32)", which works for me, but
I don't know if that would be safe.)


*** src/port/thread.c.orig	Mon Nov 24 08:11:27 2003
--- src/port/thread.c	Tue Feb 24 19:19:35 2004
***************
*** 16,22 ****
  
  #include <sys/types.h>
  #include <errno.h>
! #if defined(WIN32) && defined(_MSC_VER)
  #undef ERROR
  #else
  #include <pwd.h>
--- 16,22 ----
  
  #include <sys/types.h>
  #include <errno.h>
! #if defined(WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__))
  #undef ERROR
  #else
  #include <pwd.h>


Responses

pgsql-patches by date

Next:From: Andrew DunstanDate: 2004-02-25 16:37:59
Subject: dollar quoting for plpgsql
Previous:From: Tom LaneDate: 2004-02-24 22:07:56
Subject: Re: dollar quoting with flex

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group