summaryrefslogtreecommitdiffstats
path: root/src/tools/msvc/dummylib
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/msvc/dummylib')
-rw-r--r--src/tools/msvc/dummylib/README13
-rw-r--r--src/tools/msvc/dummylib/Win32.pm7
-rw-r--r--src/tools/msvc/dummylib/Win32/Registry.pm16
-rw-r--r--src/tools/msvc/dummylib/Win32API/File.pm17
4 files changed, 53 insertions, 0 deletions
diff --git a/src/tools/msvc/dummylib/README b/src/tools/msvc/dummylib/README
new file mode 100644
index 0000000..7b63d0e
--- /dev/null
+++ b/src/tools/msvc/dummylib/README
@@ -0,0 +1,13 @@
+
+src/tools/msvc/dummylib
+
+This directory contains just enough of a dummy library to allow checking of
+the programs in src/tools/msvc and src/tools/win32tzlist.pl with
+perl -cw, even on machines that lack the Win32 perl infrastructure.
+
+invoke via:
+
+PERL5LIB=src/tools/msvc/dummylib perl -cw $file
+
+This is the only use that should be made of this directory. Attempting actually
+running of any programs using this library will result in a lot of grief.
diff --git a/src/tools/msvc/dummylib/Win32.pm b/src/tools/msvc/dummylib/Win32.pm
new file mode 100644
index 0000000..d47e59a
--- /dev/null
+++ b/src/tools/msvc/dummylib/Win32.pm
@@ -0,0 +1,7 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+package Win32;
+use strict;
+use warnings;
+1;
diff --git a/src/tools/msvc/dummylib/Win32/Registry.pm b/src/tools/msvc/dummylib/Win32/Registry.pm
new file mode 100644
index 0000000..73bd898
--- /dev/null
+++ b/src/tools/msvc/dummylib/Win32/Registry.pm
@@ -0,0 +1,16 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+package Win32::Registry;
+
+use strict;
+use warnings;
+
+use vars qw($HKEY_LOCAL_MACHINE);
+
+use Exporter ();
+our (@EXPORT, @ISA);
+@ISA = qw(Exporter);
+@EXPORT = qw($HKEY_LOCAL_MACHINE);
+
+1;
diff --git a/src/tools/msvc/dummylib/Win32API/File.pm b/src/tools/msvc/dummylib/Win32API/File.pm
new file mode 100644
index 0000000..b74d28f
--- /dev/null
+++ b/src/tools/msvc/dummylib/Win32API/File.pm
@@ -0,0 +1,17 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+package Win32API::File;
+
+use strict;
+use warnings;
+
+use constant { SEM_FAILCRITICALERRORS => 1, SEM_NOGPFAULTERRORBOX => 2 };
+sub SetErrormode { }
+use Exporter;
+our (@ISA, @EXPORT_OK, %EXPORT_TAGS);
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(SetErrorMode SEM_FAILCRITICALERRORS SEM_NOGPFAULTERRORBOX);
+%EXPORT_TAGS = (SEM_ => [qw(SEM_FAILCRITICALERRORS SEM_NOGPFAULTERRORBOX)]);
+
+1;