Index: src/Makefile.shlib
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.shlib,v
retrieving revision 1.85
diff -c -c -r1.85 Makefile.shlib
*** src/Makefile.shlib	15 Oct 2004 05:11:00 -0000	1.85
--- src/Makefile.shlib	16 Oct 2004 03:22:09 -0000
***************
*** 31,36 ****
--- 31,38 ----
  # DLLTOOL_DEFFLAGS      Additional flags when creating the dll .def file
  # DLLTOOL_LIBFLAGS      Additional flags when creating the lib<module>.a file
  # DLLWRAP_FLAGS         Additional flags to dllwrap
+ # DLL_DEFFILE           Use pre-existing .def file instead of auto-generating
+ #                       one with all exports in it (win32 only).
  #
  # The module Makefile must also include
  # $(top_builddir)/src/Makefile.global before including this file.
***************
*** 306,314 ****
--- 308,321 ----
  
  # Cygwin case
  $(shlib) lib$(NAME).a: $(OBJS)
+ ifndef DLL_DEFFILE
  	$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
  	$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
  	$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
+ else
+ 	$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)
+ 	$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib lib$(NAME).a
+ endif
  
  endif # PORTNAME == cygwin
  
***************
*** 316,324 ****
--- 323,336 ----
  
  # win32 case
  $(shlib) lib$(NAME).a: $(OBJS)
+ ifndef DLL_DEFFILE
  	$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
  	$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
  	$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
+ else
+ 	$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)
+ 	$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib lib$(NAME).a
+ endif
  
  endif # PORTNAME == win32
  
Index: src/interfaces/libpq/Makefile
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v
retrieving revision 1.117
diff -c -c -r1.117 Makefile
*** src/interfaces/libpq/Makefile	12 Oct 2004 04:48:36 -0000	1.117
--- src/interfaces/libpq/Makefile	16 Oct 2004 03:22:22 -0000
***************
*** 34,39 ****
--- 34,40 ----
  OBJS += win32.o libpqrc.o
  libpqrc.o : libpq.rc
  	windres -i libpq.rc -o libpqrc.o
+ DLL_DEFFILE=libpqdll.def
  ifeq ($(enable_thread_safety), yes)
  # This doesn't work yet because configure test fails.  2004-06-19
  OBJS += pthread-win32.o
Index: src/interfaces/libpq/blibpqdll.def
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/blibpqdll.def,v
retrieving revision 1.10
diff -c -c -r1.10 blibpqdll.def
*** src/interfaces/libpq/blibpqdll.def	11 Aug 2004 18:06:01 -0000	1.10
--- src/interfaces/libpq/blibpqdll.def	16 Oct 2004 03:22:23 -0000
***************
*** 115,120 ****
--- 115,124 ----
      _PQsendQueryPrepared     @ 111
      _PQdsplen                @ 112
      _PQserverVersion         @ 113
+     _PQgetssl                @ 114
+     _pg_char_to_encoding     @ 115
+     _pg_valid_server_encoding @ 116
+     _pqsignal                @ 117
  
  ; Aliases for MS compatible names
      PQconnectdb             = _PQconnectdb            
***************
*** 230,232 ****
--- 234,240 ----
      PQsendQueryPrepared     = _PQsendQueryPrepared
      PQdsplen                = _PQdsplen
      PQserverVersion         = _PQserverVersion
+     PQgetssl                = _PQgetssl
+     pg_char_to_encoding     = _pg_char_to_encoding
+     pg_valid_server_encoding = _pg_valid_server_encoding
+     pqsignal                = _pqsignal
Index: src/interfaces/libpq/fe-secure.c
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v
retrieving revision 1.54
diff -c -c -r1.54 fe-secure.c
*** src/interfaces/libpq/fe-secure.c	28 Sep 2004 00:06:02 -0000	1.54
--- src/interfaces/libpq/fe-secure.c	16 Oct 2004 03:22:26 -0000
***************
*** 1201,1206 ****
--- 1201,1212 ----
  		return NULL;
  	return conn->ssl;
  }
+ #else
+ void *
+ PQgetssl(PGconn *conn)
+ {
+ 	return NULL;
+ }
  #endif   /* USE_SSL */
  
  
Index: src/interfaces/libpq/libpq-fe.h
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpq-fe.h,v
retrieving revision 1.109
diff -c -c -r1.109 libpq-fe.h
*** src/interfaces/libpq/libpq-fe.h	16 Oct 2004 03:10:17 -0000	1.109
--- src/interfaces/libpq/libpq-fe.h	16 Oct 2004 03:22:28 -0000
***************
*** 258,263 ****
--- 258,265 ----
  #ifdef USE_SSL
  /* Get the SSL structure associated with a connection */
  extern SSL *PQgetssl(PGconn *conn);
+ #else
+ extern void *PQgetssl(PGconn *conn);
  #endif
  
  /* Set verbosity for PQerrorMessage and PQresultErrorMessage */
Index: src/interfaces/libpq/libpqddll.def
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpqddll.def,v
retrieving revision 1.2
diff -c -c -r1.2 libpqddll.def
*** src/interfaces/libpq/libpqddll.def	11 Aug 2004 18:06:01 -0000	1.2
--- src/interfaces/libpq/libpqddll.def	16 Oct 2004 03:22:29 -0000
***************
*** 115,117 ****
--- 115,121 ----
      PQsendQueryPrepared     @ 111
      PQdsplen                @ 112
      PQserverVersion         @ 113
+     PQgetssl                @ 114
+     pg_char_to_encoding     @ 115
+     pg_valid_server_encoding @ 116
+     pqsignal                @ 117
Index: src/interfaces/libpq/libpqdll.def
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpqdll.def,v
retrieving revision 1.26
diff -c -c -r1.26 libpqdll.def
*** src/interfaces/libpq/libpqdll.def	11 Aug 2004 18:06:01 -0000	1.26
--- src/interfaces/libpq/libpqdll.def	16 Oct 2004 03:22:29 -0000
***************
*** 115,117 ****
--- 115,121 ----
      PQsendQueryPrepared     @ 111
      PQdsplen                @ 112
      PQserverVersion         @ 113
+     PQgetssl                @ 114
+     pg_char_to_encoding     @ 115
+     pg_valid_server_encoding @ 116
+     pqsignal                @ 117
