From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id G0QwAlHxeGEYBgAAWB0awg (envelope-from ) for ; Wed, 27 Oct 2021 02:27:29 -0400 Received: by simark.ca (Postfix, from userid 112) id C82B11EE18; Wed, 27 Oct 2021 02:27:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 C451E1E940 for ; Wed, 27 Oct 2021 02:27:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 30482385AC2D for ; Wed, 27 Oct 2021 06:27:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30482385AC2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635316047; bh=Fbyfsq6JXBzKgzAd1XmpS8HcfkfNl3d85kc5VvkPEaw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=mPTr3pgGGOfm9VsxE5ENT8rwSK6sNdz84lrlDmAUIMvOlHEhGNc3WUipq/+JxgLOB e66c8AyXULs6U+tdi8eqy5lGqBEGJ+DlLPEDn6gc++gMakNmTupaTQN11zwDhBC7zt 3Zq91kjVhfa0JdVU/sppusJIqBcngDd54MMowhVA= Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 5EF483858403 for ; Wed, 27 Oct 2021 06:27:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5EF483858403 Received: by mail-pl1-x632.google.com with SMTP id v20so1274782plo.7 for ; Tue, 26 Oct 2021 23:27:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fbyfsq6JXBzKgzAd1XmpS8HcfkfNl3d85kc5VvkPEaw=; b=Ggku90LJ7ciIF0Ii9Y+0ZML9hv6RnOPqRNFoYjTx/F5rWq5yokfF9LOrjJ/U/ow/cQ VUgn3YhESubkWQV9WBa+Eni1F02wh2BC6atIni6iUU0NKWbU3Fk+ZB1UdsRaOEWyLXkw IwiNctZTX/EQJ7TK7R3blxoX64dg63AkCsfI9vHdZ441AuL3Iy/Dc0krXRzBWaK3amlL vv50S0R1ewI3ZNzFhICMjbs4uX1rz7rHkYzu2v6kYmb2RojEG2iRJLzcH9y9ffOpx/jO wYKvjenlNv1h1IS8l6wJM2dY1937D9bu08cbHPYk+yFyUcfxdpkWKJT25IvW3ue4d40s UAhw== X-Gm-Message-State: AOAM530iD+bzSwBSB5d8tLgMjQ/iSiYj3GFwQyBhW62OUfiCQDJD7HNO EBjNuy4FH0/XHkZbjBVqE/zI86AgWV3XzPqaX6Y= X-Google-Smtp-Source: ABdhPJxLpWU0ICml6qMwT2LT+PDzZa3iLjMV2VcYIw508bO6WB3H/aWpndMTUtc+qrF/yfV5vFMw0A== X-Received: by 2002:a17:90a:ac0b:: with SMTP id o11mr3756347pjq.15.1635316027096; Tue, 26 Oct 2021 23:27:07 -0700 (PDT) Received: from TestRunner.tealfjua5x4elltdavttcl1iug.xx.internal.cloudapp.net ([52.156.76.224]) by smtp.gmail.com with ESMTPSA id r16sm10401350pgb.38.2021.10.26.23.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 23:27:06 -0700 (PDT) To: gdb-patches@sourceware.org Subject: [PATCH] sim: fix compilation on mingw64 Date: Wed, 27 Oct 2021 06:27:03 +0000 Message-Id: <20211027062703.3056254-1-orgads@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Orgad Shaneh via Gdb-patches Reply-To: Orgad Shaneh Cc: Orgad Shaneh Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 1. reorder includes in sim-utils.c. 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.h, compilation fails. 2. pre-include winsock2.h in ppc registers.h defines CR, which is used as a member in winnt.h. --- sim/common/sim-utils.c | 5 ++--- sim/ppc/defs.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index 380afd0493f..8edd1c9dc0a 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -20,9 +20,6 @@ along with this program. If not, see . */ /* This must come before any other includes. */ #include "defs.h" -#include "sim-main.h" -#include "sim-assert.h" - #include #include #include /* needed by sys/resource.h */ @@ -34,7 +31,9 @@ along with this program. If not, see . */ #include "libiberty.h" #include "bfd.h" +#include "sim-main.h" #include "sim-utils.h" +#include "sim-assert.h" /* Allocate zero filled memory with xcalloc - xcalloc aborts if the allocation fails. */ diff --git a/sim/ppc/defs.h b/sim/ppc/defs.h index c37f8c60485..31932b8b34d 100644 --- a/sim/ppc/defs.h +++ b/sim/ppc/defs.h @@ -22,6 +22,9 @@ /* Include gnulib's various configure tests. */ #include "gnulib/config.h" +#ifdef HAVE_WINSOCK2_H +#include +#endif /* Reset macros that our config.h will provide. */ #undef PACKAGE -- 2.33.1.windows.1