A number of C compiler suites have a math.h library that includes a yn()
function name that conflicts with NetHack's yn() macro:
"The y0(), y1(), and yn() functions are Bessel functions of the second kind,
for orders 0, 1, and n, respectively. The argument x must be positive. The
argument n should be greater than or equal to zero. If n is less than zero,
there will be a negative exponent in the result."

At one point, isaac64.h included math.h, although that has since been removed.

Some libraries used in NetHack (Qt for one) do include math.h and that required
build work-arounds to avoid the conflict.

Rename the NetHack macro from yn() to y_n() and avoid the math.h conflict
altogether, eliminating the need for that particular work-around.
This commit is contained in:
nhmall
2023-01-12 16:04:40 -05:00
parent 6e136c6f7d
commit ba5356603a
34 changed files with 57 additions and 59 deletions

View File

@@ -99,7 +99,7 @@ attempt_restore:
if (discover)
You("are in non-scoring discovery mode.");
if (discover || wizard) {
if (yn("Do you want to keep the save file?") == 'n')
if (y_n("Do you want to keep the save file?") == 'n')
(void) delete_savefile();
else {
nh_compress(fqname(gs.SAVEF, SAVEPREFIX, 0));