From: Tom Lane Date: Thu, 1 Mar 2018 18:27:44 +0000 (-0500) Subject: Fix build failure on MSVC. X-Git-Tag: REL9_3_23~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0fb93a266f4e80bd5236f4725025565f237285b;p=thirdparty%2Fpostgresql.git Fix build failure on MSVC. Commit 824cceded introduced use of pg_malloc and pg_realloc into specscanner.l, but it isn't working in 9.3 on MSVC. Evidently we added the infrastructure for that in 9.4. Since the chance of an actual OOM here is tiny, and the consequences would only be an isolation test failure, and we have unchecked OOM hazards elsewhere in this file in 9.3, it's not worth sweating over. Just replace the calls with malloc and realloc. Per buildfarm. --- diff --git a/src/test/isolation/specscanner.l b/src/test/isolation/specscanner.l index bf74051c07a..e070308d485 100644 --- a/src/test/isolation/specscanner.l +++ b/src/test/isolation/specscanner.l @@ -42,7 +42,7 @@ comment ("#"{non_newline}*) %% %{ - litbuf = pg_malloc(LITBUF_INIT); + litbuf = malloc(LITBUF_INIT); litbufsize = LITBUF_INIT; %} @@ -108,7 +108,7 @@ addlitchar(char c) { /* Double the size of litbuf if it gets full */ litbufsize += litbufsize; - litbuf = pg_realloc(litbuf, litbufsize); + litbuf = realloc(litbuf, litbufsize); } litbuf[litbufpos++] = c; }