Skip to content

Commit de6e4c9

Browse files
committed
Make float4byval and float8byval configurable on MSVC.
1 parent 3bb6d10 commit de6e4c9

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/tools/msvc/Solution.pm

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Solution;
33
#
44
# Package that encapsulates a Visual C++ solution file generation
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.38 2008/04/15 12:16:51 adunstan Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.39 2008/04/21 10:01:32 mha Exp $
77
#
88
use Carp;
99
use strict;
@@ -25,6 +25,8 @@ sub new
2525
# integer_datetimes is now the default
2626
$options->{integer_datetimes} = 1
2727
unless exists $options->{integer_datetimes};
28+
$options->{float4byval} = 1
29+
unless exists $options->{float4byval};
2830
if ($options->{xml})
2931
{
3032
if (!($options->{xslt} && $options->{iconv}))
@@ -115,6 +117,20 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
115117
print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib});
116118
print O "#define USE_SSL 1\n" if ($self->{options}->{openssl});
117119
print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});
120+
121+
unless ($self->{options}->{float4byval})
122+
{
123+
# float4byval is the default, so undefine
124+
print O "#undef USE_FLOAT4_BYVAL\n";
125+
print O "#undef FLOAT4PASSBYVAL\n";
126+
print O "#define FLOAT4PASSBYVAL false\n";
127+
}
128+
if ($self->{options}->{float8byval})
129+
{
130+
print O "#define USE_FLOAT8_BYVAL\n";
131+
print O "#undef FLOAT8PASSBYVAL\n";
132+
print O "#define FLOAT8PASSBYVAL true\n";
133+
}
118134

119135
if ($self->{options}->{uuid})
120136
{

src/tools/msvc/config.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
our $config = {
66
asserts=>0, # --enable-cassert
77
# integer_datetimes=>1, # --enable-integer-datetimes - on is now default
8+
# float4byval=>1, # --disable-float4-byval, on by default
9+
# float8byval=>0, # --disable-float8-byval, off by default
810
nls=>undef, # --enable-nls=<path>
911
tcl=>'c:\tcl', # --with-tls=<path>
1012
perl=>'c:\perl', # --with-perl

0 commit comments

Comments
 (0)