From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9qtWMYpP5GWBHzYAWB0awg (envelope-from ) for ; Sun, 03 Mar 2024 05:23:06 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=mwUO+JQw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B77241E0D2; Sun, 3 Mar 2024 05:23:06 -0500 (EST) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A598B1E092 for ; Sun, 3 Mar 2024 05:23:04 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0F9863858408 for ; Sun, 3 Mar 2024 10:23:04 +0000 (GMT) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id DD01E3858C55 for ; Sun, 3 Mar 2024 10:22:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD01E3858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DD01E3858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709461368; cv=none; b=GmhhDImFcw7RmKsJ/XdSmeZ7W1fUFV54mFbaV3DM1eU3zOeU1ez2Z2LoOYtESkZJ972Z5qwO2jJzcFo+h9uVxV/S+tLbQV2hnnD/anMLpPRHGh0QRT0pm3/R06scH4yY5SoHs1VlIKQ0NFg0UFqZUZCHHLcaHohqCpQmk8BDOPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709461368; c=relaxed/simple; bh=zNe84p1TQuiOFDIcwI1QpKOwgIWSSUBHTSRgn1IE724=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=sVXmkVqCsufpt1uMy/+YYetCPgmZpdOrup+YT2sQlTaap0LsNXYJ1nkC0ZKCx478Vi0FMLojkiLCWdgMNaso8mesCfa2dB0ybl0nepbg0Vc+9pPVNNN2htHxSmuLHG+YU6irXAjWi7BhEWxZM7t0AAtLAhklXJYDWQBe4EaYVoY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33d146737e6so2514940f8f.0 for ; Sun, 03 Mar 2024 02:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709461364; x=1710066164; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=begAPiKy+Tt/qPfSBcbc5U1kC/jsgP/rlziAs3dQ/Hs=; b=mwUO+JQwIdiG08lXTISF5wv8OCIdac4E7cnVqBj29r++EGJf4+H/cvSVysR1W21YZT oSf89NU+WQ5nm8+0P4vnIw8PRzzJCWVKuqzNXYv0qLdFvMS6WRGiZcxTKfXInrqPmj1P gKPk+UUjnM4LHLk16Z6vlgFwTU1kuxWwqJAxTpvjf6YU+uw0D+QpPlUGMDD+Lpad4xhe hagVKlVAS9QKY9gYPknrq5ucsRpyNXpT/o/oPx5839ZDOWXLwYP+DURyVxsdOCZhpuu5 Q1Ni+ujkFJpuwpD0qC9GmPIiZ8KF39NZcUvyIC5apoJ6mjupJEHi+IBBZ0hllgwahSpj 8vmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709461364; x=1710066164; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=begAPiKy+Tt/qPfSBcbc5U1kC/jsgP/rlziAs3dQ/Hs=; b=U6VAdmemK5+JClRLADnAoX5LH/kr9HMQBz0/6xCdCDEx2N1wfvYotsuCj++shx9RSW MhqFvdLf5QDEsZbxBtqfwuy0Rc43Ve9DXx4kM9XHXIkux7Rs3i0vmYwxLX+8n55yc/PW OhfU93DEZ6sSGvL76L8Vs7D8gJl0kxe7Ak64Sck3lQbxcx3///fCOSZ1c/r/1mEAvtAZ Q/eAcKWXYQKzqwjiA9zxJ9rdhR3/brbCAl3Y0IEOHgH+SejSvMDEssYEjAPfrYSShVXX Ty1aTRpndLpj+MF4QXZUYAT8IUVdUlYocas9tDMx2/242Ir1+fLrV7whs68DqB3Sk8AJ eENQ== X-Gm-Message-State: AOJu0YxaR3K9Z/9yK51DeBgtvtPXCVx1Aq2Pw+SvfP7qg2kSxeKWTAUm YFN6JRQDxFU8aW01Zb9MGChJs87aBSelRxhGvidNvfgOIj7TZF0YtgQo+2AFChY= X-Google-Smtp-Source: AGHT+IHS8bbrKCLZCMS4e67CO7jPoU54uoPiZX15OcdnHcmd6l6Y2ucdoIoEQ6nbFpQo+Ng5OJWu7A== X-Received: by 2002:adf:f905:0:b0:33d:3ff4:60b8 with SMTP id b5-20020adff905000000b0033d3ff460b8mr3983133wrr.18.1709461363954; Sun, 03 Mar 2024 02:22:43 -0800 (PST) Received: from DESKTOP-FJHNB5R.corp.audiocodes.com ([164.138.127.246]) by smtp.gmail.com with ESMTPSA id e5-20020adff345000000b0033b278cf5fesm9256390wrp.102.2024.03.03.02.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 02:22:43 -0800 (PST) From: Orgad Shaneh X-Google-Original-From: Orgad Shaneh To: gdb-patches@sourceware.org Cc: Orgad Shaneh Subject: [PATCH] sim/erc32: Rename EVENT_MAX -> MAX_EVENTS Date: Sun, 3 Mar 2024 12:22:14 +0200 Message-ID: <20240303102235.1264-1-orgad.shaneh@audiocodes.com> X-Mailer: git-send-email 2.44.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org From: Orgad Shaneh EVENT_MAX is defined as 0x7FFFFFFF (INT_MAX) in winuser.h, so when building on Windows, the value is overridden and compilation fails because the array size of evbuf is too large. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28476 --- sim/erc32/func.c | 6 +++--- sim/erc32/sis.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sim/erc32/func.c b/sim/erc32/func.c index 972a636e619..80f416d87d7 100644 --- a/sim/erc32/func.c +++ b/sim/erc32/func.c @@ -697,7 +697,7 @@ init_signals(void) extern struct disassemble_info dinfo; struct estate ebase; -struct evcell evbuf[EVENT_MAX]; +struct evcell evbuf[MAX_EVENTS]; struct irqcell irqarr[16]; static int @@ -864,10 +864,10 @@ init_event(void) ebase.eq.nxt = NULL; ebase.freeq = evbuf; - for (i = 0; i < EVENT_MAX; i++) { + for (i = 0; i < MAX_EVENTS; i++) { evbuf[i].nxt = &evbuf[i + 1]; } - evbuf[EVENT_MAX - 1].nxt = NULL; + evbuf[MAX_EVENTS - 1].nxt = NULL; } void diff --git a/sim/erc32/sis.h b/sim/erc32/sis.h index 504d7e69c77..cf44ddfb7fe 100644 --- a/sim/erc32/sis.h +++ b/sim/erc32/sis.h @@ -31,7 +31,7 @@ #define I_ACC_EXC 1 /* Maximum events in event queue */ -#define EVENT_MAX 256 +#define MAX_EVENTS 256 /* Maximum # of floating point queue */ #define FPUQN 1 -- 2.40.1