diff options
| author | Magnus Hagander | 2007-03-29 15:30:52 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2007-03-29 15:30:52 +0000 |
| commit | 96b171903d5d52ca46b46bc3f73f13978705eae5 (patch) | |
| tree | ef3d6422c44693c74439533c8b27979952be77d2 /src/tools | |
| parent | ddcb5bbf76dd991b5a7024bc3d4e212b97d27936 (diff) | |
Make ECPG regression tests use native threading instead of pthreads, now that
ecpglib supports it.
Change configure (patch from Bruce) and msvc build system to no longer require
pthreads on win32, since all parts of postgresql can be thread-safe using the
native platform functions.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 56 | ||||
| -rw-r--r-- | src/tools/msvc/Project.pm | 7 | ||||
| -rw-r--r-- | src/tools/msvc/Solution.pm | 10 | ||||
| -rw-r--r-- | src/tools/msvc/config.pl | 1 |
4 files changed, 32 insertions, 42 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 35294adca72..35412ae6feb 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -3,7 +3,7 @@ package Mkvcbuild; # # Package that generates build files for msvc build # -# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.6 2007/03/24 14:13:27 mha Exp $ +# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.7 2007/03/29 15:30:52 mha Exp $ # use Carp; use Win32; @@ -131,38 +131,28 @@ sub mkvcbuild $pgtypes->AddReference($postgres,$libpgport); $pgtypes->AddIncludeDir('src\interfaces\ecpg\include'); - if ($config->{pthread}) - { - my $libecpg = - $solution->AddProject('libecpg','dll','interfaces','src\interfaces\ecpg\ecpglib'); - $libecpg->AddDefine('FRONTEND'); - $libecpg->AddIncludeDir('src\interfaces\ecpg\include'); - $libecpg->AddIncludeDir('src\interfaces\libpq'); - $libecpg->AddIncludeDir('src\port'); - $libecpg->AddLibrary('wsock32.lib'); - $libecpg->AddLibrary($config->{'pthread'} . '\pthreadVC2.lib'); - $libecpg->AddReference($libpq,$pgtypes,$libpgport); - - my $libecpgcompat = - $solution->AddProject('libecpg_compat','dll','interfaces', - 'src\interfaces\ecpg\compatlib'); - $libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include'); - $libecpgcompat->AddIncludeDir('src\interfaces\libpq'); - $libecpgcompat->AddReference($pgtypes,$libecpg); - - my $ecpg = $solution->AddProject('ecpg','exe','interfaces','src\interfaces\ecpg\preproc'); - $ecpg->AddIncludeDir('src\interfaces\ecpg\include'); - $ecpg->AddIncludeDir('src\interfaces\libpq'); - $ecpg->AddFiles('src\interfaces\ecpg\preproc','pgc.l','preproc.y'); - $ecpg->AddDefine('MAJOR_VERSION=4'); - $ecpg->AddDefine('MINOR_VERSION=2'); - $ecpg->AddDefine('PATCHLEVEL=1'); - $ecpg->AddReference($libpgport); - } - else - { - print "Not building ecpg due to lack of pthreads.\n"; - } + my $libecpg =$solution->AddProject('libecpg','dll','interfaces','src\interfaces\ecpg\ecpglib'); + $libecpg->AddDefine('FRONTEND'); + $libecpg->AddIncludeDir('src\interfaces\ecpg\include'); + $libecpg->AddIncludeDir('src\interfaces\libpq'); + $libecpg->AddIncludeDir('src\port'); + $libecpg->AddLibrary('wsock32.lib'); + $libecpg->AddReference($libpq,$pgtypes,$libpgport); + + my $libecpgcompat = + $solution->AddProject('libecpg_compat','dll','interfaces','src\interfaces\ecpg\compatlib'); + $libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include'); + $libecpgcompat->AddIncludeDir('src\interfaces\libpq'); + $libecpgcompat->AddReference($pgtypes,$libecpg); + + my $ecpg = $solution->AddProject('ecpg','exe','interfaces','src\interfaces\ecpg\preproc'); + $ecpg->AddIncludeDir('src\interfaces\ecpg\include'); + $ecpg->AddIncludeDir('src\interfaces\libpq'); + $ecpg->AddFiles('src\interfaces\ecpg\preproc','pgc.l','preproc.y'); + $ecpg->AddDefine('MAJOR_VERSION=4'); + $ecpg->AddDefine('MINOR_VERSION=2'); + $ecpg->AddDefine('PATCHLEVEL=1'); + $ecpg->AddReference($libpgport); # src/bin my $initdb = AddSimpleFrontend('initdb', 1); diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index 0623a4f9985..f35580bface 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -1,8 +1,9 @@ package Project; + # # Package that encapsulates a Visual C++ project file generation # -# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.10 2007/03/17 14:01:01 mha Exp $ +# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.11 2007/03/29 15:30:52 mha Exp $ # use Carp; use strict; @@ -462,13 +463,11 @@ sub WriteConfiguration } $libs =~ s/ $//; $libs =~ s/__CFGNAME__/$cfgname/g; - my $pth = $self->{solution}->{options}->{pthread}; - $pth = '' unless $pth; print $f <<EOF; <Configuration Name="$cfgname|Win32" OutputDirectory=".\\$cfgname\\$self->{name}" IntermediateDirectory=".\\$cfgname\\$self->{name}" ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}"> <Tool Name="VCCLCompilerTool" Optimization="$p->{opt}" - AdditionalIncludeDirectories="src/include;src/include/port/win32;src/include/port/win32_msvc;$pth;$self->{includes}" + AdditionalIncludeDirectories="src/include;src/include/port/win32;src/include/port/win32_msvc;$self->{includes}" PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE$self->{defines}$p->{defs}" StringPooling="$p->{strpool}" RuntimeLibrary="$p->{runtime}" DisableSpecificWarnings="$self->{disablewarnings}" diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index e665b49866e..66340c9e3fd 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -1,8 +1,9 @@ package Solution; + # # Package that encapsulates a Visual C++ solution file generation -# -# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.19 2007/03/24 22:16:49 mha Exp $ +# +# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.20 2007/03/29 15:30:52 mha Exp $ # use Carp; use strict; @@ -104,7 +105,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY } print O "#define LOCALEDIR \"/share/locale\"\n" if ($self->{options}->{nls}); print O "/* defines added by config steps */\n"; - print O "#ifndef IGNORE_CONFIGURED_SETTINGS\n"; + print O "#ifndef IGNORE_CONFIGURED_SETTINGS\n"; print O "#define USE_ASSERT_CHECKING 1\n" if ($self->{options}->{asserts}); print O "#define USE_INTEGER_DATETIMES 1\n" if ($self->{options}->{integer_datetimes}); print O "#define USE_LDAP 1\n" if ($self->{options}->{ldap}); @@ -124,7 +125,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY print O "#define HAVE_KRB5_TICKET_ENC_PART2 1\n"; print O "#define PG_KRB_SRVNAM \"postgres\"\n"; } - print O "#endif /* IGNORE_CONFIGURED_SETTINGS */\n"; + print O "#endif /* IGNORE_CONFIGURED_SETTINGS */\n"; close(O); close(I); } @@ -239,6 +240,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY print O <<EOF; #if (_MSC_VER > 1200) #define HAVE_LONG_LONG_INT_64 +#define ENABLE_THREAD_SAFETY 1 #endif EOF close(O); diff --git a/src/tools/msvc/config.pl b/src/tools/msvc/config.pl index 40c0f85dcf2..755f27ec970 100644 --- a/src/tools/msvc/config.pl +++ b/src/tools/msvc/config.pl @@ -12,7 +12,6 @@ our $config = { krb5=>'c:\prog\pgsql\depend\krb5', # --with-krb5=<path> ldap=>1, # --with-ldap openssl=>'c:\openssl', # --with-ssl=<path> - pthread=>'c:\prog\pgsql\depend\pthread', xml=>'c:\prog\pgsql\depend\libxml2', xslt=>'c:\prog\pgsql\depend\libxslt', iconv=>'c:\prog\pgsql\depend\iconv', |
