OSDN Git Service

I checked the WinNT port yesterday (a few days old snapshot from CVS) and I
authorBruce Momjian <bruce@momjian.us>
Wed, 9 Feb 2000 16:23:44 +0000 (16:23 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 9 Feb 2000 16:23:44 +0000 (16:23 +0000)
am including a patch to get it compile.

changes to psql:
- added less as default pager when compiling on Cygwin
- need to declare "filename_completion_function" because it is not exported
from readline -> added to include/port/win.h

changes to pg_id:
- include of <getopt.h>
- add .exe when installing

I think there is a problem with calling the regress tests on WinNT - it
should be called with PORTNAME not HOST as the parameter to regress.sh or
the check  when to add "-h localhost" to psql has to be changed. Now it is
checked against the PORTNAME.

The results of the regress tests were OK with expected failures ;-)

Daniel Horak

src/bin/pg_id/Makefile
src/bin/pg_id/pg_id.c
src/bin/psql/print.c
src/include/port/win.h

index 1801bec..eccdb89 100644 (file)
@@ -5,7 +5,7 @@
 #
 # Copyright (C) 2000 by PostgreSQL Global Development Team
 #
-# $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.14 2000/01/20 21:51:07 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/Makefile,v 1.15 2000/02/09 16:23:42 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -20,7 +20,7 @@ pg_id: $(OBJS)
        $(CC) -o pg_id $(OBJS) $(LDFLAGS)
 
 install: pg_id
-       $(INSTALL) $(INSTL_EXE_OPTS) pg_id$(X) $(BINDIR)/pg_id
+       $(INSTALL) $(INSTL_EXE_OPTS) pg_id$(X) $(BINDIR)/pg_id$(X)
 
 depend dep:
        $(CC) -MM $(CFLAGS) *.c >depend
index fcba3b3..59c86ee 100644 (file)
@@ -6,10 +6,13 @@
  *
  * Copyright (C) 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.11 2000/01/20 21:51:07 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.12 2000/02/09 16:23:42 momjian Exp $
  */
 #include <c.h>
 
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
index 44faad5..8acc188 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.10 2000/02/07 23:10:06 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.11 2000/02/09 16:23:43 momjian Exp $
  */
 #include <c.h>
 #include "print.h"
 #include <libpq-fe.h>
 #include <postgres_ext.h>              /* for Oid type */
 
+#ifndef __CYGWIN__
 #define DEFAULT_PAGER "more"
+#else
+#define DEFAULT_PAGER "less"
+#endif
 
 
 
index 61acdb3..77081fa 100644 (file)
@@ -14,3 +14,6 @@ typedef unsigned char slock_t;
 #if (CYGWIN_VERSION_API_MAJOR >= 0) && (CYGWIN_VERSION_API_MINOR >= 8)
 #define sys_nerr _sys_nerr
 #endif
+
+/* not exported in readline.h */
+char * filename_completion_function();