8000 Properly install dynloader.h on MSVC builds · ccneo/postgres@49d65e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 49d65e8

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 f744f39 commit 49d65e8

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-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 "utils/dynamic_loader.h"

src/tools/msvc/Install.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ sub CopyIncludeFiles
492492
'Public headers',
493493
$target . '/include/',
494494
'src/include/', 'postgres_ext.h', 'pg_config.h', 'pg_config_os.h',
495-
'pg_config_manual.h');
495+
'dynloader.h', 'pg_config_manual.h');
496496
lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
497497
|| croak 'Could not copy libpq-fs.h';
498498

@@ -515,7 +515,7 @@ sub CopyIncludeFiles
515515
CopyFiles(
516516
'Server headers',
517517
$target . '/include/server/',
518-
'src/include/', 'pg_config.h', 'pg_config_os.h');
518+
'src/include/', 'pg_config.h', 'pg_config_os.h', 'dynloader.h');
519519
CopyFiles(
520520
'Grammar header',
521521
$target . '/include/server/parser/',

src/tools/msvc/Solution.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
273273
'src\include\utils\fmgroids.h');
274274
}
275275

276+
if (IsNewer(
277+
'src/include/dynloader.h',
278+
'src/backend/port/dynloader/win32.h'))
279+
{
280+
copyFile('src/backend/port/dynloader/win32.h',
281+
'src/include/dynloader.h');
282+
}
283+
276284
if (IsNewer('src\include\utils\probes.h', 'src\backend\utils\probes.d'))
277285
{
278286
print "Generating probes.h...\n";

src/tools/msvc/clean.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ REM Delete files created with GenerateFiles() in Solution.pm
2424
if exist src\include\pg_config.h del /q src\include\pg_config.h
2525
if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
2626
if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
27+
if exist src\include\dynloader.h del /q src\include\dynloader.h
2728
if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h
2829
if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
2930
if exist src\include\utils\probes.h del /q src\include\utils\probes.h

0 commit comments

Comments
 (0)
0