shithub: drawterm

Download patch

ref: e60c1d7378244fa05895a4a3a330816c2a68094d
parent: 65a922cca9e0ef86082b19a67171b12d6736d419
author: Amavect <amavect@gmail.com>
date: Fri May 6 21:59:22 EDT 2022

get 64-bit windows to work

--- /dev/null
+++ b/Make.win64
@@ -1,0 +1,32 @@
+# Windows via mingw-w64
+# MING=mingw32- is necessary if you're cross-compiling
+# on another platform.  Otherwise the binaries are just
+# named gcc, etc.
+
+AUDIO=win32
+MING=x86_64-w64-mingw32-
+#MING=
+AR=$(MING)ar
+CC=$(MING)gcc
+AS=$(MING)as
+RANLIB=$(MING)ranlib
+WINDRES=$(MING)windres
+CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -DWINDOWS -DUNICODE -O2
+O=o
+FS=fs-win32
+IP=win32
+OS=win32
+GUI=win32
+LDADD=-lgdi32 -lws2_32 -lwinmm -mwindows
+TARG=drawterm.exe
+XOFILES=glenda-t.$O
+
+all: default
+
+# for root
+libmachdep.a:
+	(cd posix-amd64; make)
+
+glenda-t.$O: glenda-t.rc glenda-t.ico
+	$(WINDRES) -i glenda-t.rc -o glenda-t.o
+
--- a/gui-win32/screen.c
+++ b/gui-win32/screen.c
@@ -532,7 +532,7 @@
 	free(and);
 	free(xor);
 
-	PostMessage(window, WM_SETCURSOR, (int)window, 0);
+	PostMessage(window, WM_SETCURSOR, (WPARAM)window, 0);
 }
 
 void
@@ -543,7 +543,7 @@
 		hcursor = 0;
 	}
 	SetCursor(LoadCursor(0, IDC_ARROW));
-	PostMessage(window, WM_SETCURSOR, (int)window, 0);
+	PostMessage(window, WM_SETCURSOR, (WPARAM)window, 0);
 }
 
 
--- a/include/9windows.h
+++ b/include/9windows.h
@@ -18,4 +18,4 @@
 
 typedef __int64		p9_vlong;
 typedef	unsigned __int64 p9_uvlong;
-typedef unsigned uintptr;
+typedef uintptr_t uintptr;