aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/winpty/allow-build-static.patch
blob: 14447dfbd22b5e513a44271059d8fe204e775531 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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");
 }