diff options
author | Orgad Shaneh <orgads@gmail.com> | 2024-03-03 12:22:14 +0200 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-03-21 10:46:23 -0600 |
commit | acaf48b921453c37fc2df4151699c912940bcd25 (patch) | |
tree | a10889fb5650db2083f4a1e782f5d301f04ad71f /sim/erc32/func.c | |
parent | 9bec569fda7c76849cf3eb0e4a525f627d25f980 (diff) | |
download | gdb-acaf48b921453c37fc2df4151699c912940bcd25.zip gdb-acaf48b921453c37fc2df4151699c912940bcd25.tar.gz gdb-acaf48b921453c37fc2df4151699c912940bcd25.tar.bz2 |
sim/erc32: Rename EVENT_MAX -> MAX_EVENTS
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
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'sim/erc32/func.c')
-rw-r--r-- | sim/erc32/func.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/erc32/func.c b/sim/erc32/func.c index 972a636..80f416d 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 |