Skip to content

Commit 216d568

Browse files
committed
Properly install dynloader.h on MSVC builds
This will enable PL/Java to be cleanly compiled, as dynloader.h is a requirement. Report by Chapman Flack Patch by Michael Paquier Backpatch through 9.1
1 parent dbe2328 commit 216d568

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/backend/utils/fmgr/dfmgr.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616

1717
#include <sys/stat.h>
1818

19-
#ifndef WIN32_ONLY_COMPILER
2019
#include "dynloader.h"
21-
#else
22-
#include "port/dynloader/win32.h"
23-
#endif
2420
#include "lib/stringinfo.h"
2521
#include "miscadmin.h"
2622
#include "storage/shmem.h"

src/tools/msvc/Install.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ sub CopyIncludeFiles
582582
'Public headers', $target . '/include/',
583583
'src/include/', 'postgres_ext.h',
584584
'pg_config.h', 'pg_config_ext.h',
585-
'pg_config_os.h', 'pg_config_manual.h');
585+
'pg_config_os.h', 'dynloader.h', 'pg_config_manual.h');
586586
lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
587587
|| croak 'Could not copy libpq-fs.h';
588588

@@ -605,7 +605,8 @@ sub CopyIncludeFiles
605605
CopyFiles(
606606
'Server headers',
607607
$target . '/include/server/',
608-
'src/include/', 'pg_config.h', 'pg_config_ext.h', 'pg_config_os.h');
608+
'src/include/', 'pg_config.h', 'pg_config_ext.h', 'pg_config_os.h',
609+
'dynloader.h');
609610
CopyFiles(
610611
'Grammar header',
611612
$target . '/include/server/parser/',

src/tools/msvc/Solution.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
301301
'src/include/storage/lwlocknames.h');
302302
}
303303

304+
if (IsNewer(
305+
'src/include/dynloader.h',
306+
'src/backend/port/dynloader/win32.h'))
307+
{
308+
copyFile('src/backend/port/dynloader/win32.h',
309+
'src/include/dynloader.h');
310+
}
311+
304312
if (IsNewer('src/include/utils/probes.h', 'src/backend/utils/probes.d'))
305313
{
306314
print "Generating probes.h...\n";

src/tools/msvc/clean.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ REM Delete files created with GenerateFiles() in Solution.pm
3838
if exist src\include\pg_config.h del /q src\include\pg_config.h
3939
if exist src\include\pg_config_ext.h del /q src\include\pg_config_ext.h
4040
if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
41+
if exist src\include\dynloader.h del /q src\include\dynloader.h
4142
if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
4243
if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h
4344
if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy