enable USE_WIN_IOCTL code unless explicitly avoided
Changes to be committed: modified: doc/fixes36.1 modified: include/unixconf.h modified: sys/share/ioctl.c github pull request #19 made reference to resulting code behaviour being better when windows were resized when USE_WIN_IOCTL was defined. The logic for including the necessary enabling code in the build in sys/share/ioctl.c was an explicit "opt-in" strategy, so anything not deliberately and explicitly listed was not able to take advantae of the potentially useful code. The need to add #defines to that list would have been perpetual as new platforms came online, and unnecessarily restrictive for everything else. This switches the logic to include the code by default now, and thus unless there is an explicit "opt-out" by uncommenting AVOID_WIN_IOCTL in include/unixconf.h Some platforms, and we have no way of knowing which ones, may have to ensure that AVOID_WIN_IOCTL is #define'd.
This commit is contained in:
@@ -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 <signal.h>
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user