examples_win32_patch

application/octet-stream

Filename: examples_win32_patch
Type: application/octet-stream
Part: 0
Message: test/example does not support win32.
*** src/test/examples/Makefile.orig	Wed Dec 30 13:30:13 2009
--- src/test/examples/Makefile	Wed Dec 30 13:30:46 2009
***************
*** 6,11 ****
--- 6,15 ----
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global
  
+ ifeq ($(PORTNAME), win32)
+ LDLIBS += -lws2_32
+ endif
+ 
  override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
  override LDLIBS := $(libpq_pgport) $(LDLIBS)
  
*** src/test/examples/testlibpq2.c.orig	Wed Dec 30 13:19:03 2009
--- src/test/examples/testlibpq2.c	Wed Dec 30 13:28:56 2009
***************
*** 24,29 ****
--- 24,32 ----
   *
   *	 INSERT INTO TBL1 VALUES (10);
   */
+ 
+ #include "postgres_fe.h"
+ 
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
*** src/test/examples/testlibpq3.c.orig	Wed Dec 30 13:31:41 2009
--- src/test/examples/testlibpq3.c	Wed Dec 30 13:37:35 2009
***************
*** 25,35 ****
--- 25,42 ----
   *	t = (8 bytes) 'ho there'
   *	b = (5 bytes) \004\003\002\001\000
   */
+ 
+ #include "postgres_fe.h"
+ 
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <sys/types.h>
  #include "libpq-fe.h"
+ 
+ #if defined(WIN32)
+ #include <stdint.h>
+ #endif
  
  /* for ntohl/htonl */
  #include <netinet/in.h>