Re: Request for supported platforms - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Request for supported platforms
Date
Msg-id 200210291933.g9TJXw518936@candle.pha.pa.us
Whole thread Raw
In response to Re: Request for supported platforms  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-hackers
Attached is a diff to fix the pclose problem.  It turns out there was
code in there to make popen/pclose be _popen/_pclose, but it was only in
common.c, even in 7.2.3 (print.c).  Not sure how it would compile in the
past with that.  Maybe it didn't.  Anyway, this is committed and should
_help_ with the compile.

---------------------------------------------------------------------------

Dave Page wrote:
>
>
> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> > Sent: 29 October 2002 04:24
> > To: Dave Page
> > Cc: PostgreSQL-development; Thomas Lockhart; Tom Lane
> > Subject: Re: [HACKERS] Request for supported platforms
> >
> >
> >
> > I have updated CVS and re-added getopt.c, now in /port, and
> > updated win32.mak.  That should help.
>
> Thanks. Unfortunately not quite there though:
>
> print.c(1038) : warning C4013: 'pclose' undefined; assuming extern
> returning int
>
> describe.c
> tab-complete.c
> describe.c(1462) : warning C4761: integral size mismatch in argument;
> conversion supplied
> mbprint.c
>         link.exe @.\nmc01556.
> print.obj : error LNK2001: unresolved external symbol _pclose
> .\Release\psql.exe : fatal error LNK1120: 1 unresolved externals
> NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
> Stop.
> NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual
> Studio\VC98\bin\nmake.exe"' : return code '0x2'
> Stop.
>
> Any ideas?
>
> Regards, Dave.
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/bin/psql/common.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/common.c,v
retrieving revision 1.50
diff -c -c -r1.50 common.c
*** src/bin/psql/common.c    24 Oct 2002 01:33:50 -0000    1.50
--- src/bin/psql/common.c    29 Oct 2002 19:15:38 -0000
***************
*** 6,12 ****
   * $Header: /cvsroot/pgsql-server/src/bin/psql/common.c,v 1.50 2002/10/24 01:33:50 momjian Exp $
   */
  #include "postgres_fe.h"
-
  #include "common.h"

  #include <errno.h>
--- 6,11 ----
***************
*** 27,35 ****

  #ifndef WIN32
  #include <sys/ioctl.h>            /* for ioctl() */
- #else
- #define popen(x,y) _popen(x,y)
- #define pclose(x) _pclose(x)
  #endif

  #ifdef HAVE_TERMIOS_H
--- 26,31 ----
Index: src/bin/psql/common.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/common.h,v
retrieving revision 1.20
diff -c -c -r1.20 common.h
*** src/bin/psql/common.h    23 Oct 2002 19:23:56 -0000    1.20
--- src/bin/psql/common.h    29 Oct 2002 19:15:38 -0000
***************
*** 42,45 ****
--- 42,51 ----
  /* sprompt.h */
  extern char *simple_prompt(const char *prompt, int maxlen, bool echo);

+ /* Used for all Win32 popen/pclose calls */
+ #ifdef WIN32
+ #define popen(x,y) _popen(x,y)
+ #define pclose(x) _pclose(x)
+ #endif
+
  #endif   /* COMMON_H */

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Request for supported platforms
Next
From: Vince Vielhaber
Date:
Subject: Re: Is regress/report.php in use?