From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 7785 invoked from network); 7 May 2022 02:18:06 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 7 May 2022 02:18:06 -0000 Received: from mail-il1-f180.google.com ([209.85.166.180]) by 9front; Fri May 6 22:15:42 -0400 2022 Received: by mail-il1-f180.google.com with SMTP id n6so3989575ili.7 for <9front@9front.org>; Fri, 06 May 2022 19:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:organization:mime-version; bh=YpEBIwz3XCcq8q1XZNPSiDCcWRQFtX6DdaO12VSxmvA=; b=WVWnqcnkPwLyuWxsNBmfgu9bwS45xBRTTKU+22+jbJIU3dEb37IOgkFeSqenJVH8Wd a5z5mghero6io1d8qfYvFYsTryPM8W6uo0fVmQ8xMNHi7jTnbkSQjs7jGh3dJLMZpOP/ qA4YFfDLV7MAbZWEas3CtStnPQSVW1DQfOsjvSBqkCZoDW2I9iTdnT+4ooOfDymUJYf7 sbszKh+FrZMXK2c+P/RHMxNFVuuyOFlLBNvzUakFAtUtAIWW59YR6lwTxGtmCCKK/ChK jllOL24bziCrosEsw+aYUtb78i76CyMhEpVElgi8x4j5O4o95NQ0CWRoH515zFQGqsz8 QeVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:organization :mime-version; bh=YpEBIwz3XCcq8q1XZNPSiDCcWRQFtX6DdaO12VSxmvA=; b=KcEdH0sFv3mtkJnYdijrB1Gltkum/6pce3DhBfOcbJXUZ5WUmpNMUX0kWX4x0gC1MA v81750GVA67bcZU7uBQn6Jb3gfU5NslD4y2Nf9mRUXSTE/2dO3M1LXdHp2Gta3CNejem Ft7Y7W6CZ+tx7gfT+FOY2YCKWgdRClanMR7m3g6uMpXn0U7JxweiYXCzQRdGel2Eh9eg E82ZRaeIFwFQmNEGFTA0Lp+m3UnxbKQuzYi7q4042PeP7IQ2ZgqTv9aTSpqqiRhNsiE3 PodSwpnYNc6bZQ6RCp9ex024NRTh+vb37k4THxLMxiNdrN17Bt52vx3OCuvT/fXo83Xd rpNw== X-Gm-Message-State: AOAM531+27SEPIJg4dOxlfvLYumSTlp5B113SZAHZXNP35yEWoKQbmXd rZnBmzkKqoQL0DSXqJy/lPd4dIM2arU= X-Google-Smtp-Source: ABdhPJzN/Ncv73sn9v5RkdNSHbWUvpw/FhvI2VKxpqTa2y+kozlxtsGBahb0bARGXONYJZqNgVDs9Q== X-Received: by 2002:a05:6e02:1c4d:b0:2cf:92c1:eddb with SMTP id d13-20020a056e021c4d00b002cf92c1eddbmr120054ilg.196.1651889738260; Fri, 06 May 2022 19:15:38 -0700 (PDT) Return-Path: Received: from spruce.localdomain ([2601:246:4e03:dc20::43d]) by smtp.gmail.com with ESMTPSA id f61-20020a0284c3000000b0032b3a7817b3sm1757382jai.119.2022.05.06.19.15.37 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 19:15:37 -0700 (PDT) Date: Fri, 6 May 2022 21:13:00 -0500 From: Amavect To: 9front@9front.org Message-ID: <20220506211300.254d5385@spruce.localdomain> Organization: Amavect Industries X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/IIyyzIXdk1Xn++o6i_94=S." List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: lossless session SSL reduce/map markup-scale framework Subject: [9front] [PATCH] drawterm: get 64-bit windows to work Reply-To: 9front@9front.org Precedence: bulk --MP_/IIyyzIXdk1Xn++o6i_94=S. Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, This gets drawterm to compile and not segfault under x86_64 mingw-w64. Tested on Wine and MSYS2. I noticed that the win32-386 and posix-386 directories are nearly the same (some asm preprocessor metarule in the win32-386 Makefile?), so I used posix-amd64 for libmachdep.a instead of making a new directory. I'll leave keeping or removing win32-386/ up to discussion. Thanks, Amavect --MP_/IIyyzIXdk1Xn++o6i_94=S. Content-Type: multipart/mixed; boundary="upas-pqblntbisvsiudykcvnrmsekyl" Content-Disposition: inline This is a multi-part message in MIME format. --upas-pqblntbisvsiudykcvnrmsekyl Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit from postmaster@9front: The following attachment had content that we can't prove to be harmless. To avoid possible automatic execution, we changed the content headers. The original header was: Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-get-64-bit-windows-to-work.patch --upas-pqblntbisvsiudykcvnrmsekyl Content-Type: application/octet-stream Content-Disposition: attachment; filename="0001-get-64-bit-windows-to-work.patch.suspect" From e96ba525c4a5ff82fabfddd8e4e42f6b675e0949 Mon Sep 17 00:00:00 2001 From: Amavect Date: Fri, 6 May 2022 20:59:22 -0500 Subject: [PATCH] get 64-bit windows to work --- Make.win64 | 32 ++++++++++++++++++++++++++++++++ gui-win32/screen.c | 4 ++-- include/9windows.h | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 Make.win64 diff --git a/Make.win64 b/Make.win64 new file mode 100644 index 0000000..1232bc4 --- /dev/null +++ b/Make.win64 @@ -0,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 + diff --git a/gui-win32/screen.c b/gui-win32/screen.c index 3790417..81c9fe6 100644 --- a/gui-win32/screen.c +++ b/gui-win32/screen.c @@ -532,7 +532,7 @@ setcursor(void) free(and); free(xor); - PostMessage(window, WM_SETCURSOR, (int)window, 0); + PostMessage(window, WM_SETCURSOR, (WPARAM)window, 0); } void @@ -543,7 +543,7 @@ cursorarrow(void) hcursor = 0; } SetCursor(LoadCursor(0, IDC_ARROW)); - PostMessage(window, WM_SETCURSOR, (int)window, 0); + PostMessage(window, WM_SETCURSOR, (WPARAM)window, 0); } diff --git a/include/9windows.h b/include/9windows.h index e779475..e65e955 100644 --- 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; -- 2.36.0 --upas-pqblntbisvsiudykcvnrmsekyl-- --MP_/IIyyzIXdk1Xn++o6i_94=S.--