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 ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
260 lines
7.9 KiB
Plaintext
Executable File
260 lines
7.9 KiB
Plaintext
Executable File
#
|
|
# NetHack 3.7 linux.2020 $NHDT-Date: 1597029501 2020/08/10 03:18:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $
|
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
|
# NetHack may be freely redistributed. See license for details.
|
|
#
|
|
#-PRE
|
|
# Linux hints file with support for multiple window ports (interfaces)
|
|
#
|
|
# This hints file supports tty, curses, x11, and Qt in the same binary,
|
|
# but:
|
|
#
|
|
# - 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 won't
|
|
# have to edit the Makefile.
|
|
#
|
|
# make WANT_WIN_QT=1 WANT_WIN_X11=1 WANT_WIN_CURSES=1 WANT_WIN_TTY=1 install
|
|
#
|
|
# Add WANT_DEFAULT=Qt (or other interface) if you want nethack to use
|
|
# something other than tty as the default interface.
|
|
#
|
|
# 1. Which windowing interface(s) should be included in this binary?
|
|
# One or more of these can be manually uncommented and/or can be specified
|
|
# on the 'make' command line. If none are enabled, tty will be used.
|
|
#WANT_WIN_TTY=1
|
|
#WANT_WIN_CURSES=1
|
|
#WANT_WIN_X11=1
|
|
#WANT_WIN_QT=1
|
|
|
|
# 1a. What is the default window system?
|
|
# Exactly one of these can be manually uncommented and/or can be specified
|
|
# on the 'make' command line. If none is enabled, the first among
|
|
# WANT_WIN_{tty,curses,X11,Qt} that is enabled will become default.
|
|
#WANT_DEFAULT=tty
|
|
#WANT_DEFAULT=curses
|
|
#WANT_DEFAULT=Qt
|
|
#WANT_DEFAULT=X11
|
|
|
|
ifdef WANT_WIN_QT
|
|
QTDIR=/usr
|
|
endif # WANT_WIN_QT
|
|
ifndef LIBXPM
|
|
LIBXPM= -L/opt/X11/lib -lXpm
|
|
endif
|
|
|
|
# 2. Not customizable in this linux.2020 hints file, which provides
|
|
# a single-user build for Linux (such as Ubuntu focal).
|
|
GAMEUID = $(USER)
|
|
GAMEGRP = games
|
|
|
|
# 3. miscellaneous: compiler selection; Qt5 requires C++11
|
|
ifdef WANT_WIN_QT
|
|
CC=clang
|
|
CXX=clang++ -std=gnu++11
|
|
#CC=gcc
|
|
#CXX=g++ -std=gnu++11
|
|
LINK= $(CXX)
|
|
else
|
|
# compiling C code only; CC and CXX defaults can be used
|
|
#CC=
|
|
#CXX=
|
|
LINK = $(CC)
|
|
endif
|
|
#MOC = moc
|
|
|
|
#
|
|
# You shouldn't need to change anything below here (in the hints file; if
|
|
# you're reading this in Makefile augmented by hints, that may not be true).
|
|
#
|
|
|
|
# Make sure that at least one interface is enabled.
|
|
ifndef WANT_WIN_TTY
|
|
ifndef WANT_WIN_CURSES
|
|
ifndef WANT_WIN_X11
|
|
ifndef WANT_WIN_QT
|
|
WANT_WIN_TTY=1
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# Make sure that a default interface is specified; this doesn't guarantee
|
|
# sanity for something like 'make WANT_WIN_CURSES=1 WANT_DEFAULT=X11' but
|
|
# 'makedefs -v' would notice, complain, and quit causing 'make' to quit.
|
|
ifndef WANT_DEFAULT
|
|
# pick the first one enabled among { tty, curses, X11, Qt }
|
|
ifdef WANT_WIN_TTY
|
|
WANT_DEFAULT=tty
|
|
else
|
|
ifdef WANT_WIN_CURSES
|
|
WANT_DEFAULT=curses
|
|
else
|
|
ifdef WANT_WIN_X11
|
|
WANT_DEFAULT=X11
|
|
else
|
|
ifdef WANT_WIN_QT
|
|
WANT_DEFAULT=Qt
|
|
else
|
|
# ? shouldn't be able to get here...
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
CFLAGS=-g -O -I../include -DNOTPARMDECL
|
|
CFLAGS+=-Wno-format-overflow
|
|
CFLAGS+=-DDLB
|
|
CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
|
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
|
CFLAGS+=-DTIMED_DELAY
|
|
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
|
CFLAGS+=-DDUMPLOG
|
|
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
|
|
#CFLAGS+=-DEXTRA_SANITY_CHECKS
|
|
#CFLAGS+=-DEDIT_GETLIN
|
|
#CFLAGS+=-DSCORE_ON_BOTL
|
|
#CFLAGS+=-DMSGHANDLER
|
|
#CFLAGS+=-DTTY_TILES_ESCCODES
|
|
#CFLAGS+=-DTTY_SOUND_ESCCODES
|
|
|
|
WINSRC =
|
|
WINOBJ0 =
|
|
WINLIB =
|
|
VARDATND =
|
|
VARDATND0 =
|
|
CURSESLIB =
|
|
|
|
ifdef WANT_WIN_TTY
|
|
WINSRC += $(WINTTYSRC)
|
|
WINOBJ0 += $(WINTTYOBJ)
|
|
CURSESLIB = -lncurses -ltinfo
|
|
else # !WANT_WIN_TTY
|
|
CFLAGS += -DNOTTYGRAPHICS
|
|
endif # !WANT_WIN_TTY
|
|
|
|
ifdef WANT_WIN_CURSES
|
|
CFLAGS += -DCURSES_GRAPHICS
|
|
WINSRC += $(WINCURSESSRC)
|
|
WINOBJ0 += $(WINCURSESOBJ)
|
|
CURSESLIB = -lncurses -ltinfo
|
|
endif
|
|
|
|
ifdef CURSESLIB
|
|
WINLIB += $(CURSESLIB)
|
|
endif
|
|
|
|
ifdef WANT_WIN_X11
|
|
CFLAGS += -DX11_GRAPHICS
|
|
USE_XPM=1
|
|
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
|
|
VARDATND0 += x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
|
# -x: if built without dlb, some versions of mkfontdir think *.lev are fonts
|
|
POSTINSTALL += bdftopcf win/X11/nh10.bdf > $(HACKDIR)/nh10.pcf; ( cd $(HACKDIR); mkfontdir -x .lev );
|
|
# separate from CFLAGS so that we don't pass it to every file
|
|
X11CFLAGS = -I/opt/X11/include
|
|
# avoid repeated complaints about _X_NONNULL(args...) in <X11/Xfuncproto.h>
|
|
X11CFLAGS += -Wno-variadic-macros
|
|
ifdef USE_XPM
|
|
CFLAGS += -DUSE_XPM
|
|
WINX11LIB += -lXpm
|
|
VARDATND0 += rip.xpm
|
|
endif
|
|
WINSRC += $(WINX11SRC)
|
|
WINOBJ0 += $(WINX11OBJ)
|
|
WINLIB += $(WINX11LIB)
|
|
LFLAGS=-L/opt/X11/lib
|
|
endif # WANT_WIN_X11
|
|
|
|
ifdef WANT_WIN_QT
|
|
CFLAGS += -DQT_GRAPHICS
|
|
QTCXXFLAGS += -Wno-deprecated-declarations
|
|
QTCXXFLAGS += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags)
|
|
QTCXXFLAGS += -fPIC
|
|
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)
|
|
WINSRC += $(WINQTSRC)
|
|
WINOBJ0 += $(WINQTOBJ)
|
|
VARDATND0 += nhtiles.bmp rip.xpm nhsplash.xpm pet_mark.xbm pilemark.xbm
|
|
# XXX if /Developer/qt exists and QTDIR not set, use that
|
|
ifndef QTDIR
|
|
$(error QTDIR not defined in the environment or Makefile)
|
|
endif # QTDIR
|
|
# XXX make sure QTDIR points to something reasonable
|
|
POSTINSTALL+= cp -n sys/unix/sysconf $(INSTDIR)/sysconf; \
|
|
$(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; \
|
|
$(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; \
|
|
chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
|
|
POSTINSTALL+= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; \
|
|
( cd $(INSTDIR); mkfontdir -x .lev );
|
|
endif # !WANT_WIN_QT
|
|
|
|
# prevent duplicate tile.o in WINOBJ
|
|
WINOBJ = $(sort $(WINOBJ0))
|
|
# prevent duplicates in VARDATND if both X11 and Qt are being supported
|
|
VARDATND += $(sort $(VARDATND0))
|
|
|
|
#PREFIX=/usr
|
|
PREFIX=$(wildcard ~)/nh/install
|
|
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
|
SHELLDIR = $(PREFIX)/games
|
|
INSTDIR=$(HACKDIR)
|
|
VARDIR = $(HACKDIR)
|
|
|
|
POSTINSTALL+= cp -n sys/unix/sysconf $(INSTDIR)/sysconf; \
|
|
$(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; \
|
|
$(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; \
|
|
chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
|
|
# gdb may not be installed if clang is chosen compiler so the game
|
|
# won't start in that case due to a sysconf error. Comment out
|
|
# relevant lines in sysconf.
|
|
POSTINSTALL+= sed -i -e 's;^GDBPATH=/usr/bin/gdb;\#GDBPATH=/usr/bin/gdb;' \
|
|
-e 's;PANICTRACE_GDB=1;PANICTRACE_GDB=0;' $(INSTDIR)/sysconf;
|
|
|
|
# when building liblua.a, avoid warning that use of tmpnam() should be
|
|
# replaced by mkstemp(); the lua code doesn't use nethack's config.h so
|
|
# this needs to be passed via make rather than defined in unixconf.h
|
|
SYSCFLAGS=-DLUA_USE_POSIX
|
|
|
|
# Only needed for GLIBC stack trace:
|
|
LFLAGS=-rdynamic
|
|
|
|
# if TTY_TILES_ESCCODES
|
|
#WINSRC += tile.c
|
|
#WINOBJ += tile.o
|
|
|
|
CHOWN=true
|
|
CHGRP=true
|
|
|
|
VARDIRPERM = 0755
|
|
VARFILEPERM = 0600
|
|
GAMEPERM = 0755
|