*** pgsql/src/tools/msvc/Mkvcbuild.pm.orig	2007-11-13 23:49:47.000000000 +0100
--- pgsql/src/tools/msvc/Mkvcbuild.pm	2008-02-05 13:28:20.658331200 +0100
***************
*** 66,72 ****
      $postgres->AddFiles('src\backend\bootstrap','bootscanner.l','bootparse.y');
      $postgres->AddFiles('src\backend\utils\misc','guc-file.l');
      $postgres->AddDefine('BUILDING_DLL');
!     $postgres->AddLibrary('wsock32.lib ws2_32.lib secur32.lib');
      $postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
      $postgres->FullExportDLL('postgres.lib');
  
--- 66,75 ----
      $postgres->AddFiles('src\backend\bootstrap','bootscanner.l','bootparse.y');
      $postgres->AddFiles('src\backend\utils\misc','guc-file.l');
      $postgres->AddDefine('BUILDING_DLL');
!     $postgres->AddLibrary('wsock32.lib');
!     $postgres->AddLibrary('ws2_32.lib');
!     $postgres->AddLibrary('secur32.lib');
!     
      $postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
      $postgres->FullExportDLL('postgres.lib');
  
***************
*** 179,185 ****
      my $initdb = AddSimpleFrontend('initdb');
      $initdb->AddIncludeDir('src\interfaces\libpq');
      $initdb->AddDefine('FRONTEND');
!     $initdb->AddLibrary('wsock32.lib ws2_32.lib');
  
      my $pgconfig = AddSimpleFrontend('pg_config');
  
--- 182,189 ----
      my $initdb = AddSimpleFrontend('initdb');
      $initdb->AddIncludeDir('src\interfaces\libpq');
      $initdb->AddDefine('FRONTEND');
!     $initdb->AddLibrary('wsock32.lib');
!     $initdb->AddLibrary('ws2_32.lib');
  
      my $pgconfig = AddSimpleFrontend('pg_config');
  
*** pgsql/src/tools/msvc/Project.pm.orig	2007-12-11 15:34:43.000000000 +0100
--- pgsql/src/tools/msvc/Project.pm	2008-02-05 13:26:21.376812800 +0100
***************
*** 123,128 ****
--- 123,133 ----
  sub AddLibrary
  {
      my ($self, $lib, $dbgsuffix) = @_;
+     
+     if ($lib =~ m/\s/)
+     {
+     	$lib = '&quot;' . $lib . "&quot;";
+     }
  
      push @{$self->{libraries}}, $lib;
      if ($dbgsuffix)
