diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 02bded2af..c282bdc58 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -635,6 +635,8 @@ unix: race condition with parallel make: src/Makefile might start building unix: Makefile.{src,utl} ignored CPPFLAGS which is expanded by the default .c rule by GNU make so if user had a value for that in the environment, it would apply to some files but not others; explicitly override it +unix: enable code guarded by USE_WIN_IOCTL by default unless prevented by + uncommenting #define AVOID_WIN_IOCTL in include/unixconf.h win32gui: getversionstring() was overflowing the provided Help About buffer win32gui: guard against buffer overflow in in mswin_getlin() win32gui: handle menu_color attribute diff --git a/include/unixconf.h b/include/unixconf.h index 88e309d55..cec8c709a 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 unixconf.h $NHDT-Date: 1451342112 2015/12/28 22:35:12 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.25 $ */ +/* NetHack 3.6 unixconf.h $NHDT-Date: 1520099325 2018/03/03 17:48:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.30 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -136,6 +136,8 @@ #define TIMED_DELAY #endif +/* #define AVOID_WIN_IOCTL */ /* ensure USE_WIN_IOCTL remains undefined */ + /* * If you define MAIL, then the player will be notified of new mail * when it arrives. If you also define DEF_MAILREADER then this will diff --git a/sys/share/ioctl.c b/sys/share/ioctl.c index 3da74b81a..138d02b5c 100644 --- a/sys/share/ioctl.c +++ b/sys/share/ioctl.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 ioctl.c $NHDT-Date: 1432512788 2015/05/25 00:13:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.6 ioctl.c $NHDT-Date: 1520099308 2018/03/03 17:48:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.13 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -63,9 +63,12 @@ struct termio termio; #include #endif -#if defined(TIOCGWINSZ) \ - && (defined(BSD) || defined(ULTRIX) || defined(AIX_31) \ - || defined(_BULL_SOURCE) || defined(SVR4)) +/* AVOID_WIN_IOCTL can be uncommented in unixconf.h + * to force USE_WIN_IOTCL to remain undefined, + * instead of the restricted explicit opt-in + * logic that used to be here. + */ +#if defined(TIOCGWINSZ) && !defined(AVOID_WIN_IOCTL) #define USE_WIN_IOCTL #include "tcap.h" /* for LI and CO */ #endif