Commit 216d5684 authored by Bruce Momjian's avatar Bruce Momjian

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
parent dbe23289
...@@ -16,11 +16,7 @@ ...@@ -16,11 +16,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#ifndef WIN32_ONLY_COMPILER
#include "dynloader.h" #include "dynloader.h"
#else
#include "port/dynloader/win32.h"
#endif
#include "lib/stringinfo.h" #include "lib/stringinfo.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "storage/shmem.h" #include "storage/shmem.h"
......
...@@ -582,7 +582,7 @@ sub CopyIncludeFiles ...@@ -582,7 +582,7 @@ sub CopyIncludeFiles
'Public headers', $target . '/include/', 'Public headers', $target . '/include/',
'src/include/', 'postgres_ext.h', 'src/include/', 'postgres_ext.h',
'pg_config.h', 'pg_config_ext.h', 'pg_config.h', 'pg_config_ext.h',
'pg_config_os.h', 'pg_config_manual.h'); 'pg_config_os.h', 'dynloader.h', 'pg_config_manual.h');
lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/') lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
|| croak 'Could not copy libpq-fs.h'; || croak 'Could not copy libpq-fs.h';
...@@ -605,7 +605,8 @@ sub CopyIncludeFiles ...@@ -605,7 +605,8 @@ sub CopyIncludeFiles
CopyFiles( CopyFiles(
'Server headers', 'Server headers',
$target . '/include/server/', $target . '/include/server/',
'src/include/', 'pg_config.h', 'pg_config_ext.h', 'pg_config_os.h'); 'src/include/', 'pg_config.h', 'pg_config_ext.h', 'pg_config_os.h',
'dynloader.h');
CopyFiles( CopyFiles(
'Grammar header', 'Grammar header',
$target . '/include/server/parser/', $target . '/include/server/parser/',
......
...@@ -301,6 +301,14 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY ...@@ -301,6 +301,14 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
'src/include/storage/lwlocknames.h'); 'src/include/storage/lwlocknames.h');
} }
if (IsNewer(
'src/include/dynloader.h',
'src/backend/port/dynloader/win32.h'))
{
copyFile('src/backend/port/dynloader/win32.h',
'src/include/dynloader.h');
}
if (IsNewer('src/include/utils/probes.h', 'src/backend/utils/probes.d')) if (IsNewer('src/include/utils/probes.h', 'src/backend/utils/probes.d'))
{ {
print "Generating probes.h...\n"; print "Generating probes.h...\n";
......
...@@ -38,6 +38,7 @@ REM Delete files created with GenerateFiles() in Solution.pm ...@@ -38,6 +38,7 @@ REM Delete files created with GenerateFiles() in Solution.pm
if exist src\include\pg_config.h del /q src\include\pg_config.h if exist src\include\pg_config.h del /q src\include\pg_config.h
if exist src\include\pg_config_ext.h del /q src\include\pg_config_ext.h if exist src\include\pg_config_ext.h del /q src\include\pg_config_ext.h
if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
if exist src\include\dynloader.h del /q src\include\dynloader.h
if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h
if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment