]> granicus.if.org Git - postgresql/commitdiff
Remove reinvention of stringify macro.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Apr 2017 23:19:16 +0000 (19:19 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Apr 2017 23:19:16 +0000 (19:19 -0400)
We already have CppAsString2, there's no need for the MSVC support to
re-invent a macro to do that (and especially not to inject it in as
ugly a way as this).

Discussion: https://postgr.es/m/CADkLM=c+hm2rc0tkKgC-ZgrLttHT2KkfppE+BC-=i-xj+7V-TQ@mail.gmail.com

src/tools/msvc/Solution.pm

index abac2c74026620a749ec839b68b356e05e9e2f95..7d6275ecb4b38ff50a9175ccc54646949c33a19a 100644 (file)
@@ -156,7 +156,7 @@ sub GenerateFiles
                {
                        s{PG_VERSION "[^"]+"}{PG_VERSION "$self->{strver}$extraver"};
                        s{PG_VERSION_NUM \d+}{PG_VERSION_NUM $self->{numver}};
-s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY(z)\n#define PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " __STRINGIFY2(_MSC_VER) ", $bits-bit"};
+                       s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"};
                        print $o $_;
                }
                print $o "#define PG_MAJORVERSION \"$self->{majorver}\"\n";