aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/winpty/allow-build-static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/winpty/allow-build-static.patch')
-rw-r--r--vcpkg/ports/winpty/allow-build-static.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/vcpkg/ports/winpty/allow-build-static.patch b/vcpkg/ports/winpty/allow-build-static.patch
new file mode 100644
index 0000000..14447df
--- /dev/null
+++ b/vcpkg/ports/winpty/allow-build-static.patch
@@ -0,0 +1,45 @@
+diff --git a/src/include/winpty.h b/src/include/winpty.h
+index fdfe4bc..7864d96 100644
+--- a/src/include/winpty.h
++++ b/src/include/winpty.h
+@@ -32,11 +32,15 @@
+ * When compiled with __declspec(dllexport), with either MinGW or MSVC, the
+ * winpty functions are unadorned--no underscore prefix or '@nn' suffix--so
+ * GetProcAddress can be used easily. */
++#ifndef BUILD_STATIC
+ #ifdef COMPILING_WINPTY_DLL
+ #define WINPTY_API __declspec(dllexport)
+ #else
+ #define WINPTY_API __declspec(dllimport)
+ #endif
++#else
++#define WINPTY_API
++#endif
+
+ #ifdef __cplusplus
+ extern "C" {
+diff --git a/src/shared/WinptyVersion.cc b/src/shared/WinptyVersion.cc
+index 76bb8a5..33a2c23 100644
+--- a/src/shared/WinptyVersion.cc
++++ b/src/shared/WinptyVersion.cc
+@@ -28,15 +28,15 @@
+ // This header is auto-generated by either the Makefile (Unix) or
+ // UpdateGenVersion.bat (gyp). It is placed in a 'gen' directory, which is
+ // added to the search path.
+-#include "GenVersion.h"
++//#include "GenVersion.h"
+
+ void dumpVersionToStdout() {
+- printf("winpty version %s\n", GenVersion_Version);
+- printf("commit %s\n", GenVersion_Commit);
++ printf("winpty version %s\n", PROJECT_VERSION);
++ printf("commit %s\n", "empty");
+ }
+
+ void dumpVersionToTrace() {
+ trace("winpty version %s (commit %s)",
+- GenVersion_Version,
+- GenVersion_Commit);
++ PROJECT_VERSION,
++ "empty");
+ }