bc7fb05dcfd019c00a5b5b5ee9a0e5c1e730e9bf
22 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9ea45d7a1f | remove some trailing whitespace | ||
|
|
d9395dcd23 | more integration suggestion adoption | ||
|
|
6806c30a59 |
adopt some integration suggestions
sys/lib -> sys/libnh sys/lib/libnethackmain.c -> sys/libnh/libnhmain.c libnethack.a -> libnh.a |
||
|
|
d4e97cc650 | libnethackmain.c includes date.h | ||
|
|
ac493aa455 |
placement of libnethack targets required adjusting
From -PRE to -POST section |
||
|
|
d8961b0067 | updates for LIBNH build | ||
|
|
15c1cb648d | integrate updates made to PR earlier on Oct 4 | ||
|
|
dc2d757399 |
libnethack pr385
roll parts of pr385 into source tree
This does not take the PR as is.
Unlike the PR, this streamlines and minimizes the integration somewhat:
- use hints/include mechanism instead of creating alternative
Makefile.dat, Makefile.src, Makefile.top, Makefile.utl in sys/lib;
those would have been a maintenance nightmare.
- don't have alternative mkmkfile.sh and setup.sh in sys/lib.
- sys/lib/libnethackmain.c differed from sys/unix/unixmain.c by
very little, so just place a small bit of conditional code at the
top of sys/unix/unixmain.c instead.
- changed the conditional code bits from __EMSCRIPTEN__ to
CROSS_TO_WASM.
- You should be able to build the wasm result by:
cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
make fetch-lua (<-one time)
make WANT_LIBNH all
- You should be able to build LIBNBH by:
cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
make fetch-lua (<-one time)
make CROSS_TO_WASM=1 all
As it is currently coded, winshim.c requires C99.
|
||
|
|
b9b4755fe3 |
expand sys/unix Makefiles scope
Expand the use of the sys/unix Makefiles to be used for both normal local builds and installs, as well as cross-compiles for other platforms/targets. Up until now, the primary unix Makefiles have treated util/host-side component compiles, links and target object files just the same as the game component compiles, links, and target object files. Unfortunately, that meant that cross-compile effort typically had to re-invent Makefiles specific to the cross-compile, creating a maintenance burden and deviation from the typical local unix build and providing a daunting obstacle to those that want to establish build for a target environment/platform. This change distinguishes between util/host-side component builds, links, and component builds and targets object files destined for the game (and other target platforms) in the Makefiles. In theory, this will ease the effort for people that want to try to resurrect NetHack perhaps on an old platform where it is no longer viable to build NetHack-3.7 on the platform itself using old, outdated compile tools, possibly with an old, outdated C dialect. Some details: - Game-related targets in the Makefiles (as opposed to util/host-side targets that will be executed on the host), which could be destined for another platform in a cross-compile scenario are prefixed with $(TARGETPFX) so that they are distinguished. The default scenario where no cross-compiler is involved, is to define TARGETPFX to nothing, and therefore meant to have no effect. - Game-related compile and link commands in the Makefiles and their associated command line flags are distinguished from util/host-side compile and link commands in the Makefiles by using $(TARGET_CC), $(TARGET_CFLAGS), $(TARGET_LINK), $(TARGET_LFLAGS), $(TARGET_CXX), $(TARGET_CXXFLAGS), $(TARGET_LIBS). Those are used in the Makefile in place of $(CC), $(CFLAGS), $(LINK), $(LFLAGS), $(CXX), $(CXXFLAGS), $(LIBS). The default scenario where no cross-compiler is involved, defines the TARGET_ version of those Makefile variables to match their typical non-TARGET_ ounterparts. - The dependency lists in the Makefiles includes the $(TARGETPFX) prefix for stuff that would potentially be produced from a cross-compile build. - It adds pregame targets and $(PREGAME) variable, so that hints files can add some additional stuff if required for a cross-compile scenario. The default scenario where no cross-compiler is involved doesn't do anything for $(PREGAME). - It adds $(BUILDMORE) target and variable, so that hints files can add some additional things to be built for a cross-compile scenario. - It adds a "package" target and $(PACKAGE) variable, so that hints files can add steps for the target platform in a cross-compile scenario. The "install" target assumes local build and placement and isn't really applicable to a cross-compile scenario where the results really just need to be bundled up for transport to the target platform. - Also, this adds a pair of include files that can be updated with some cross-compile recipes as they evolve. They are named "cross-pre.2020" (for stuff to be included in the PRE section) and "cross-post.2020" for stuff to be included in the POST section via sys/unix/setup.sh. Those are included in sys/unix/hints/linux.2020 and sys/unix/hints/macOS.2020 hints files. |
||
|
|
5772069fb7 |
hints/*.2020 vs CFLAGS, take 3...
Avoid use of GNU make's 'override' feature by requiring 'make CCFLAGS=-O' to replace -g from the make command line instead of 'make CFLAGS=-O'. Note the extra 'C' in the spelling. Revert the previous umpteen MORECFLAGS+= back to normal CFLAGS+=. |
||
|
|
0b67fd60df |
hints/{linux,macOS}.2020
A recent change was intended to allow specifying make CFLAGS=-O on the command line to override our default of -g, but it didn't work as intended. foo=bar and foo+=bar don't work if foo has been given a value on the command line. The first was expected behavior but the second wasn't, at least for me. GNU make allows 'override foo+=bar' to cope with that. (We're already implicitly requiring GNU make for the linux and OSX hints.) |
||
|
|
b48ebbfe15 | update unix Makefile hints | ||
|
|
e191e6bc8f |
build warning fix on g++ >= 9 and Qt
../win/Qt/qt_menu.cpp: In member function ‘virtual void nethack_qt_::NetHackQtTextWindow::UseRIP(int, time_t)’:
../win/Qt/qt_menu.cpp:680:54: warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 17 [-Wformat-truncation=]
680 | snprintf(rip_line[NAME_LINE], STONE_LINE_LEN+1, "%s", g.plname);
| ^~ ~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from ../win/Qt/qt_menu.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin_snprintf’ output between 1 and 32 bytes into a destination of size 17
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~../win/Qt/qt_menu.cpp: In member function ‘virtual void nethack_qt_::NetHackQtTextWindow::UseRIP(int, time_t)’:
../win/Qt/qt_menu.cpp:680:54: warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 17 [-Wformat-truncation=]
680 | snprintf(rip_line[NAME_LINE], STONE_LINE_LEN+1, "%s", g.plname);
| ^~ ~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from ../win/Qt/qt_menu.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin_snprintf’ output between 1 and 32 bytes into a destination of size 17
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
0438dfe5a3 |
Qt install dependencies
Playground setup: Qt does not use external files pet_mark.xbm and pilemark.xbm, it has pixmaps for those compiled in via qt_xpms.h. Presumably because the pet mark heart has two sizes there. |
||
|
|
410b46678b |
comment bit
name had evolved but the comment had not been updated |
||
|
|
bdbf8f19cc |
update some hints mechanics for 2020
Allow sharing of common code between different hints files
through use of: #-INCLUDE
new folder created: sys/unix/hints/include
new hints include files:
sys/unix/hints/include/multiw-1.2020
sys/unix/hints/include/multiw-2.2020
structure the early parts of sys/unix/hints/linux.2020 and
sys/unix/hints/macOS.2020 consistently, and utilize #-INCLUDE multiw-1.2020
and #-INCLUDE multiw-2.2020 in them. That will allow the Makefile lines
that they contain to be maintained in a single place.
|
||
|
|
0500aae0c0 |
another linux.2020 tweak
Leave CC alone; we've already determined whether it invoked gcc or clang |
||
|
|
ed46d5db08 |
detect the compiler available
test if CC invokes clang. If not, then assume it is gcc. |
||
|
|
8dca9b4f8a | add compiler detection so warnings adjusted appropriately | ||
|
|
ef9caca4da | distinguish compiler version before adding new -Wno option | ||
|
|
6087891d4b |
add -Wno-format-overflow to build under sys/unix/hints/linux.2020
Without that:
botl.c: In function ‘status_hilite2str’:
botl.c:3236:24: warning: ‘/’ directive writing 1 byte into a region of size between 0 and 255 [-Wformat-overflow=]
3236 | Sprintf(buf, "%s/%s/%s", initblstats[hl->fld].fldname, behavebuf, clrbuf);
| ^
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 3 or more bytes (assuming 513) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c: In function ‘status_hilite_linestr_gather_conditions’:
botl.c:3134:48: warning: ‘%s’ directive writing up to 255 bytes into a region of size 245 [-Wformat-overflow=]
3134 | Sprintf(condbuf, "condition/%s/%s",
| ^~
3135 | conditionbitmask2str(cond_maps[i].bm), clrbuf);
| ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 12 or more bytes (assuming 267) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c: In function ‘do_statusline2’:
botl.c:229:37: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
229 | Sprintf(newbot2, "%s %s %s %s %s", hlth, cond, dloc, expr, tmmv);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c:227:37: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
227 | Sprintf(newbot2, "%s %s %s %s %s", dloc, hlth, cond, expr, tmmv);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c:225:37: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
225 | Sprintf(newbot2, "%s %s %s %s %s", dloc, hlth, expr, cond, tmmv);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c:219:33: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 0 and 254 [-Wformat-overflow=]
219 | Sprintf(newbot2, "%s %s %s %s %s", dloc, hlth, expr, tmmv, cond);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 640 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
botl.c: In function ‘status_hilite_menu_add’:
botl.c:3726:38: warning: ‘ or ’ directive writing 4 bytes into a region of size between 1 and 80 [-Wformat-overflow=]
3726 | Sprintf(obuf, "%s or %s",
| ^~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from botl.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 163 bytes into a destination of size 80
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmd.c: In function ‘extcmd_via_menu’:
cmd.c:668:44: warning: ‘%s’ directive writing up to 127 bytes into a region of size 110 [-Wformat-overflow=]
668 | Sprintf(prompt, "Extended Command: %s", cbuf);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from cmd.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 19 and 146 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmd.c: In function ‘paranoid_query’:
cmd.c:4488:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 113 and 128 [-Wformat-overflow=]
4488 | Sprintf(qbuf, "%s%s %s", promptprefix, pbuf, responsetype);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from cmd.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 282 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_name.c: In function ‘getpos_menu’:
do_name.c:612:37: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
612 | Sprintf(fullbuf, "%s%s%s", firstmatch,
| ^
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from do_name.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 1 or more bytes (assuming 257) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_name.c: In function ‘getpos’:
do_name.c:205:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
205 | Sprintf(sbuf, "Type a %s when you are at the right place.", kbuf);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from do_name.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 41 and 296 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_name.c:205:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
205 | Sprintf(sbuf, "Type a %s when you are at the right place.", kbuf);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from do_name.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 41 and 296 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
do_wear.c: In function ‘armor_or_accessory_off’:
do_wear.c:1510:52: warning: ‘%s’ directive writing up to 127 bytes into a region of size 103 [-Wformat-overflow=]
1510 | Sprintf(why, " without taking off your %s first", what);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from do_wear.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 159 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c: In function ‘print_dungeon’:
dungeon.c:2156:27: warning: ‘%s’ directive writing up to 1407 bytes into a region of size 256 [-Wformat-overflow=]
2156 | Sprintf(buf, "%s: %s %d", dptr->dname, descr, dptr->depth_start);
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 1427 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c:2153:27: warning: ‘%s’ directive writing up to 1407 bytes into a region of size 256 [-Wformat-overflow=]
2153 | Sprintf(buf, "%s: %s %d to %d", dptr->dname, makeplural(descr),
| ^~
dungeon.c:2153:26: note: directive argument in the range [-2147483647, 2147483646]
2153 | Sprintf(buf, "%s: %s %d to %d", dptr->dname, makeplural(descr),
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 1427) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c: In function ‘print_mapseen’:
dungeon.c:3191:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
3191 | Sprintf(outbuf, " (play %s to open or close drawbridge)", tmp);
| ^~ ~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 37 and 292 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c:3352:35: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
3352 | Sprintf(buf, "%sThe castle%s.", PREFIX, tunesuffix(mptr, tmpbuf));
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 18 and 273 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dungeon.c:3403:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 242 [-Wformat-overflow=]
3403 | Sprintf(buf, "%s%syou, %s%c", PREFIX, TAB, tmpbuf,
| ^~ ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from dungeon.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 16 and 271 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c: In function ‘edibility_prompts’:
eat.c:2359:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2359 | Sprintf(buf, "%s like %s could be tainted! %s", foodsmell, it_or_they,
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 27 and 536 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2385:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2385 | Sprintf(buf, "%s like %s might be poisonous! %s", foodsmell,
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 29 and 538 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2394:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2394 | Sprintf(buf, "%s like %s might have been poisoned. %s", foodsmell,
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 35 and 544 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2400:25: warning: ‘ unhealthy. ’ directive writing 13 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2400 | Sprintf(buf, "%s unhealthy. %s", foodsmell, eat_it_anyway);
| ^~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 14 and 396 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2407:25: warning: ‘ rather acidic. ’ directive writing 17 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2407 | Sprintf(buf, "%s rather acidic. %s", foodsmell, eat_it_anyway);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 18 and 400 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2415:25: warning: ‘ disgusting to you right now...’ directive writing 31 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2415 | Sprintf(buf, "%s disgusting to you right now. %s", foodsmell,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 414 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2430:25: warning: ‘ foul and unfamiliar to you...’ directive writing 30 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2430 | Sprintf(buf, "%s foul and unfamiliar to you. %s", foodsmell,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 31 and 413 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2450:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2450 | Sprintf(buf, "%s like %s could be tainted! %s",
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 27 and 536 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2441:25: warning: ‘ unfamiliar to you. ’ directive writing 21 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2441 | Sprintf(buf, "%s unfamiliar to you. %s", foodsmell, eat_it_anyway);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 22 and 404 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2376:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2376 | Sprintf(buf, "%s like %s could be rotten! %s", foodsmell, it_or_they,
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 25 and 534 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eat.c:2367:25: warning: ‘ like ’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
2367 | Sprintf(buf, "%s like %s could be something very dangerous! %s",
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from eat.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 44 and 553 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
explode.c: In function ‘explode’:
explode.c:539:69: warning: ‘%s’ directive writing up to 255 bytes into a region of size 236 [-Wformat-overflow=]
539 | Sprintf(g.killer.name, "caught %sself in %s own %s", uhim(),
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from explode.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 21 or more bytes (assuming 276) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hacklib.c: In function ‘yyyymmddhhmmss’:
hacklib.c:1089:28: warning: ‘%02d’ directive writing between 2 and 11 bytes into a region of size between 4 and 11 [-Wformat-overflow=]
1089 | Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d", datenum, lt->tm_mon + 1,
| ^~~~
hacklib.c:1089:22: note: directive argument in the range [-2147483647, 2147483647]
1089 | Sprintf(datestr, "%04ld%02d%02d%02d%02d%02d", datenum, lt->tm_mon + 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from hacklib.c:7:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 15 and 67 bytes into a destination of size 15
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘status_enlightenment’:
insight.c:1208:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 127 [-Wformat-overflow=]
1208 | Sprintf(sfx, " %s", buf), buf[0] = '\0';
| ^~ ~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 257 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘list_vanquished’:
insight.c:2464:39: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
2464 | Sprintf(buftoo, "%*s%s", pfx, "", buf);
| ^
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 1 and 261 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘background_enlightenment’:
insight.c:326:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 253 and 256 [-Wformat-overflow=]
326 | Sprintf(buf, "%s%s%s%s form", !final ? "currently " : "",
| ^~
327 | altphrasing ? just_an(anbuf, tmpbuf) : "in ",
328 | tmpbuf, uasmon->mname);
| ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 6 or more bytes (assuming 264) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c:326:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 243 and 246 [-Wformat-overflow=]
326 | Sprintf(buf, "%s%s%s%s form", !final ? "currently " : "",
| ^~
327 | altphrasing ? just_an(anbuf, tmpbuf) : "in ",
328 | tmpbuf, uasmon->mname);
| ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 16 or more bytes (assuming 274) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c:444:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 121 and 248 [-Wformat-overflow=]
444 | Sprintf(buf, "in %s, on %s", dgnbuf, tmpbuf);
| ^~ ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 391 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c:423:48: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 223 and 233 [-Wformat-overflow=]
423 | Sprintf(buf, "in the endgame, on the %s%s",
| ^~
424 | !strncmp(tmpbuf, "Plane", 5) ? "Elemental " : "", tmpbuf);
| ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 24 and 289 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
insight.c: In function ‘enlightenment’:
insight.c:245:21: warning: ‘ the ’ directive writing 5 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
245 | Sprintf(buf, "%s the %s's attributes:", tmpbuf,
| ^~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from insight.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 20 or more bytes (assuming 275) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c: In function ‘hitmm’:
mhitm.c:591:37: warning: ‘ squeezes’ directive writing 9 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
591 | Sprintf(buf, "%s squeezes", magr_name);
| ^~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:578:33: warning: ‘ stings’ directive writing 7 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
578 | Sprintf(buf, "%s stings", magr_name);
| ^~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 263 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:584:33: warning: ‘ touches’ directive writing 8 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
584 | Sprintf(buf, "%s touches", magr_name);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:581:33: warning: ‘ butts’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
581 | Sprintf(buf, "%s butts", magr_name);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 262 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:575:33: warning: ‘ bites’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
575 | Sprintf(buf, "%s bites", magr_name);
| ^~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 262 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mhitm.c:597:37: warning: ‘ hits’ directive writing 5 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
597 | Sprintf(buf, "%s hits", magr_name);
| ^~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from mhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 261 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
options.c: In function ‘option_help’:
options.c:8035:28: warning: ‘ - ’ directive writing 3 bytes into a region of size between 1 and 236 [-Wformat-overflow=]
8035 | Sprintf(buf, "%-20s - %s%c", buf2, allopt[i].descr,
| ^~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from options.c:14:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 25 or more bytes (assuming 260) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pager.c: In function ‘do_screen_description’:
pager.c:1189:38: warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=]
1187 | *firstmatch = look_buf;
| ~~~~~~~~
1188 | if (*(*firstmatch)) {
1189 | Sprintf(temp_buf, " (%s)", *firstmatch);
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from pager.c:9:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 259 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pager.c:1195:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
1195 | Sprintf(temp_buf, " [seen: %s]", monbuf);
| ^~ ~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from pager.c:9:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c: In function ‘dodip’:
potion.c:1949:26: warning: ‘%s’ directive writing up to 127 bytes into a region of size 124 [-Wformat-overflow=]
1949 | Sprintf(qbuf, "%s%s into the %s?", Dip_,
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 16 or more bytes (assuming 143) into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c:1939:26: warning: ‘%s’ directive writing up to 127 bytes into a region of size 124 [-Wformat-overflow=]
1939 | Sprintf(qbuf, "%s%s into the fountain?", Dip_,
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 24 and 151 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c:1969:24: warning: ‘%s’ directive writing up to 127 bytes into a region of size 124 [-Wformat-overflow=]
1969 | Sprintf(qbuf, "dip %s into", flags.verbose ? obuf : shortestname);
| ^~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 137 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
potion.c: In function ‘potionhit’:
potion.c:1424:41: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1424 | Sprintf(saddle_glows, "%s %s", buf, aobjnam(saddle, "glow"));
| ^
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from potion.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 257) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spell.c: In function ‘getspell’:
spell.c:706:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size 109 [-Wformat-overflow=]
706 | Sprintf(qbuf, "Cast which spell? [%s *?]", lets);
| ^~ ~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from spell.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 24 and 279 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
topten.c: In function ‘outentry’:
topten.c:1060:32: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
1060 | Sprintf(linebuf, "%15s %s", "", linebuf3);
| ^~ ~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from topten.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 17 and 272 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
trap.c: In function ‘untrap’:
trap.c:4462:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 88 [-Wformat-overflow=]
4462 | qbuf, "There %s and %s here. %s %s?",
| ^~
......
4465 | (ttmp->ttyp == WEB) ? "Remove" : "Disarm", the_trap);
| ~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from trap.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 42 or more bytes (assuming 297) into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uhitm.c: In function ‘hmon_hitmon’:
uhitm.c:1316:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 244 and 251 [-Wformat-overflow=]
1316 | Sprintf(silverobjbuf, "Your %s%s %s",
| ^~
1317 | strstri(saved_oname, "silver") ? "" : "silver ",
1318 | saved_oname, vtense(saved_oname, "sear"));
| ~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from uhitm.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 7 or more bytes (assuming 269) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c: In function ‘enhance_weapon_skill’:
weapon.c:1271:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 249 and 253 [-Wformat-overflow=]
1271 | Sprintf(buf, " %s%s\t[%s]", prefix, P_NAME(i),
| ^~
1272 | sklnambuf);
| ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 5 or more bytes (assuming 264) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1268:49: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 248 and 252 [-Wformat-overflow=]
1268 | Sprintf(buf, " %s %-*s [%s]", prefix, longest,
| ^~
1269 | P_NAME(i), sklnambuf);
| ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 6 or more bytes (assuming 265) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1263:46: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 250 and 254 [-Wformat-overflow=]
1263 | Sprintf(buf, " %s%s\t%s\t%5d(%4d)", prefix, P_NAME(i),
| ^~
1264 | sklnambuf, P_ADVANCE(i),
| ~~~~~~~~~
weapon.c:1263:38: note: directive argument in the range [0, 65535]
1263 | Sprintf(buf, " %s%s\t%s\t%5d(%4d)", prefix, P_NAME(i),
| ^~~~~~~~~~~~~~~~~~~~~
weapon.c:1263:38: note: directive argument in the range [-325120, 327680]
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 15 or more bytes (assuming 277) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1259:47: warning: ‘%-12s’ directive writing between 12 and 255 bytes into a region of size between 250 and 254 [-Wformat-overflow=]
1259 | Sprintf(buf, " %s%-*s %-12s %5d(%4d)", prefix,
| ^~~~~
1260 | longest, P_NAME(i), sklnambuf, P_ADVANCE(i),
| ~~~~~~~~~
weapon.c:1259:38: note: directive argument in the range [0, 65535]
1259 | Sprintf(buf, " %s%-*s %-12s %5d(%4d)", prefix,
| ^~~~~~~~~~~~~~~~~~~~~~~~
weapon.c:1259:38: note: directive argument in the range [-325120, 327680]
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from weapon.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 27 or more bytes (assuming 277) into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../win/curses/cursinit.c: In function ‘curses_choose_character’:
../win/curses/cursinit.c:454:26: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
454 | sprintf(choice, "%s%c", tmpchoice, '\033');
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/curses.h:192,
from ../win/curses/cursinit.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 129 bytes into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../win/X11/winX.c: In function ‘X11_init_nhwindows’:
../win/X11/winX.c:1509:12: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
1509 | (void) seteuid(getuid());
| ^~~~~~~~~~~~~~~~~
../win/X11/winX.c:1570:12: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
1570 | (void) seteuid(savuid);
| ^~~~~~~~~~~~~~~
../win/tty/wintty.c: In function ‘tty_player_selection’:
../win/tty/wintty.c:964:30: warning: ‘%s’ directive writing up to 127 bytes into a region of size between 95 and 126 [-Wformat-overflow=]
964 | Sprintf(pbuf, "%s, %s%s %s %s", g.plname, aligns[ALGN].adj, plbuf,
| ^~ ~~~~~
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from ../win/tty/wintty.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 5 or more bytes (assuming 163) into a destination of size 128
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
version.c: In function ‘early_version_info’:
version.c:263:24: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
263 | Sprintf(buf2, "%s\n", buf);
| ^
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from version.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 257 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
version.c:263:24: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
263 | Sprintf(buf2, "%s\n", buf);
| ^
In file included from /usr/include/stdio.h:867,
from ../include/global.h:9,
from ../include/config.h:608,
from ../include/hack.h:10,
from version.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 257 bytes into a destination of size 256
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
|
90a418a80a |
This sys/unix/hints/linux.2020 file can support tty, curses, x11, and Qt in the same binary, or
any subset of those.
- For x11 support, you'll need to obtain and install x11 development libraries.
For example, on Ubuntu 20.04 (as of August 2020):
sudo apt-get install libx11-dev
sudo apt-get install libmotif-dev
sudo apt-get install libxaw7-dev
sudo apt install xfonts-utils
(That last one is for bdftopcf and mkfontdir utils)
- For Qt support, you'll need to obtain and install Qt.
For example, on Ubuntu 20.04 (as of August 2020):
sudo apt-get install qtbase5-dev
sudo apt-get install qtmultimedia5-dev
Another odd note about Qt on Linux is that if you find you are getting
the following error trying to run NetHack after you build it:
"error while loading shared libraries: libQt5Core.so.5:
cannot open shared object file: No such file or directory"
you may have to fix that (one-time only) by the following command:
sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
- For curses support, you may need to obtain and install the
ncurses development libraries if they aren't already installed
with your distribution. They seem to be there already with Ubuntu 20.04, but
for example, if you needed to install ncurses:
sudo apt-get install libncurses-dev
- tty support shouldn't require any prerequisite additional packages.
---
Assuming you have the prerequisite packages mentioned above, you can
specify, right on the make command line, which window ports (or interfaces)
to include in your build. Doing it via the make command line means that you
don't have to edit the Makefile.
The make command line example below will build one binary that has
support for tty, curses, x11, and Qt. You can select between them via
your .nethackrc file (OPTIONS=windowtype:curses, OPTIONS=windowtype:tty,
OPTIONS=windowtype:x11, or OPTIONS=windowtype:Qt).
make WANT_WIN_QT=1 WANT_WIN_X11=1 WANT_WIN_CURSES=1 WANT_WIN_TTY=1 install
|