From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qwZvBAkdeWEdDAAAWB0awg (envelope-from ) for ; Wed, 27 Oct 2021 05:34:01 -0400 Received: by simark.ca (Postfix, from userid 112) id 01B8C1EE18; Wed, 27 Oct 2021 05:34:00 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5C0911E813 for ; Wed, 27 Oct 2021 05:34:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A2316385801F for ; Wed, 27 Oct 2021 09:33:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2316385801F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635327239; bh=iZQP5iCgP/oupSUpcekG3dndPEhGkWiTbCPhpp/2Bac=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DWTo2LIYwlGNsT/CgCfsftlIOwi1Ue6aSM/oc/uHpl+6YOQDar0nxfGszQm+Wuvrz 6vOhm+HLZS7PKEiPPPXjTrkxWqTWEgzvFy7K580oLuvDTXARKI2azwWaFsscDKLHun ZurcAYKgBjSTXhqlV83QqZH5t7OKUVrLXXxtUGh4= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 0CDE83858C27 for ; Wed, 27 Oct 2021 09:33:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0CDE83858C27 Received: by smtp.gentoo.org (Postfix, from userid 559) id 3A50C343857; Wed, 27 Oct 2021 09:33:38 +0000 (UTC) Date: Wed, 27 Oct 2021 05:33:38 -0400 To: Orgad Shaneh Subject: Re: [PATCH] sim: fix compilation on mingw64 Message-ID: Mail-Followup-To: Orgad Shaneh , gdb-patches@sourceware.org References: <20211027062703.3056254-1-orgads@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9UJykINaAv8HPaNR" Content-Disposition: inline In-Reply-To: <20211027062703.3056254-1-orgads@gmail.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --9UJykINaAv8HPaNR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 27 Oct 2021 06:27, Orgad Shaneh via Gdb-patches wrote: > 1. reorder includes in sim-utils.c. >=20 > sim/mips/sim-main.h defines UserMode, while there is a struct in winnt.h > which has UserMode as a member. So if sim-main.h is included before winnt= =2Eh, > compilation fails. this looks fine, and is the direction we've been taking code -- include the standard headers first, then the sim-specific headers. we haven't gone back through all the files and fixed the order since it (largely) hasn't been an issue. > 2. pre-include winsock2.h in ppc >=20 > registers.h defines CR, which is used as a member in winnt.h. defs.h has a very specific meaning/role in life: include config.h and that's it. we don't want to stuff it full of other random headers. instead, let's find a fix similar to your sim-utils.c change. -mike --9UJykINaAv8HPaNR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmF5HPIACgkQQWM7n+g3 9YGrLw//VH5/qzoTZVRu+4LgXGgKUmhTNSy7DijmAlCDAF9cPCsGx5ZoGvxVJXMf LhEjtxuo0LJa0fn5jIWWATfgZjnTKU/sGex508PrXind1KMktphR2vzWT1Nd6xS0 1jtiW3wI0oKjZVzkSoU//LBoASny5gCQyZXWHrOIizJuHcaGtZPVpQAN8CUHeiYF T1XK3qQM1Q86ZJ3TiL6iAor2om0X9rSpGJxBVuGK/vvuZohyQ5nnG8XSfd8GYf4o y2wX490Wjdv0Nmaj1Hy6fT3ZEptptd4ArG7nqXCccxFkQsbdPVYP5IkaKmArOKPy VXA07jH1SnrRr38Hvf6EalCyWVBUURoXZCfSq28qP1Hju9Bu3Tb/TxsJgZtbJNJG O/ck+iYXNolEB53XGfjn+5C1VE/GyB5o+LBKRYmgv17IhGeCTtoRKrdTmlYjK+ED +bOfePvZ4GEfZgRMDKRATIwRcW3HeyANnN+K5Cc5L/JGhkA26YMFPqSoOxkBAK81 CeSOJWpWbNlm6IRp/e6PZi7Krg67kYLGkaliSGmixYS50xcTVHzPyUESThJ57BWT JsYQMpk2BwiYnYBF2jeT5qbvUf6G+letti5niHViZ4VIaYopT9F6Biq3DcsOjSSW 52M/XiSrqM/CNWqiM5Y05Zjp2YgZg+VChdF8bf6XlN9VPRwrx1c= =WVfc -----END PGP SIGNATURE----- --9UJykINaAv8HPaNR--