]> git.pld-linux.org Git - packages/nethack.git/commitdiff
f7e16853dd49ac1bb357c42b42d9eba6 patchhack-nh331-5.1.diff.gz
authordepesz <depesz@depesz.pl>
Sat, 9 Mar 2002 10:56:40 +0000 (10:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
226c0d2451b2519ce1b4dfacecf28a61  nethack-ph-pld.patch

Changed files:
    nethack-ph-pld.patch -> 1.1

nethack-ph-pld.patch [new file with mode: 0644]

diff --git a/nethack-ph-pld.patch b/nethack-ph-pld.patch
new file mode 100644 (file)
index 0000000..74f9c0c
--- /dev/null
@@ -0,0 +1,2686 @@
+diff -urN nethack-3.3.1.orig/doc/recover.6 nethack-3.3.1/doc/recover.6
+--- nethack-3.3.1.orig/doc/recover.6   Sat Apr  4 04:17:24 1998
++++ nethack-3.3.1/doc/recover.6        Sat Mar  9 11:34:20 2002
+@@ -4,10 +4,6 @@
+ recover \- recover a NetHack game interrupted by disaster
+ .SH SYNOPSIS
+ .B recover
+-[
+-.B \-d
+-.I directory
+-]
+ .I "base1 base2" ...
+ .SH DESCRIPTION
+ .PP
+@@ -25,14 +21,6 @@
+ which files to process.
+ Each base option specifies recovery of a separate game.
+ .PP
+-The
+-.B \-d
+-option, which must be the first argument if it appears,
+-supplies a directory which is the NetHack playground.
+-It overrides the value from NETHACKDIR, HACKDIR, or the directory
+-specified by the game administrator during compilation
+-(usually /usr/games/lib/nethackdir).
+-.PP
+ For recovery to be possible,
+ .I nethack
+ must have been compiled with the INSURANCE option, and the run-time option
+@@ -61,33 +49,13 @@
+ .I nethack
+ would have used.
+ .PP
+-Since
+-.I recover
+-must be able to read and delete files from the playground
+-and create files in the save directory,
+-it has interesting interactions with game security.
+-Giving ordinary players access to
+-.I recover
+-through setuid or setgid is tantamount to leaving the playground
+-world-writable,
+-with respect to both cheating and messing up other players.
+-For a single-user system, this of course does not change anything,
+-so some of the microcomputer ports install
+-.I recover
+-by default.
+-.PP
+-For a multi-user system,
+-the game administrator may want to arrange for all .0 files in the
+-playground to be fed to recover when the host machine boots,
+-and handle game crashes individually.
+-If the user population is sufficiently trustworthy,
+-.I recover
+-can be installed with the same permissions the
+-.I nethack
+-executable has.
+-In either case,
+ .I recover
+-is easily compiled from the distribution utility directory.
++has been installed under PLD Linux as sgid games. This makes
++it possible for users to recover their own games. The security hazards
++of possible cheating have been removed, by taking out the
++.I -d
++option and making sure the only directory auto-save files can be read
++from is /var/games/nethack.
+ .SH NOTES
+ .PP
+ Like
+diff -urN nethack-3.3.1.orig/include/artilist.h nethack-3.3.1/include/artilist.h
+--- nethack-3.3.1.orig/include/artilist.h      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/artilist.h   Sat Mar  9 11:34:20 2002
+@@ -26,7 +26,7 @@
+ #define     ELEC(a,b) {0,AD_ELEC,a,b}         /* electrical shock */
+ #define     STUN(a,b) {0,AD_STUN,a,b}         /* magical attack */
+-STATIC_OVL NEARDATA struct artifact artilist[] = {
++STATIC_OVL struct artifact artilist[] = {
+ #endif        /* MAKEDEFS_C */
+ /*  dummy element #0, so that all interesting indices are non-zero */
+diff -urN nethack-3.3.1.orig/include/config.h nethack-3.3.1/include/config.h
+--- nethack-3.3.1.orig/include/config.h        Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/config.h     Sat Mar  9 11:34:20 2002
+@@ -35,16 +35,16 @@
+                       /* Hint: if you're not developing code, don't define
+                          ULTRIX_PROTO. */
+-#include "config1.h"  /* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */
++/* #include "config1.h"       */ /* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */
+ /* Windowing systems...
+  * Define all of those you want supported in your binary.
+  * Some combinations make no sense.  See the installation document.
+  */
+-#define TTY_GRAPHICS  /* good old tty based graphics */
++#define TTY_GRAPHICS          /* good old tty based graphics */
+ /* #define X11_GRAPHICS */    /* X11 interface */
+-/* #define QT_GRAPHICS */     /* Qt interface */
++#define QT_GRAPHICS           /* Qt interface */
+ /* #define GNOME_GRAPHICS */  /* Gnome interface */
+ /*
+@@ -110,7 +110,7 @@
+  * would allow:
+  *  xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
+  */
+-/* # define USE_XPM */                /* Disable if you do not have the XPM library */
++# define USE_XPM      /* Disable if you do not have the XPM library */
+ # ifdef USE_XPM
+ #  define GRAPHIC_TOMBSTONE   /* Use graphical tombstone (rip.xpm) */
+ # endif
+@@ -126,15 +126,15 @@
+ #ifndef WIZARD                /* allow for compile-time or Makefile changes */
+ # ifndef KR1ED
+-#  define WIZARD  "wizard" /* the person allowed to use the -D option */
++#  define WIZARD  "root" /* the person allowed to use the -D option */
+ # else
+ #  define WIZARD
+ #  define WIZARD_NAME "wizard"
+ # endif
+ #endif
+-#define LOGFILE "logfile"     /* larger file for debugging purposes */
+-#define NEWS "news"           /* the file containing the latest hack news */
++#define LOGFILE "/var/games/nethack/logfile"  /* larger file for debugging purposes */
++#define NEWS "/var/games/nethack/news"        /* the file containing the latest hack news */
+ /*
+  *    If COMPRESS is defined, it should contain the full path name of your
+@@ -151,8 +151,8 @@
+ #ifdef UNIX
+ /* path and file name extension for compression program */
+-#define COMPRESS "/usr/bin/compress"  /* Lempel-Ziv compression */
+-#define COMPRESS_EXTENSION ".Z"               /* compress's extension */
++#define COMPRESS "/bin/gzip"  /* Lempel-Ziv compression */
++#define COMPRESS_EXTENSION ".gz"              /* compress's extension */
+ /* An example of one alternative you might want to use: */
+ /* #define COMPRESS "/usr/local/bin/gzip" */  /* FSF gzip compression */
+ /* #define COMPRESS_EXTENSION ".gz" */                /* normal gzip extension */
+@@ -167,7 +167,7 @@
+  *    a tar-like file, thus making a neater installation.  See *conf.h
+  *    for detailed configuration.
+  */
+-/* #define DLB */     /* not supported on all platforms */
++#define DLB /* not supported on all platforms */
+ /*
+  *    Defining INSURANCE slows down level changes, but allows games that
+@@ -186,7 +186,7 @@
+  * otherwise it will be the current directory.
+  */
+ # ifndef HACKDIR
+-#  define HACKDIR "/usr/games/lib/nethackdir" /* nethack directory */
++#  define HACKDIR "/usr/share/games/nethack"  /* nethack directory */
+ # endif
+ /*
+@@ -196,7 +196,7 @@
+  * since the user might create files in a directory of his choice.
+  * Of course SECURE is meaningful only if HACKDIR is defined.
+  */
+-/* #define SECURE */  /* do setuid(getuid()) after chdir() */
++#define SECURE /* do setuid(getuid()) after chdir() */
+ /*
+  * If it is desirable to limit the number of people that can play Hack
+@@ -282,7 +282,7 @@
+  * functions that have been macroized.
+  */
+-/* #define VISION_TABLES */ /* use vision tables generated at compile time */
++#define VISION_TABLES  /* use vision tables generated at compile time */
+ #ifndef VISION_TABLES
+ # ifndef NO_MACRO_CPATH
+ #  define MACRO_CPATH /* use clear_path macros instead of functions */
+@@ -320,7 +320,7 @@
+ #endif
+ #define EXP_ON_BOTL   /* Show experience on bottom line */
+-/* #define SCORE_ON_BOTL */   /* added by Gary Erickson (erickson@ucivax) */
++#define SCORE_ON_BOTL /* added by Gary Erickson (erickson@ucivax) */
+ /*
+  * Section 5: MORE FUN STUFF!!!
+diff -urN nethack-3.3.1.orig/include/config1.h nethack-3.3.1/include/config1.h
+--- nethack-3.3.1.orig/include/config1.h       Mon Dec  6 22:22:04 1999
++++ nethack-3.3.1/include/config1.h    Sat Mar  9 11:34:20 2002
+@@ -71,13 +71,12 @@
+ # endif
+ #endif
+ #ifdef __SASC_60
+-# define NEARDATA __near /* put some data close */
++# define __near /* put some data close */
+ #else
+ # ifdef _DCC
+-# define NEARDATA __near /* put some data close */
++# define __near /* put some data close */
+ # else
+-# define NEARDATA
+-# endif
++# define # endif
+ #endif
+ #ifdef AMIGA
+ # define NEED_VARARGS
+diff -urN nethack-3.3.1.orig/include/decl.h nethack-3.3.1/include/decl.h
+--- nethack-3.3.1.orig/include/decl.h  Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/decl.h       Sat Mar  9 11:38:07 2002
+@@ -24,13 +24,13 @@
+ E char SAVEP[];
+ #endif
+-E NEARDATA int bases[MAXOCLASSES];
++E int bases[MAXOCLASSES];
+-E NEARDATA int multi;
+-E NEARDATA int warnlevel;
+-E NEARDATA int nroom;
+-E NEARDATA int nsubroom;
+-E NEARDATA int occtime;
++E int multi;
++E int warnlevel;
++E int nroom;
++E int nsubroom;
++E int occtime;
+ #define WARNCOUNT 6                   /* number of different warning levels */
+ E uchar warnsyms[WARNCOUNT];
+@@ -39,7 +39,7 @@
+ E int otg_temp;
+ #ifdef REDO
+-E NEARDATA int in_doagain;
++E int in_doagain;
+ #endif
+ E struct dgn_topology {               /* special dungeon levels for speed */
+@@ -117,43 +117,43 @@
+ #define nemesis_level         (dungeon_topology.d_nemesis_level)
+ #define knox_level            (dungeon_topology.d_knox_level)
+-E NEARDATA stairway dnstair, upstair;         /* stairs up and down */
++E stairway dnstair, upstair;          /* stairs up and down */
+ #define xdnstair      (dnstair.sx)
+ #define ydnstair      (dnstair.sy)
+ #define xupstair      (upstair.sx)
+ #define yupstair      (upstair.sy)
+-E NEARDATA stairway dnladder, upladder;               /* ladders up and down */
++E stairway dnladder, upladder;                /* ladders up and down */
+ #define xdnladder     (dnladder.sx)
+ #define ydnladder     (dnladder.sy)
+ #define xupladder     (upladder.sx)
+ #define yupladder     (upladder.sy)
+-E NEARDATA stairway sstairs;
++E stairway sstairs;
+-E NEARDATA dest_area updest, dndest;  /* level-change destination areas */
++E dest_area updest, dndest;   /* level-change destination areas */
+-E NEARDATA coord inv_pos;
+-E NEARDATA dungeon dungeons[];
+-E NEARDATA s_level *sp_levchn;
++E coord inv_pos;
++E dungeon dungeons[];
++E s_level *sp_levchn;
+ #define dunlev_reached(x)     (dungeons[(x)->dnum].dunlev_ureached)
+ #include "quest.h"
+ E struct q_score quest_status;
+-E NEARDATA char pl_character[PL_CSIZ];
+-E NEARDATA char pl_race;              /* character's race */
++E char pl_character[PL_CSIZ];
++E char pl_race;               /* character's race */
+-E NEARDATA char pl_fruit[PL_FSIZ];
+-E NEARDATA int current_fruit;
+-E NEARDATA struct fruit *ffruit;
++E char pl_fruit[PL_FSIZ];
++E int current_fruit;
++E struct fruit *ffruit;
+-E NEARDATA char tune[6];
++E char tune[6];
+ #define MAXLINFO (MAXDUNGEON * MAXLEVEL)
+ E struct linfo level_info[MAXLINFO];
+-E NEARDATA struct sinfo {
++E struct sinfo {
+       int gameover;           /* self explanatory? */
+       int stopprint;          /* inhibit further end of game disclosure */
+ #if defined(UNIX) || defined(VMS) || defined (__EMX__)
+@@ -175,25 +175,25 @@
+ E const char ynqchars[];
+ E const char ynaqchars[];
+ E const char ynNaqchars[];
+-E NEARDATA long yn_number;
+-E NEARDATA int smeq[];
+-E NEARDATA int doorindex;
+-E NEARDATA char *save_cm;
++E long yn_number;
++E int smeq[];
++E int doorindex;
++E char *save_cm;
+ #define KILLED_BY_AN   0
+ #define KILLED_BY      1
+ #define NO_KILLER_PREFIX 2
+-E NEARDATA int killer_format;
++E int killer_format;
+ E const char *killer;
+ E const char *delayed_killer;
+ E char killer_buf[BUFSZ];
+ E const char *configfile;
+-E NEARDATA char plname[PL_NSIZ];
+-E NEARDATA char dogname[];
++E char plname[PL_NSIZ];
++E char dogname[];
+ #ifdef DUMP_CHARACTER
+-E NEARDATA char dump_fn[];
++E char dump_fn[];
+ #endif /* DUMP_CHARACTER */
+-E NEARDATA char catname[];
+-E NEARDATA char horsename[];
++E char catname[];
++E char horsename[];
+ E char preferred_pet;
+ E const char *occtxt;                 /* defined when occupation != NULL */
+ E const char *nomovemsg;
+@@ -202,7 +202,7 @@
+ #ifdef STORY_LOG
+ /* JDS: buffer for the story/diary/log */
+-extern NEARDATA char* story_buffer;
++extern char* story_buffer;
+ #endif /* STORY_LOG */
+ #ifndef KEY_REBINDING
+@@ -234,30 +234,30 @@
+ E char misc_cmds[];                   /* other special keyboard commands */
+ #endif /* KEY_REBINDING */
+-E NEARDATA schar tbx, tby;            /* set in mthrowu.c */
++E schar tbx, tby;             /* set in mthrowu.c */
+-E NEARDATA struct dig_info {          /* apply.c, hack.c */
++E struct dig_info {           /* apply.c, hack.c */
+       int     effort;
+       d_level level;
+       coord   pos;
+       boolean down, chew;
+ } digging;
+-E NEARDATA long moves, monstermoves;
+-E NEARDATA long wailmsg;
++E long moves, monstermoves;
++E long wailmsg;
+-E NEARDATA boolean in_mklev;
+-E NEARDATA boolean stoned;
+-E NEARDATA boolean unweapon;
+-E NEARDATA boolean mrg_to_wielded;
+-E NEARDATA struct obj *current_wand;
++E boolean in_mklev;
++E boolean stoned;
++E boolean unweapon;
++E boolean mrg_to_wielded;
++E struct obj *current_wand;
+-E NEARDATA boolean in_steed_dismounting;
++E boolean in_steed_dismounting;
+ E const int shield_static[];
+ #include "spell.h"
+-E NEARDATA struct spell spl_book[];   /* sized in decl.c */
++E struct spell spl_book[];    /* sized in decl.c */
+ #ifdef TEXTCOLOR
+ #include "color.h"
+@@ -270,7 +270,7 @@
+ E uchar monsyms[MAXMCLASSES];         /* current class symbols */
+ #include "obj.h"
+-E NEARDATA struct obj *invent,
++E struct obj *invent,
+       *uarm, *uarmc, *uarmh, *uarms, *uarmg, *uarmf,
+ #ifdef TOURIST
+       *uarmu,                         /* under-wear, so to speak */
+@@ -278,34 +278,34 @@
+       *uskin, *uamul, *uleft, *uright, *ublindf,
+       *uwep, *uswapwep, *uquiver;
+-E NEARDATA struct obj *uchain;                /* defined only when punished */
+-E NEARDATA struct obj *uball;
+-E NEARDATA struct obj *migrating_objs;
+-E NEARDATA struct obj *billobjs;
+-E NEARDATA struct obj zeroobj;                /* init'd and defined in decl.c */
++E struct obj *uchain;         /* defined only when punished */
++E struct obj *uball;
++E struct obj *migrating_objs;
++E struct obj *billobjs;
++E struct obj zeroobj;         /* init'd and defined in decl.c */
+ E const char *he[3];
+ E const char *him[3];
+ E const char *his[3];
+ #include "you.h"
+-E NEARDATA struct you u;
++E struct you u;
+ #include "onames.h"
+ #ifndef PM_H          /* (pm.h has already been included via youprop.h) */
+ #include "pm.h"
+ #endif
+-E NEARDATA struct monst youmonst;     /* init'd and defined in decl.c */
+-E NEARDATA struct monst *mydogs, *migrating_mons;
++E struct monst youmonst;      /* init'd and defined in decl.c */
++E struct monst *mydogs, *migrating_mons;
+-E NEARDATA struct mvitals {
++E struct mvitals {
+       uchar   born;
+       uchar   died;
+       uchar   mvflags;
+ } mvitals[NUMMONS];
+-E NEARDATA struct c_color_names {
++E struct c_color_names {
+     const char        *const c_black, *const c_amber, *const c_golden,
+               *const c_light_blue,*const c_red, *const c_green,
+               *const c_silver, *const c_blue, *const c_purple,
+@@ -355,12 +355,12 @@
+ #define EXACT_NAME            0x0F
+ /* Vision */
+-E NEARDATA boolean vision_full_recalc;        /* TRUE if need vision recalc */
+-E NEARDATA char **viz_array;          /* could see/in sight row pointers */
++E boolean vision_full_recalc; /* TRUE if need vision recalc */
++E char **viz_array;           /* could see/in sight row pointers */
+ /* Window system stuff */
+-E NEARDATA winid WIN_MESSAGE, WIN_STATUS;
+-E NEARDATA winid WIN_MAP, WIN_INVEN;
++E winid WIN_MESSAGE, WIN_STATUS;
++E winid WIN_MAP, WIN_INVEN;
+ E char toplines[];
+ #ifndef TCAP_H
+ E struct tc_gbl_data {        /* also declared in tcap.h */
+diff -urN nethack-3.3.1.orig/include/flag.h nethack-3.3.1/include/flag.h
+--- nethack-3.3.1.orig/include/flag.h  Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/flag.h       Sat Mar  9 11:34:20 2002
+@@ -247,7 +247,7 @@
+ #endif
+ };
+-extern NEARDATA struct flag flags;
+-extern NEARDATA struct instance_flags iflags;
++extern struct flag flags;
++extern struct instance_flags iflags;
+ #endif /* FLAG_H */
+diff -urN nethack-3.3.1.orig/include/global.h nethack-3.3.1/include/global.h
+--- nethack-3.3.1.orig/include/global.h        Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/global.h     Sat Mar  9 11:34:20 2002
+@@ -14,7 +14,7 @@
+  * Files expected to exist in the playground directory.
+  */
+-#define RECORD              "record"  /* file containing list of topscorers */
++#define RECORD              "/var/games/nethack/record"       /* file containing list of topscorers */
+ #define HELP        "help"    /* file containing command descriptions */
+ #define SHELP       "hh"      /* abbreviated form of the same */
+ #define DEBUGHELP     "wizhelp" /* file containing debug mode cmds */
+diff -urN nethack-3.3.1.orig/include/hack.h nethack-3.3.1/include/hack.h
+--- nethack-3.3.1.orig/include/hack.h  Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/hack.h       Sat Mar  9 11:34:20 2002
+@@ -78,7 +78,7 @@
+ #include "decl.h"
+ #include "timeout.h"
+-NEARDATA extern coord bhitpos;        /* place where throw or zap hits or stops */
++extern coord bhitpos; /* place where throw or zap hits or stops */
+ /* types of calls to bhit() */
+ #define ZAPPED_WAND   0
+diff -urN nethack-3.3.1.orig/include/mkroom.h nethack-3.3.1/include/mkroom.h
+--- nethack-3.3.1.orig/include/mkroom.h        Wed Jul  7 06:16:33 1999
++++ nethack-3.3.1/include/mkroom.h     Sat Mar  9 11:34:20 2002
+@@ -34,8 +34,8 @@
+       const char **shknms;    /* list of shopkeeper names for this type */
+ };
+-extern NEARDATA struct mkroom rooms[(MAXNROFROOMS+1)*2];
+-extern NEARDATA struct mkroom* subrooms;
++extern struct mkroom rooms[(MAXNROFROOMS+1)*2];
++extern struct mkroom* subrooms;
+ /* the normal rooms on the current level are described in rooms[0..n] for
+  * some n<MAXNROFROOMS
+  * the vault, if any, is described by rooms[n+1]
+@@ -45,7 +45,7 @@
+ extern struct mkroom *dnstairs_room, *upstairs_room, *sstairs_room;
+-extern NEARDATA coord doors[DOORMAX];
++extern coord doors[DOORMAX];
+ /* values for rtype in the room definition structure */
+ #define OROOM          0      /* ordinary room */
+diff -urN nethack-3.3.1.orig/include/objclass.h nethack-3.3.1/include/objclass.h
+--- nethack-3.3.1.orig/include/objclass.h      Mon Dec  6 22:22:37 1999
++++ nethack-3.3.1/include/objclass.h   Sat Mar  9 11:34:20 2002
+@@ -115,8 +115,8 @@
+       const char *oc_descr;           /* description when name unknown */
+ };
+-extern NEARDATA struct objclass objects[];
+-extern NEARDATA struct objdescr obj_descr[];
++extern struct objclass objects[];
++extern struct objdescr obj_descr[];
+ /*
+  * All objects have a class. Make sure that all classes have a corresponding
+diff -urN nethack-3.3.1.orig/include/patchlevel.h nethack-3.3.1/include/patchlevel.h
+--- nethack-3.3.1.orig/include/patchlevel.h    Thu Aug 10 02:20:03 2000
++++ nethack-3.3.1/include/patchlevel.h Sat Mar  9 11:34:20 2002
+@@ -232,7 +232,7 @@
+  *  refine the overlay manager, rearrange the OVLx breakdown for better
+  *    efficiency, rename the overlay macros, and split off the overlay
+  *    instructions to Install.ovl
+- *  introduce NEARDATA for better Amiga efficiency
++ *  introduce for better Amiga efficiency
+  *  support for more VMS versions (courtesy Joshua Delahunty and Pat Rankin)
+  *  more const fixes
+  *  better support for common graphics (DEC VT and IBM)
+diff -urN nethack-3.3.1.orig/include/permonst.h nethack-3.3.1/include/permonst.h
+--- nethack-3.3.1.orig/include/permonst.h      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/permonst.h   Sat Mar  9 11:34:20 2002
+@@ -63,7 +63,7 @@
+ # endif
+ };
+-extern NEARDATA struct permonst
++extern struct permonst
+               mons[];         /* the master list of monster types */
+ #define VERY_SLOW 3
+diff -urN nethack-3.3.1.orig/include/system.h nethack-3.3.1/include/system.h
+--- nethack-3.3.1.orig/include/system.h        Thu Jan  6 20:20:08 2000
++++ nethack-3.3.1/include/system.h     Sat Mar  9 11:34:20 2002
+@@ -291,6 +291,9 @@
+ /* The POSIX string.h is required to define all the mem* and str* functions */
+ #include <string.h>
+ #else
++
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
++#else
+ #if defined(SYSV) || defined(VMS) || defined(MAC) || defined(SUNOS4)
+ # if defined(NHSTDC) || (defined(VMS) && !defined(ANCIENT_VAXC))
+ #  if !defined(_AIX32) && !(defined(SUNOS4) && defined(__STDC__))
+@@ -317,6 +320,7 @@
+ E void *FDECL(memset, (char*,int,int));
+ # endif
+ #endif
++#endif
+ #endif /* POSIX_TYPES */
+ #if defined(MICRO) && !defined(LATTICE)
+diff -urN nethack-3.3.1.orig/include/tcap.h nethack-3.3.1/include/tcap.h
+--- nethack-3.3.1.orig/include/tcap.h  Sun Dec 19 04:55:37 1999
++++ nethack-3.3.1/include/tcap.h       Sat Mar  9 11:34:20 2002
+@@ -50,7 +50,7 @@
+ # ifdef TOS
+ extern const char *hilites[CLR_MAX];
+ # else
+-extern NEARDATA char *hilites[CLR_MAX];
++extern char *hilites[CLR_MAX];
+ # endif
+ #endif
+diff -urN nethack-3.3.1.orig/include/unixconf.h nethack-3.3.1/include/unixconf.h
+--- nethack-3.3.1.orig/include/unixconf.h      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/unixconf.h   Sat Mar  9 11:34:20 2002
+@@ -37,7 +37,7 @@
+ #define NETWORK               /* if running on a networked system */
+                       /* e.g. Suns sharing a playground through NFS */
+ /* #define SUNOS4 */  /* SunOS 4.x */
+-/* #define LINUX */   /* Another Unix clone */
++#define LINUX         /* Another Unix clone */
+ /* #define CYGWIN32 */        /* Unix on Win32 -- use with case sensitive defines */
+ /* #define GENIX */   /* Yet Another Unix Clone */
+ /* #define HISX */    /* Bull Unix for XPS Machines */
+@@ -96,7 +96,7 @@
+  */
+ /* #define NO_FILE_LINKS */   /* if no hard links */
+-/* #define LOCKDIR "/usr/games/lib/nethackdir" */     /* where to put locks */
++#define LOCKDIR "/var/games/nethack" /* where to put locks */
+ /*
+  * If you want the static parts of your playground on a read-only file
+@@ -132,7 +132,7 @@
+  * "extra output" method is used, but not all systems provide access to
+  * a fine-grained timer.
+  */
+-/* #define TIMED_DELAY */     /* usleep() */
++#define TIMED_DELAY /* usleep() */
+ #endif
+ /*
+@@ -181,7 +181,7 @@
+ #   ifdef __sgi
+ #define DEF_MAILREADER        "/usr/sbin/Mail"
+ #   else
+-#define DEF_MAILREADER        "/usr/bin/mailx"
++#define DEF_MAILREADER        "/usr/bin/Mail"
+ #   endif
+ #  endif
+ # else
+@@ -259,7 +259,7 @@
+ #include <time.h>
+ #endif
+-#define HLOCK "perm"  /* an empty file used for locking purposes */
++#define HLOCK "/var/games/nethack/perm"       /* an empty file used for locking purposes */
+ #ifndef KEY_REBINDING
+ #ifndef REDO
+diff -urN nethack-3.3.1.orig/include/winprocs.h nethack-3.3.1/include/winprocs.h
+--- nethack-3.3.1.orig/include/winprocs.h      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/include/winprocs.h   Sat Mar  9 11:34:20 2002
+@@ -64,7 +64,7 @@
+     void FDECL((*win_outrip), (winid,int));
+ };
+-extern NEARDATA struct window_procs windowprocs;
++extern struct window_procs windowprocs;
+ /*
+  * If you wish to only support one window system and not use procedure
+diff -urN nethack-3.3.1.orig/src/apply.c nethack-3.3.1/src/apply.c
+--- nethack-3.3.1.orig/src/apply.c     Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/apply.c  Sat Mar  9 11:34:20 2002
+@@ -1128,7 +1128,7 @@
+           begin_burn(obj, FALSE);
+ }
+-static NEARDATA const char cuddly[] = { TOOL_CLASS, 0 };
++static const char cuddly[] = { TOOL_CLASS, 0 };
+ int
+ dorub()
+@@ -1689,8 +1689,8 @@
+       useup(obj);
+ }
+-static NEARDATA const char lubricables[] = { ALL_CLASSES, ALLOW_NONE, 0 };
+-static NEARDATA const char need_to_remove_outer_armor[] =
++static const char lubricables[] = { ALL_CLASSES, ALLOW_NONE, 0 };
++static const char need_to_remove_outer_armor[] =
+                       "need to remove your %s to grease your %s.";
+ STATIC_OVL void
+diff -urN nethack-3.3.1.orig/src/artifact.c nethack-3.3.1/src/artifact.c
+--- nethack-3.3.1.orig/src/artifact.c  Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/artifact.c       Sat Mar  9 11:34:20 2002
+@@ -1107,8 +1107,8 @@
+       return FALSE;
+ }
+-static NEARDATA const char recharge_type[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
+-static NEARDATA const char invoke_types[] = { ALL_CLASSES, 0 };
++static const char recharge_type[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
++static const char invoke_types[] = { ALL_CLASSES, 0 };
+               /* #invoke: an "ugly check" filters out most objects */
+ int
+diff -urN nethack-3.3.1.orig/src/botl.c nethack-3.3.1/src/botl.c
+--- nethack-3.3.1.orig/src/botl.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/botl.c   Sat Mar  9 11:34:20 2002
+@@ -37,7 +37,7 @@
+ #ifndef OVLB
+ STATIC_DCL int mrank_sz;
+ #else /* OVLB */
+-STATIC_OVL NEARDATA int mrank_sz = 0; /* loaded by max_rank_sz (from u_init) */
++STATIC_OVL int mrank_sz = 0; /* loaded by max_rank_sz (from u_init) */
+ #endif /* OVLB */
+ STATIC_DCL const char *NDECL(rank);
+diff -urN nethack-3.3.1.orig/src/cmd.c nethack-3.3.1/src/cmd.c
+--- nethack-3.3.1.orig/src/cmd.c       Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/cmd.c    Sat Mar  9 11:34:20 2002
+@@ -243,7 +243,7 @@
+  */
+ #define BSIZE 20
+ static char pushq[BSIZE], saveq[BSIZE];
+-static NEARDATA int phead, ptail, shead, stail;
++static int phead, ptail, shead, stail;
+ static char
+ popch() {
+@@ -4381,7 +4381,7 @@
+       return x >= 1 && x <= COLNO-1 && y >= 0 && y <= ROWNO-1;
+ }
+-static NEARDATA int last_multi;
++static int last_multi;
+ /*
+  * convert a MAP window position into a movecmd
+diff -urN nethack-3.3.1.orig/src/dbridge.c nethack-3.3.1/src/dbridge.c
+--- nethack-3.3.1.orig/src/dbridge.c   Mon Jul  3 19:33:10 2000
++++ nethack-3.3.1/src/dbridge.c        Sat Mar  9 11:34:20 2002
+@@ -232,7 +232,7 @@
+ #define ENTITIES 2
+-static NEARDATA struct entity occupants[ENTITIES];
++static struct entity occupants[ENTITIES];
+ STATIC_OVL
+ struct entity *
+diff -urN nethack-3.3.1.orig/src/decl.c nethack-3.3.1/src/decl.c
+--- nethack-3.3.1.orig/src/decl.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/decl.c   Sat Mar  9 11:39:45 2002
+@@ -17,19 +17,19 @@
+ char *catmore = 0;            /* default pager */
+ #endif
+-NEARDATA int bases[MAXOCLASSES] = DUMMY;
++int bases[MAXOCLASSES] = DUMMY;
+-NEARDATA int multi = 0;
+-NEARDATA int warnlevel = 0;           /* used by movemon and dochugw */
+-NEARDATA int nroom = 0;
+-NEARDATA int nsubroom = 0;
+-NEARDATA int occtime = 0;
++int multi = 0;
++int warnlevel = 0;            /* used by movemon and dochugw */
++int nroom = 0;
++int nsubroom = 0;
++int occtime = 0;
+ int x_maze_max, y_maze_max;   /* initialized in main, used in mkmaze.c */
+ int otg_temp;                 /* used by object_to_glyph() [otg] */
+ #ifdef REDO
+-NEARDATA int in_doagain = 0;
++int in_doagain = 0;
+ #endif
+ /*
+@@ -41,25 +41,25 @@
+ #include "quest.h"
+ struct q_score        quest_status = DUMMY;
+-NEARDATA int smeq[MAXNROFROOMS+1] = DUMMY;
+-NEARDATA int doorindex = 0;
++int smeq[MAXNROFROOMS+1] = DUMMY;
++int doorindex = 0;
+-NEARDATA char *save_cm = 0;
+-NEARDATA int killer_format = 0;
++char *save_cm = 0;
++int killer_format = 0;
+ const char *killer = 0;
+ const char *delayed_killer = 0;
+ char killer_buf[BUFSZ] = DUMMY;
+ const char *nomovemsg = 0;
+ const char nul[40] = DUMMY;                   /* contains zeros */
+-NEARDATA char plname[PL_NSIZ] = DUMMY;                /* player name */
+-NEARDATA char pl_character[PL_CSIZ] = DUMMY;
+-NEARDATA char pl_race = '\0';
+-
+-NEARDATA char pl_fruit[PL_FSIZ] = DUMMY;
+-NEARDATA int current_fruit = 0;
+-NEARDATA struct fruit *ffruit = (struct fruit *)0;
++char plname[PL_NSIZ] = DUMMY;         /* player name */
++char pl_character[PL_CSIZ] = DUMMY;
++char pl_race = '\0';
++
++char pl_fruit[PL_FSIZ] = DUMMY;
++int current_fruit = 0;
++struct fruit *ffruit = (struct fruit *)0;
+-NEARDATA char tune[6] = DUMMY;
++char tune[6] = DUMMY;
+ const char *occtxt = DUMMY;
+ const char quitchars[] = " \r\n\033";
+@@ -68,11 +68,11 @@
+ const char ynqchars[] = "ynq";
+ const char ynaqchars[] = "ynaq";
+ const char ynNaqchars[] = "yn#aq";
+-NEARDATA long yn_number = 0L;
++long yn_number = 0L;
+ #ifdef STORY_LOG
+ /* JDS: buffer for the story/diary/log */
+-NEARDATA char* story_buffer = NULL;
++char* story_buffer = NULL;
+ #endif /* STORY_LOG */
+ #ifdef MICRO
+@@ -91,7 +91,7 @@
+ struct linfo level_info[MAXLINFO];
+-NEARDATA struct sinfo program_state;
++struct sinfo program_state;
+ /* 'rogue'-like direction commands (cmd.c) */
+ #ifndef KEY_REBINDING
+@@ -113,43 +113,43 @@
+ const schar ydir[10] = {  0,-1,-1,-1, 0, 1, 1, 1, 0, 0 };
+ const schar zdir[10] = {  0, 0, 0, 0, 0, 0, 0, 0, 1,-1 };
+-NEARDATA schar tbx = 0, tby = 0;      /* mthrowu: target */
++schar tbx = 0, tby = 0;       /* mthrowu: target */
+-NEARDATA struct dig_info digging;
++struct dig_info digging;
+-NEARDATA dungeon dungeons[MAXDUNGEON];        /* ini'ed by init_dungeon() */
+-NEARDATA s_level *sp_levchn;
+-NEARDATA stairway upstair = { 0, 0 }, dnstair = { 0, 0 };
+-NEARDATA stairway upladder = { 0, 0 }, dnladder = { 0, 0 };
+-NEARDATA stairway sstairs = { 0, 0 };
+-NEARDATA dest_area updest = { 0, 0, 0, 0, 0, 0, 0, 0 };
+-NEARDATA dest_area dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
+-NEARDATA coord inv_pos = { 0, 0 };
+-
+-NEARDATA boolean in_mklev = FALSE;
+-NEARDATA boolean stoned = FALSE;      /* done to monsters hit by 'c' */
+-NEARDATA boolean unweapon = FALSE;
+-NEARDATA boolean mrg_to_wielded = FALSE;
++dungeon dungeons[MAXDUNGEON]; /* ini'ed by init_dungeon() */
++s_level *sp_levchn;
++stairway upstair = { 0, 0 }, dnstair = { 0, 0 };
++stairway upladder = { 0, 0 }, dnladder = { 0, 0 };
++stairway sstairs = { 0, 0 };
++dest_area updest = { 0, 0, 0, 0, 0, 0, 0, 0 };
++dest_area dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
++coord inv_pos = { 0, 0 };
++
++boolean in_mklev = FALSE;
++boolean stoned = FALSE;       /* done to monsters hit by 'c' */
++boolean unweapon = FALSE;
++boolean mrg_to_wielded = FALSE;
+                        /* weapon picked is merged with wielded one */
+-NEARDATA struct obj *current_wand = 0;        /* wand currently zapped/applied */
++struct obj *current_wand = 0; /* wand currently zapped/applied */
+-NEARDATA boolean in_steed_dismounting = FALSE;
++boolean in_steed_dismounting = FALSE;
+-NEARDATA coord bhitpos = DUMMY;
+-NEARDATA coord doors[DOORMAX] = {DUMMY};
++coord bhitpos = DUMMY;
++coord doors[DOORMAX] = {DUMMY};
+-NEARDATA struct mkroom rooms[(MAXNROFROOMS+1)*2] = {DUMMY};
+-NEARDATA struct mkroom* subrooms = &rooms[MAXNROFROOMS+1];
++struct mkroom rooms[(MAXNROFROOMS+1)*2] = {DUMMY};
++struct mkroom* subrooms = &rooms[MAXNROFROOMS+1];
+ struct mkroom *upstairs_room, *dnstairs_room, *sstairs_room;
+ dlevel_t level;               /* level map */
+ struct trap *ftrap = (struct trap *)0;
+-NEARDATA struct monst youmonst = DUMMY;
+-NEARDATA struct flag flags = DUMMY;
+-NEARDATA struct instance_flags iflags = DUMMY;
+-NEARDATA struct you u = DUMMY;
++struct monst youmonst = DUMMY;
++struct flag flags = DUMMY;
++struct instance_flags iflags = DUMMY;
++struct you u = DUMMY;
+-NEARDATA struct obj *invent = (struct obj *)0,
++struct obj *invent = (struct obj *)0,
+       *uwep = (struct obj *)0, *uarm = (struct obj *)0,
+       *uswapwep = (struct obj *)0,
+       *uquiver = (struct obj *)0, /* quiver */
+@@ -188,19 +188,19 @@
+     S_ss1, S_ss2, S_ss3, S_ss2, S_ss1, S_ss2, S_ss4,
+ };
+-NEARDATA struct spell spl_book[MAXSPELL + 1] = {DUMMY};
++struct spell spl_book[MAXSPELL + 1] = {DUMMY};
+-NEARDATA long moves = 1L, monstermoves = 1L;
++long moves = 1L, monstermoves = 1L;
+        /* These diverge when player is Fast */
+-NEARDATA long wailmsg = 0L;
++long wailmsg = 0L;
+ /* objects that are moving to another dungeon level */
+-NEARDATA struct obj *migrating_objs = (struct obj *)0;
++struct obj *migrating_objs = (struct obj *)0;
+ /* objects not yet paid for */
+-NEARDATA struct obj *billobjs = (struct obj *)0;
++struct obj *billobjs = (struct obj *)0;
+ /* used to zero all elements of a struct obj */
+-NEARDATA struct obj zeroobj = DUMMY;
++struct obj zeroobj = DUMMY;
+ /* monster pronouns, index is return value of gender(mtmp) */
+ const char *he[3]  = { "he",  "she", "it" };
+@@ -209,26 +209,26 @@
+ #ifdef DUMP_CHARACTER
+ /* originally from end.c */
+-NEARDATA char dump_fn[PL_PSIZ] = DUMMY;
++char dump_fn[PL_PSIZ] = DUMMY;
+ #endif /* DUMP_CHARACTER */
+ /* originally from dog.c */
+-NEARDATA char dogname[PL_PSIZ] = DUMMY;
+-NEARDATA char catname[PL_PSIZ] = DUMMY;
+-NEARDATA char horsename[PL_PSIZ] = DUMMY;
++char dogname[PL_PSIZ] = DUMMY;
++char catname[PL_PSIZ] = DUMMY;
++char horsename[PL_PSIZ] = DUMMY;
+ #ifndef NO_PET_OPTION
+ char preferred_pet;   /* '\0', 'c', 'd' */
+ #else
+ char preferred_pet;    /* '\0', 'c', 'd', 'n' (none) */
+ #endif /* NO_PET_OPTION */
+ /* monsters that went down/up together with @ */
+-NEARDATA struct monst *mydogs = (struct monst *)0;
++struct monst *mydogs = (struct monst *)0;
+ /* monsters that are moving to another dungeon level */
+-NEARDATA struct monst *migrating_mons = (struct monst *)0;
++struct monst *migrating_mons = (struct monst *)0;
+-NEARDATA struct mvitals mvitals[NUMMONS];
++struct mvitals mvitals[NUMMONS];
+-NEARDATA struct c_color_names c_color_names = {
++struct c_color_names c_color_names = {
+       "black", "amber", "golden",
+       "light blue", "red", "green",
+       "silver", "blue", "purple",
+@@ -251,12 +251,12 @@
+ };
+ /* Vision */
+-NEARDATA boolean vision_full_recalc = 0;
+-NEARDATA char  **viz_array = 0;/* used in cansee() and couldsee() macros */
++boolean vision_full_recalc = 0;
++char   **viz_array = 0;/* used in cansee() and couldsee() macros */
+ /* Global windowing data, defined here for multi-window-system support */
+-NEARDATA winid WIN_MESSAGE = WIN_ERR, WIN_STATUS = WIN_ERR;
+-NEARDATA winid WIN_MAP = WIN_ERR, WIN_INVEN = WIN_ERR;
++winid WIN_MESSAGE = WIN_ERR, WIN_STATUS = WIN_ERR;
++winid WIN_MAP = WIN_ERR, WIN_INVEN = WIN_ERR;
+ char toplines[TBUFSZ];
+ /* Windowing stuff that's really tty oriented, but present for all ports */
+ struct tc_gbl_data tc_gbl_data = { 0,0, 0,0 };        /* AS,AE, LI,CO */
+diff -urN nethack-3.3.1.orig/src/dig.c nethack-3.3.1/src/dig.c
+--- nethack-3.3.1.orig/src/dig.c       Mon Jul 17 02:16:27 2000
++++ nethack-3.3.1/src/dig.c    Sat Mar  9 11:34:20 2002
+@@ -8,7 +8,7 @@
+ #ifdef OVLB
+-static NEARDATA boolean did_dig_msg;
++static boolean did_dig_msg;
+ STATIC_DCL boolean NDECL(rm_waslit);
+ STATIC_DCL void FDECL(mkcavepos, (XCHAR_P,XCHAR_P,int,BOOLEAN_P,BOOLEAN_P));
+diff -urN nethack-3.3.1.orig/src/do.c nethack-3.3.1/src/do.c
+--- nethack-3.3.1.orig/src/do.c        Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/do.c     Sat Mar  9 11:34:20 2002
+@@ -44,7 +44,7 @@
+ #ifdef OVLB
+-static NEARDATA const char drop_types[] =
++static const char drop_types[] =
+       { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, 0 };
+ /* 'd' command: drop one inventory item */
+@@ -667,7 +667,7 @@
+ #ifdef OVL2
+ /* on a ladder, used in goto_level */
+-static NEARDATA boolean at_ladder = FALSE;
++static boolean at_ladder = FALSE;
+ int
+ dodown()
+@@ -1490,7 +1490,7 @@
+ dowipe()
+ {
+       if(u.ucreamed)  {
+-              static NEARDATA char buf[39];
++              static char buf[39];
+               Sprintf(buf, "wiping off your %s", body_part(FACE));
+               set_occupation(wipeoff, buf, 0);
+diff -urN nethack-3.3.1.orig/src/do_name.c nethack-3.3.1/src/do_name.c
+--- nethack-3.3.1.orig/src/do_name.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/do_name.c        Sat Mar  9 11:34:20 2002
+@@ -429,7 +429,7 @@
+       return obj;
+ }
+-static NEARDATA const char callable[] = {
++static const char callable[] = {
+       SCROLL_CLASS, POTION_CLASS, WAND_CLASS, RING_CLASS, AMULET_CLASS,
+       GEM_CLASS, SPBOOK_CLASS, ARMOR_CLASS, TOOL_CLASS, 0 };
+@@ -1002,7 +1002,7 @@
+ const char *str;
+ const char *pronoun;
+ {
+-      static NEARDATA char buf[BUFSZ];
++      static char buf[BUFSZ];
+       register int i;
+       for(i=0; pronoun_pairs[i][0]; i++) {
+@@ -1039,7 +1039,7 @@
+ #ifdef OVL2
+-static NEARDATA const char *hcolors[] = {
++static const char *hcolors[] = {
+       "ultraviolet", "infrared", "bluish-orange",
+       "reddish-green", "dark white", "light black", "sky blue-pink",
+       "salty", "sweet", "sour", "bitter",
+diff -urN nethack-3.3.1.orig/src/do_wear.c nethack-3.3.1/src/do_wear.c
+--- nethack-3.3.1.orig/src/do_wear.c   Thu Aug  3 21:44:47 2000
++++ nethack-3.3.1/src/do_wear.c        Sat Mar  9 11:34:20 2002
+@@ -10,13 +10,13 @@
+ #else /* OVLB */
+-STATIC_OVL NEARDATA long takeoff_mask = 0L, taking_off = 0L;
++STATIC_OVL long takeoff_mask = 0L, taking_off = 0L;
+-static NEARDATA int todelay;
++static int todelay;
+-static NEARDATA const char see_yourself[] = "see yourself";
+-static NEARDATA const char unknown_type[] = "Unknown type of %s (%d)";
+-static NEARDATA const char *c_armor  = "armor",
++static const char see_yourself[] = "see yourself";
++static const char unknown_type[] = "Unknown type of %s (%d)";
++static const char *c_armor  = "armor",
+                          *c_suit   = "suit",
+ #ifdef TOURIST
+                          *c_shirt  = "shirt",
+@@ -31,7 +31,7 @@
+                          *c_axe    = "axe",
+                          *c_that_  = "that";
+-static NEARDATA const long takeoff_order[] = { WORN_BLINDF, W_WEP,
++static const long takeoff_order[] = { WORN_BLINDF, W_WEP,
+       WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK,
+       WORN_HELMET, WORN_AMUL, WORN_ARMOR,
+ #ifdef TOURIST
+@@ -917,8 +917,8 @@
+       multi = 0;
+ }
+-static NEARDATA const char clothes[] = {ARMOR_CLASS, 0};
+-static NEARDATA const char accessories[] = {RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, 0};
++static const char clothes[] = {ARMOR_CLASS, 0};
++static const char accessories[] = {RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, 0};
+ int
+ dotakeoff()
+diff -urN nethack-3.3.1.orig/src/dogmove.c nethack-3.3.1/src/dogmove.c
+--- nethack-3.3.1.orig/src/dogmove.c   Sun Jul 16 03:53:14 2000
++++ nethack-3.3.1/src/dogmove.c        Sat Mar  9 11:34:20 2002
+@@ -44,7 +44,7 @@
+       return (struct obj *)0;
+ }
+-static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 };
++static const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 };
+ #endif /* OVL0 */
+diff -urN nethack-3.3.1.orig/src/dokick.c nethack-3.3.1/src/dokick.c
+--- nethack-3.3.1.orig/src/dokick.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/dokick.c Sat Mar  9 11:34:20 2002
+@@ -9,8 +9,8 @@
+ #define martial()     (martial_bonus() || is_bigfoot(youmonst.data) || \
+               (uarmf && uarmf->otyp == KICKING_BOOTS))
+-static NEARDATA struct rm *maploc;
+-static NEARDATA const char *gate_str;
++static struct rm *maploc;
++static const char *gate_str;
+ extern boolean notonhead;     /* for long worms */
+@@ -21,7 +21,7 @@
+ STATIC_DCL void FDECL(otransit_msg, (struct obj *, BOOLEAN_P, long));
+ STATIC_DCL void FDECL(drop_to, (coord *,SCHAR_P));
+-static NEARDATA struct obj *kickobj;
++static struct obj *kickobj;
+ #define IS_SHOP(x)    (rooms[x].rtype >= SHOPBASE)
+diff -urN nethack-3.3.1.orig/src/dothrow.c nethack-3.3.1/src/dothrow.c
+--- nethack-3.3.1.orig/src/dothrow.c   Sun Jul 16 03:42:57 2000
++++ nethack-3.3.1/src/dothrow.c        Sat Mar  9 11:34:20 2002
+@@ -18,10 +18,10 @@
+ STATIC_DCL void FDECL(sho_obj_return_to_u, (struct obj *obj));
+-static NEARDATA const char toss_objs[] =
++static const char toss_objs[] =
+       { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, WEAPON_CLASS, 0 };
+ /* different default choices when wielding a sling (gold must be included) */
+-static NEARDATA const char bullets[] =
++static const char bullets[] =
+       { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, GEM_CLASS, 0 };
+ extern boolean notonhead;     /* for long worms */
+@@ -1153,11 +1153,11 @@
+       boolean is_buddy = sgn(mon->data->maligntyp) == sgn(u.ualign.type);
+       boolean is_gem = objects[obj->otyp].oc_material == GEMSTONE;
+       int ret = 0;
+-      static NEARDATA const char nogood[] = " is not interested in your junk.";
+-      static NEARDATA const char acceptgift[] = " accepts your gift.";
+-      static NEARDATA const char maybeluck[] = " hesitatingly";
+-      static NEARDATA const char noluck[] = " graciously";
+-      static NEARDATA const char addluck[] = " gratefully";
++      static const char nogood[] = " is not interested in your junk.";
++      static const char acceptgift[] = " accepts your gift.";
++      static const char maybeluck[] = " hesitatingly";
++      static const char noluck[] = " graciously";
++      static const char addluck[] = " gratefully";
+       Strcpy(buf,Monnam(mon));
+       mon->mpeaceful = 1;
+@@ -1323,8 +1323,8 @@
+               struct monst *shkp = shop_keeper(*o_shop);
+               if (shkp) {             /* (implies *o_shop != '\0') */
+-                  static NEARDATA long lastmovetime = 0L;
+-                  static NEARDATA boolean peaceful_shk = FALSE;
++                  static long lastmovetime = 0L;
++                  static boolean peaceful_shk = FALSE;
+                   /*  We want to base shk actions on her peacefulness
+                       at start of this turn, so that "simultaneous"
+                       multiple breakage isn't drastically worse than
+diff -urN nethack-3.3.1.orig/src/drawing.c nethack-3.3.1/src/drawing.c
+--- nethack-3.3.1.orig/src/drawing.c   Sat Jul 22 02:59:05 2000
++++ nethack-3.3.1/src/drawing.c        Sat Mar  9 11:34:20 2002
+@@ -868,7 +868,7 @@
+ #endif /* ASCIIGRAPH */
+       for (i = 0; i < MAXOCLASSES; i++) {
+-#ifdef ASCIIGRAPH
++#if defined(ASCIIGRAPH) && !defined(LINUX)
+           if (iflags.IBMgraphics
+ # if defined(USE_TILES) && defined(MSDOS)
+               && !iflags.grmode
+@@ -876,7 +876,7 @@
+               )
+               oc_syms[i] = IBM_r_oc_syms[i];
+           else
+-#endif /* ASCIIGRAPH */
++#endif /* ASCIIGRAPH && !LINUX */
+               oc_syms[i] = r_oc_syms[i];
+       }
+ #if defined(MSDOS) && defined(USE_TILES)
+diff -urN nethack-3.3.1.orig/src/eat.c nethack-3.3.1/src/eat.c
+--- nethack-3.3.1.orig/src/eat.c       Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/eat.c    Sat Mar  9 11:34:20 2002
+@@ -63,16 +63,16 @@
+ #ifndef OVLB
+-STATIC_DCL NEARDATA const char comestibles[];
+-STATIC_DCL NEARDATA const char allobj[];
++STATIC_DCL const char comestibles[];
++STATIC_DCL const char allobj[];
+ STATIC_DCL boolean force_save_hs;
+ #else
+-STATIC_OVL NEARDATA const char comestibles[] = { FOOD_CLASS, 0 };
++STATIC_OVL const char comestibles[] = { FOOD_CLASS, 0 };
+ /* Gold must come first for getobj(). */
+-STATIC_OVL NEARDATA const char allobj[] = {
++STATIC_OVL const char allobj[] = {
+       GOLD_CLASS, WEAPON_CLASS, ARMOR_CLASS, POTION_CLASS, SCROLL_CLASS,
+       WAND_CLASS, RING_CLASS, AMULET_CLASS, FOOD_CLASS, TOOL_CLASS,
+       GEM_CLASS, ROCK_CLASS, BALL_CLASS, CHAIN_CLASS, SPBOOK_CLASS, 0 };
+@@ -151,12 +151,12 @@
+ };
+ #define TTSZ  SIZE(tintxts)
+-static NEARDATA struct {
++static struct {
+       struct  obj *tin;
+       int     usedtime, reqtime;
+ } tin;
+-static NEARDATA struct {
++static struct {
+       struct  obj *piece;     /* the thing being eaten, or last thing that
+                                * was partially eaten, unless that thing was
+                                * a tin, which uses the tin structure above,
+diff -urN nethack-3.3.1.orig/src/end.c nethack-3.3.1/src/end.c
+--- nethack-3.3.1.orig/src/end.c       Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/end.c    Sat Mar  9 11:34:20 2002
+@@ -118,7 +118,7 @@
+ /*
+  * The order of these needs to match the macros in hack.h.
+  */
+-static NEARDATA const char *deaths[] = {              /* the array of death */
++static const char *deaths[] = {               /* the array of death */
+       "died", "choked", "poisoned", "starvation", "drowning",
+       "burning", "dissolving under the heat and pressure",
+       "crushed", "turned to stone", "turned into slime",
+@@ -126,7 +126,7 @@
+       "quit", "escaped", "ascended"
+ };
+-static NEARDATA const char *ends[] = {                /* "when you..." */
++static const char *ends[] = {         /* "when you..." */
+       "died", "choked", "were poisoned", "starved", "drowned",
+       "burned", "dissolved in the lava",
+       "were crushed", "turned to stone", "turned into slime",
+diff -urN nethack-3.3.1.orig/src/engrave.c nethack-3.3.1/src/engrave.c
+--- nethack-3.3.1.orig/src/engrave.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/engrave.c        Sat Mar  9 11:34:20 2002
+@@ -6,7 +6,7 @@
+ #include "lev.h"
+ #include <ctype.h>
+-STATIC_VAR NEARDATA struct engr *head_engr;
++STATIC_VAR struct engr *head_engr;
+ #ifdef OVLB
+ /* random engravings */
+@@ -400,7 +400,7 @@
+               return(1);*/
+ }
+-static NEARDATA const char styluses[] =
++static const char styluses[] =
+       { ALL_CLASSES, ALLOW_NONE, TOOL_CLASS, WEAPON_CLASS, WAND_CLASS,
+         GEM_CLASS, RING_CLASS, 0 };
+diff -urN nethack-3.3.1.orig/src/extralev.c nethack-3.3.1/src/extralev.c
+--- nethack-3.3.1.orig/src/extralev.c  Mon Nov 29 03:27:55 1999
++++ nethack-3.3.1/src/extralev.c       Sat Mar  9 11:34:20 2002
+@@ -22,7 +22,7 @@
+ #define LEFT 4
+ #define RIGHT 8
+-static NEARDATA struct rogueroom r[3][3];
++static struct rogueroom r[3][3];
+ STATIC_DCL void FDECL(roguejoin,(int,int,int,int,int));
+ STATIC_DCL void FDECL(roguecorr,(int,int,int));
+ STATIC_DCL void FDECL(miniwalk,(int,int));
+diff -urN nethack-3.3.1.orig/src/files.c nethack-3.3.1/src/files.c
+--- nethack-3.3.1.orig/src/files.c     Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/files.c  Sat Mar  9 11:34:20 2002
+@@ -8,25 +8,25 @@
+ #include <ctype.h>
+ #if !defined(MAC) && !defined(O_WRONLY) && !defined(AZTEC_C)
+-#include <fcntl.h>
++      #include <fcntl.h>
+ #endif
+ #if defined(UNIX) || defined(VMS)
+-#include <errno.h>
+-# ifndef SKIP_ERRNO
+-extern int errno;
+-# endif
+-#include <signal.h>
++      #include <errno.h>
++      #ifndef SKIP_ERRNO
++              extern int errno;
++      #endif
++      #include <signal.h>
+ #endif
+ #if defined(MSDOS) || defined(OS2) || defined(TOS) || defined(WIN32)
+-# ifndef GNUDOS
+-#include <sys\stat.h>
+-# else
+-#include <sys/stat.h>
+-# endif
++      #ifndef GNUDOS
++              #include <sys\stat.h>
++      #else
++              #include <sys/stat.h>
++      #endif
+ #endif
+ #ifndef O_BINARY      /* used for micros, no-op for others */
+-# define O_BINARY 0
++      #define O_BINARY 0
+ #endif
+ #ifdef PREFIXES_IN_USE
+@@ -34,36 +34,40 @@
+ static char fqn_filename_buffer[FQN_NUMBUF][FQN_MAX_FILENAME];
+ #endif
+-#if !defined(MFLOPPY) && !defined(VMS) && !defined(WIN32)
++# if !defined(MFLOPPY) && !defined(VMS) && !defined(WIN32) && !defined(LINUX)
+ char bones[] = "bonesnn.xxx";
+ char lock[PL_NSIZ+14] = "1lock"; /* long enough for uid+name+.99 */
+-#else
+-# if defined(MFLOPPY)
+-char bones[FILENAME];         /* pathname of bones files */
+-char lock[FILENAME];          /* pathname of level files */
+-# endif
+-# if defined(VMS)
+-char bones[] = "bonesnn.xxx;1";
+-char lock[PL_NSIZ+17] = "1lock"; /* long enough for _uid+name+.99;1 */
+-# endif
+-# if defined(WIN32)
+-char bones[] = "bonesnn.xxx";
+-char lock[PL_NSIZ+25];                /* long enough for username+-+name+.99 */
++# else
++      # if defined(MFLOPPY)
++      char bones[FILENAME];           /* pathname of bones files */
++      char lock[FILENAME];            /* pathname of level files */
++      # endif
++      # if defined(VMS)
++      char bones[] = "bonesnn.xxx;1";
++      char lock[PL_NSIZ+17] = "1lock"; /* long enough for _uid+name+.99;1 */
++      # endif
++      # if defined(LINUX)
++      char bones[] = "/var/games/nethack/bonesnn.xxx";
++      char lock[255] = "/var/games/nethack/1lock";
++      # endif
++      # if defined(WIN32)
++      char bones[] = "bonesnn.xxx";
++      char lock[PL_NSIZ+25];          /* long enough for username+-+name+.99 */
++      # endif
+ # endif
+-#endif
+ #if defined(UNIX) || defined(__BEOS__)
+-#define SAVESIZE      (PL_NSIZ + 13)  /* save/99999player.e */
++      #define SAVESIZE        (PL_NSIZ + 13)  /* save/99999player.e */
+ #else
+-# ifdef VMS
+-#define SAVESIZE      (PL_NSIZ + 22)  /* [.save]<uid>player.e;1 */
+-# else
+-#  if defined(WIN32)
+-#define SAVESIZE      (PL_NSIZ + 40)  /* username-player.NetHack-saved-game */
+-#  else
+-#define SAVESIZE      FILENAME        /* from macconf.h or pcconf.h */
+-#  endif
+-# endif
++      # ifdef VMS
++              #define SAVESIZE        (PL_NSIZ + 22)  /* [.save]<uid>player.e;1 */
++      # else
++              #  if defined(WIN32)
++                      #define SAVESIZE        (PL_NSIZ + 40)  /* username-player.NetHack-saved-game */
++              #  else
++                      #define SAVESIZE        FILENAME        /* from macconf.h or pcconf.h */
++              #  endif
++      # endif
+ #endif
+ char SAVEF[SAVESIZE]; /* holds relative path of save file from playground */
+@@ -442,7 +446,7 @@
+ #else
+       ret = rename(tempname, fq_bones);
+ #endif
+-#ifdef WIZARD
++#if defined(WIZARD)
+       if (wizard && ret != 0)
+               pline("couldn't rename %s to %s", tempname, fq_bones);
+ #endif
+@@ -520,9 +524,14 @@
+ # else
+ #  if defined(WIN32)
+       Sprintf(SAVEF,"%s-%s.NetHack-saved-game",get_username(0), plname);
+-#  else
++# else 
++ #  if defined(LINUX)
++        Sprintf(SAVEF, "/var/games/nethack/save/%d%s", (int)getuid(), plname);
++        regularize(SAVEF+28);   /* avoid . or / in name */
++ #  else
+       Sprintf(SAVEF, "save/%d%s", (int)getuid(), plname);
+       regularize(SAVEF+5);    /* avoid . or / in name */
++ #  endif /* LINUX */
+ #  endif /* WIN32 */
+ # endif       /* MICRO */
+ #endif /* VMS   */
+diff -urN nethack-3.3.1.orig/src/hack.c nethack-3.3.1/src/hack.c
+--- nethack-3.3.1.orig/src/hack.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/hack.c   Sat Mar  9 11:34:20 2002
+@@ -227,7 +227,7 @@
+               long lastmovetime;
+               lastmovetime = 0;
+ #else
+-              static NEARDATA long lastmovetime;
++              static long lastmovetime;
+ #endif
+               /* note: this var contains garbage initially and
+                  after a restore */
+@@ -441,7 +441,7 @@
+ }
+ #ifdef SINKS
+-static NEARDATA const char fell_on_sink[] = "fell onto a sink";
++static const char fell_on_sink[] = "fell onto a sink";
+ STATIC_OVL void
+ dosinkfall()
+diff -urN nethack-3.3.1.orig/src/invent.c nethack-3.3.1/src/invent.c
+--- nethack-3.3.1.orig/src/invent.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/invent.c Sat Mar  9 11:34:20 2002
+@@ -1025,7 +1025,7 @@
+                       W_WEP | W_SWAPWEP | W_QUIVER))));
+ }
+-static NEARDATA const char removeables[] =
++static const char removeables[] =
+       { ARMOR_CLASS, WEAPON_CLASS, RING_CLASS, AMULET_CLASS, TOOL_CLASS, 0 };
+ /* interactive version of getobj - used for Drop, Identify and */
+@@ -2401,24 +2401,24 @@
+  * Conversion from a class to a string for printing.
+  * This must match the object class order.
+  */
+-STATIC_VAR NEARDATA const char *names[] = { 0,
++STATIC_VAR const char *names[] = { 0,
+       "Illegal objects", "Weapons", "Armor", "Rings", "Amulets",
+       "Tools", "Comestibles", "Potions", "Scrolls", "Spellbooks",
+       "Wands", "Coins", "Gems", "Boulders/Statues", "Iron balls",
+       "Chains", "Venoms"
+ };
+-static NEARDATA const char oth_symbols[] = {
++static const char oth_symbols[] = {
+       CONTAINED_SYM,
+       '\0'
+ };
+-static NEARDATA const char *oth_names[] = {
++static const char *oth_names[] = {
+       "Bagged/Boxed items"
+ };
+-static NEARDATA char *invbuf = (char *)0;
+-static NEARDATA unsigned invbufsiz = 0;
++static char *invbuf = (char *)0;
++static unsigned invbufsiz = 0;
+ char *
+ let_to_name(let,unpaid)
+diff -urN nethack-3.3.1.orig/src/lock.c nethack-3.3.1/src/lock.c
+--- nethack-3.3.1.orig/src/lock.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/lock.c   Sat Mar  9 11:34:20 2002
+@@ -8,7 +8,7 @@
+ STATIC_PTR int NDECL(forcelock);
+ /* at most one of `door' and `box' should be non-null at any given time */
+-STATIC_VAR NEARDATA struct xlock_s {
++STATIC_VAR struct xlock_s {
+       struct rm  *door;
+       struct obj *box;
+       int picktyp, chance, usedtime;
+diff -urN nethack-3.3.1.orig/src/mail.c nethack-3.3.1/src/mail.c
+--- nethack-3.3.1.orig/src/mail.c      Wed Aug  9 20:02:04 2000
++++ nethack-3.3.1/src/mail.c   Sat Mar  9 11:34:20 2002
+@@ -256,7 +256,7 @@
+ }
+ /* Let the mail daemon have a larger vocabulary. */
+-static NEARDATA const char *mail_text[] = {
++static const char *mail_text[] = {
+     "Gangway!",
+     "Look out!",
+     "Pardon me!"
+diff -urN nethack-3.3.1.orig/src/makemon.c nethack-3.3.1/src/makemon.c
+--- nethack-3.3.1.orig/src/makemon.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/makemon.c        Sat Mar  9 11:34:20 2002
+@@ -10,7 +10,7 @@
+ #include <ctype.h>
+ #endif
+-STATIC_VAR NEARDATA struct monst zeromonst;
++STATIC_VAR struct monst zeromonst;
+ #ifdef OVL0
+ STATIC_DCL boolean FDECL(uncommon, (int));
+@@ -1048,8 +1048,8 @@
+ align_shift(ptr)
+ register struct permonst *ptr;
+ {
+-    static NEARDATA long oldmoves = 0L;       /* != 1, starting value of moves */
+-    static NEARDATA s_level *lev;
++    static long oldmoves = 0L;        /* != 1, starting value of moves */
++    static s_level *lev;
+     register int alshift;
+     if(oldmoves != moves) {
+@@ -1070,7 +1070,7 @@
+     return alshift;
+ }
+-static NEARDATA struct {
++static struct {
+       int choice_count;
+       char mchoices[SPECIAL_PM];      /* value range is 0..127 */
+ } rndmonst_state = { -1, {0} };
+@@ -1531,7 +1531,7 @@
+ #endif /* OVL1 */
+ #ifdef OVLB
+-static NEARDATA char syms[] = {
++static char syms[] = {
+       MAXOCLASSES, MAXOCLASSES+1, RING_CLASS, WAND_CLASS, WEAPON_CLASS,
+       FOOD_CLASS, GOLD_CLASS, SCROLL_CLASS, POTION_CLASS, ARMOR_CLASS,
+       AMULET_CLASS, TOOL_CLASS, ROCK_CLASS, GEM_CLASS, SPBOOK_CLASS,
+diff -urN nethack-3.3.1.orig/src/mhitm.c nethack-3.3.1/src/mhitm.c
+--- nethack-3.3.1.orig/src/mhitm.c     Thu Aug  3 22:00:42 2000
++++ nethack-3.3.1/src/mhitm.c  Sat Mar  9 11:34:20 2002
+@@ -10,9 +10,9 @@
+ #ifdef OVLB
+-static NEARDATA boolean vis, far_noise;
+-static NEARDATA long noisetime;
+-static NEARDATA struct obj *otmp;
++static boolean vis, far_noise;
++static long noisetime;
++static struct obj *otmp;
+ static const char brief_feeling[] =
+       "have a %s feeling for a moment, then it passes.";
+diff -urN nethack-3.3.1.orig/src/mhitu.c nethack-3.3.1/src/mhitu.c
+--- nethack-3.3.1.orig/src/mhitu.c     Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/mhitu.c  Sat Mar  9 11:34:20 2002
+@@ -5,7 +5,7 @@
+ #include "hack.h"
+ #include "artifact.h"
+-STATIC_VAR NEARDATA struct obj *otmp;
++STATIC_VAR struct obj *otmp;
+ STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *));
+ # ifdef OVL1
+diff -urN nethack-3.3.1.orig/src/mklev.c nethack-3.3.1/src/mklev.c
+--- nethack-3.3.1.orig/src/mklev.c     Wed Aug  9 17:46:19 2000
++++ nethack-3.3.1/src/mklev.c  Sat Mar  9 11:34:20 2002
+@@ -446,7 +446,7 @@
+ }
+ /* there should be one of these per trap, in the same order as trap.h */
+-static NEARDATA const char *trap_engravings[TRAPNUM] = {
++static const char *trap_engravings[TRAPNUM] = {
+                       (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
+                       (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
+                       (char *)0, (char *)0, (char *)0, (char *)0,
+diff -urN nethack-3.3.1.orig/src/monmove.c nethack-3.3.1/src/monmove.c
+--- nethack-3.3.1.orig/src/monmove.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/monmove.c        Sat Mar  9 11:34:20 2002
+@@ -494,13 +494,13 @@
+       return(tmp == 2);
+ }
+-static NEARDATA const char practical[] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 };
+-static NEARDATA const char magical[] = {
++static const char practical[] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 };
++static const char magical[] = {
+       AMULET_CLASS, POTION_CLASS, SCROLL_CLASS, WAND_CLASS, RING_CLASS,
+       SPBOOK_CLASS, 0 };
+-static NEARDATA const char indigestion[] = { BALL_CLASS, ROCK_CLASS, 0 };
+-static NEARDATA const char boulder_class[] = { ROCK_CLASS, 0 };
+-static NEARDATA const char gem_class[] = { GEM_CLASS, 0 };
++static const char indigestion[] = { BALL_CLASS, ROCK_CLASS, 0 };
++static const char boulder_class[] = { ROCK_CLASS, 0 };
++static const char gem_class[] = { GEM_CLASS, 0 };
+ boolean
+ itsstuck(mtmp)
+diff -urN nethack-3.3.1.orig/src/monst.c nethack-3.3.1/src/monst.c
+--- nethack-3.3.1.orig/src/monst.c     Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/monst.c  Sat Mar  9 11:34:20 2002
+@@ -90,7 +90,7 @@
+  */
+ #ifndef SPLITMON_2
+-NEARDATA struct permonst mons[] = {
++struct permonst mons[] = {
+ /*
+  * ants
+  */
+diff -urN nethack-3.3.1.orig/src/mthrowu.c nethack-3.3.1/src/mthrowu.c
+--- nethack-3.3.1.orig/src/mthrowu.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/mthrowu.c        Sat Mar  9 11:34:20 2002
+@@ -19,7 +19,7 @@
+ /*
+  * Keep consistent with breath weapons in zap.c, and AD_* in monattk.h.
+  */
+-STATIC_OVL NEARDATA const char *breathwep[] = {
++STATIC_OVL const char *breathwep[] = {
+                               "fragments",
+                               "fire",
+                               "frost",
+diff -urN nethack-3.3.1.orig/src/o_init.c nethack-3.3.1/src/o_init.c
+--- nethack-3.3.1.orig/src/o_init.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/o_init.c Sat Mar  9 11:34:20 2002
+@@ -11,7 +11,7 @@
+ STATIC_DCL boolean FDECL(interesting_to_discover,(int));
+-static NEARDATA short disco[NUM_OBJECTS] = DUMMY;
++static short disco[NUM_OBJECTS] = DUMMY;
+ #ifdef USE_TILES
+ STATIC_DCL void NDECL(shuffle_tiles);
+diff -urN nethack-3.3.1.orig/src/objects.c nethack-3.3.1/src/objects.c
+--- nethack-3.3.1.orig/src/objects.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/objects.c        Sat Mar  9 11:34:20 2002
+@@ -38,7 +38,7 @@
+ # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \
+       {obj}
+-NEARDATA struct objdescr obj_descr[] = {
++struct objdescr obj_descr[] = {
+ #else
+ /* second pass -- object definitions */
+@@ -53,7 +53,7 @@
+ #  define HARDGEM(n) (0)
+ # endif
+-NEARDATA struct objclass objects[] = {
++struct objclass objects[] = {
+ #endif
+ /* dummy object[0] -- description [2nd arg] *must* be NULL */
+       OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0),
+diff -urN nethack-3.3.1.orig/src/objnam.c nethack-3.3.1/src/objnam.c
+--- nethack-3.3.1.orig/src/objnam.c    Thu Aug  3 21:25:24 2000
++++ nethack-3.3.1/src/objnam.c Sat Mar  9 11:34:20 2002
+@@ -84,7 +84,7 @@
+ #ifdef LINT   /* static char buf[BUFSZ]; */
+       char buf[BUFSZ];
+ #else
+-      static char NEARDATA buf[BUFSZ];
++      static char buf[BUFSZ];
+ #endif
+       register struct objclass *ocl = &objects[otyp];
+       register const char *actualn = OBJ_NAME(*ocl);
+@@ -773,7 +773,7 @@
+ struct obj *otmp;
+ boolean ignore_oquan; /* to force singular */
+ {
+-      static char NEARDATA nambuf[40];
++      static char nambuf[40];
+      /* assert( strlen(mons[otmp->corpsenm].mname) <= 32 ); */
+       Sprintf(nambuf, "%s corpse", mons[otmp->corpsenm].mname);
+@@ -810,7 +810,7 @@
+ an(str)
+ register const char *str;
+ {
+-      static char NEARDATA buf[BUFSZ];
++      static char buf[BUFSZ];
+       buf[0] = '\0';
+@@ -849,7 +849,7 @@
+ the(str)
+ const char *str;
+ {
+-      static char NEARDATA buf[BUFSZ];
++      static char buf[BUFSZ];
+       boolean insert_the = FALSE;
+       if (!strncmpi(str, "the ", 4)) {
+@@ -995,7 +995,7 @@
+ {
+       /* Note: cannot use strcmpi here -- it'd give MATZot, CAVEMeN,... */
+       register char *spot;
+-      static char NEARDATA str[BUFSZ];
++      static char str[BUFSZ];
+       const char *excess = (char *)0;
+       int len;
+@@ -1221,7 +1221,7 @@
+ #else /* OVLB */
+ /* wishable subranges of objects */
+-STATIC_OVL NEARDATA const struct o_range o_ranges[] = {
++STATIC_OVL const struct o_range o_ranges[] = {
+       { "bag",        TOOL_CLASS,   SACK,           BAG_OF_TRICKS },
+       { "lamp",       TOOL_CLASS,   OIL_LAMP,       MAGIC_LAMP },
+       { "candle",     TOOL_CLASS,   TALLOW_CANDLE,  WAX_CANDLE },
+@@ -1264,7 +1264,7 @@
+ const char *oldstr;
+ {
+       register char *p, *bp;
+-      static char NEARDATA str[BUFSZ];
++      static char str[BUFSZ];
+       if (!oldstr || !*oldstr) {
+               impossible("singular of null?");
+diff -urN nethack-3.3.1.orig/src/options.c nethack-3.3.1/src/options.c
+--- nethack-3.3.1.orig/src/options.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/options.c        Sat Mar  9 11:34:20 2002
+@@ -6,8 +6,8 @@
+ #include "config.h"
+ #include "objclass.h"
+ #include "flag.h"
+-NEARDATA struct flag flags;   /* provide linkage */
+-NEARDATA struct instance_flags iflags;        /* provide linkage */
++struct flag flags;    /* provide linkage */
++struct instance_flags iflags; /* provide linkage */
+ #define static
+ #else
+ #include "hack.h"
+@@ -2117,11 +2117,11 @@
+       badoption(opts);
+ }
+-static NEARDATA const char *menutype[] = {
++static const char *menutype[] = {
+       "traditional", "combination", "partial", "full"
+ };
+-static NEARDATA const char *burdentype[] = {
++static const char *burdentype[] = {
+       "unencumbered", "burdened", "stressed",
+       "strained", "overtaxed", "overloaded"
+ };
+diff -urN nethack-3.3.1.orig/src/pickup.c nethack-3.3.1/src/pickup.c
+--- nethack-3.3.1.orig/src/pickup.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/pickup.c Sat Mar  9 11:34:20 2002
+@@ -1503,7 +1503,7 @@
+ /* A variable set in use_container(), to be used by the callback routines   */
+ /* in_container(), and out_container() from askchain() and use_container(). */
+-static NEARDATA struct obj *current_container;
++static struct obj *current_container;
+ #define Icebox (current_container->otyp == ICE_BOX)
+ /* Returns: -1 to stop, 1 item was inserted, 0 item was not inserted. */
+@@ -1773,7 +1773,7 @@
+       current_container = obj;        /* for use by in/out_container */
+       if (obj->spe == 1) {
+-          static NEARDATA const char sc[] = "Schroedinger's Cat";
++          static const char sc[] = "Schroedinger's Cat";
+           struct obj *ocat;
+           struct monst *cat;
+diff -urN nethack-3.3.1.orig/src/polyself.c nethack-3.3.1/src/polyself.c
+--- nethack-3.3.1.orig/src/polyself.c  Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/polyself.c       Sat Mar  9 11:34:20 2002
+@@ -1033,7 +1033,7 @@
+ struct monst *mon;
+ int part;
+ {
+-      static NEARDATA const char
++      static const char
+       *humanoid_parts[] = { "arm", "eye", "face", "finger",
+               "fingertip", "foot", "hand", "handed", "head", "leg",
+               "light headed", "neck", "spine", "toe", "hair", "blood", "lung"},
+diff -urN nethack-3.3.1.orig/src/potion.c nethack-3.3.1/src/potion.c
+--- nethack-3.3.1.orig/src/potion.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/potion.c Sat Mar  9 11:34:20 2002
+@@ -7,8 +7,8 @@
+ #ifdef OVLB
+ boolean notonhead = FALSE;
+-static NEARDATA int nothing, unkn;
+-static NEARDATA const char beverages[] = { POTION_CLASS, 0 };
++static int nothing, unkn;
++static const char beverages[] = { POTION_CLASS, 0 };
+ STATIC_DCL long FDECL(itimeout, (long));
+ STATIC_DCL long FDECL(itimeout_incr, (long,int));
+diff -urN nethack-3.3.1.orig/src/pray.c nethack-3.3.1/src/pray.c
+--- nethack-3.3.1.orig/src/pray.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/pray.c   Sat Mar  9 11:34:20 2002
+@@ -930,7 +930,7 @@
+       angrygods(g_align);
+ }
+-static NEARDATA const char sacrifice_types[] = { FOOD_CLASS, AMULET_CLASS, 0 };
++static const char sacrifice_types[] = { FOOD_CLASS, AMULET_CLASS, 0 };
+ STATIC_OVL void
+ consume_offering(otmp)
+diff -urN nethack-3.3.1.orig/src/read.c nethack-3.3.1/src/read.c
+--- nethack-3.3.1.orig/src/read.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/read.c   Sat Mar  9 11:34:20 2002
+@@ -26,7 +26,7 @@
+ boolean       known;
+-static NEARDATA const char readable[] =
++static const char readable[] =
+                  { ALL_CLASSES, SCROLL_CLASS, SPBOOK_CLASS, 0 };
+ static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
+diff -urN nethack-3.3.1.orig/src/restore.c nethack-3.3.1/src/restore.c
+--- nethack-3.3.1.orig/src/restore.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/restore.c        Sat Mar  9 11:34:20 2002
+@@ -58,8 +58,8 @@
+ #include "quest.h"
+ boolean restoring = FALSE;
+-static NEARDATA struct fruit *oldfruit;
+-static NEARDATA long omoves;
++static struct fruit *oldfruit;
++static long omoves;
+ #define Is_IceBox(o) ((o)->otyp == ICE_BOX ? TRUE : FALSE)
+@@ -946,11 +946,11 @@
+ #ifndef ZEROCOMP_BUFSIZ
+ #define ZEROCOMP_BUFSIZ BUFSZ
+ #endif
+-static NEARDATA unsigned char inbuf[ZEROCOMP_BUFSIZ];
+-static NEARDATA unsigned short inbufp = 0;
+-static NEARDATA unsigned short inbufsz = 0;
+-static NEARDATA short inrunlength = -1;
+-static NEARDATA int mreadfd;
++static unsigned char inbuf[ZEROCOMP_BUFSIZ];
++static unsigned short inbufp = 0;
++static unsigned short inbufsz = 0;
++static short inrunlength = -1;
++static int mreadfd;
+ static int
+ mgetc()
+diff -urN nethack-3.3.1.orig/src/role.c nethack-3.3.1/src/role.c
+--- nethack-3.3.1.orig/src/role.c      Mon May 22 19:31:42 2000
++++ nethack-3.3.1/src/role.c   Sat Mar  9 11:34:20 2002
+@@ -503,7 +503,7 @@
+ };
+ /* used by str2XXX() */
+-static char NEARDATA randomstr[] = "random";
++static char randomstr[] = "random";
+ boolean
+diff -urN nethack-3.3.1.orig/src/save.c nethack-3.3.1/src/save.c
+--- nethack-3.3.1.orig/src/save.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/save.c   Sat Mar  9 11:34:20 2002
+@@ -549,11 +549,11 @@
+ #ifndef ZEROCOMP_BUFSIZ
+ # define ZEROCOMP_BUFSIZ BUFSZ
+ #endif
+-static NEARDATA unsigned char outbuf[ZEROCOMP_BUFSIZ];
+-static NEARDATA unsigned short outbufp = 0;
+-static NEARDATA short outrunlength = -1;
+-static NEARDATA int bwritefd;
+-static NEARDATA boolean compressing = FALSE;
++static unsigned char outbuf[ZEROCOMP_BUFSIZ];
++static unsigned short outbufp = 0;
++static short outrunlength = -1;
++static int bwritefd;
++static boolean compressing = FALSE;
+ /*dbg()
+ {
+diff -urN nethack-3.3.1.orig/src/shk.c nethack-3.3.1/src/shk.c
+--- nethack-3.3.1.orig/src/shk.c       Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/shk.c    Sat Mar  9 11:34:20 2002
+@@ -25,7 +25,7 @@
+ extern const struct shclass shtypes[];        /* defined in shknam.c */
+-STATIC_VAR NEARDATA long int followmsg;       /* last time of follow message */
++STATIC_VAR long int followmsg;        /* last time of follow message */
+ STATIC_DCL void FDECL(setpaid, (struct monst *));
+ STATIC_DCL long FDECL(addupbill, (struct monst *));
+diff -urN nethack-3.3.1.orig/src/sp_lev.c nethack-3.3.1/src/sp_lev.c
+--- nethack-3.3.1.orig/src/sp_lev.c    Sat Aug  5 01:43:26 2000
++++ nethack-3.3.1/src/sp_lev.c Sat Mar  9 11:34:20 2002
+@@ -65,14 +65,14 @@
+ #define NewTab(type, size)    (type **) alloc(sizeof(type *) * (unsigned)size)
+ #define Free(ptr)             if(ptr) free((genericptr_t) (ptr))
+-static NEARDATA walk walklist[50];
++static walk walklist[50];
+ extern int min_rx, max_rx, min_ry, max_ry; /* from mkmap.c */
+ static char Map[COLNO][ROWNO];
+ static char robjects[10], rloc_x[10], rloc_y[10], rmonst[10];
+ static aligntyp       ralign[3] = { AM_CHAOTIC, AM_NEUTRAL, AM_LAWFUL };
+-static NEARDATA xchar xstart, ystart;
+-static NEARDATA char xsize, ysize;
++static xchar xstart, ystart;
++static char xsize, ysize;
+ STATIC_DCL void FDECL(set_wall_property, (XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P,int));
+ STATIC_DCL int NDECL(rnddoor);
+diff -urN nethack-3.3.1.orig/src/spell.c nethack-3.3.1/src/spell.c
+--- nethack-3.3.1.orig/src/spell.c     Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/spell.c  Sat Mar  9 11:34:20 2002
+@@ -4,8 +4,8 @@
+ #include "hack.h"
+-static NEARDATA schar delay;          /* moves left for this spell */
+-static NEARDATA struct obj *book;     /* last/current book being xscribed */
++static schar delay;           /* moves left for this spell */
++static struct obj *book;      /* last/current book being xscribed */
+ /* spellmenu arguments; 0 thru n-1 used as spl_book[] index when swapping */
+ #define SPELLMENU_CAST (-2)
+diff -urN nethack-3.3.1.orig/src/steed.c nethack-3.3.1/src/steed.c
+--- nethack-3.3.1.orig/src/steed.c     Thu Aug  3 22:00:42 2000
++++ nethack-3.3.1/src/steed.c  Sat Mar  9 11:34:20 2002
+@@ -8,7 +8,7 @@
+ #ifdef STEED
+ /* Monsters that might be ridden */
+-static NEARDATA const char steeds[] = {
++static const char steeds[] = {
+       S_QUADRUPED, S_UNICORN, S_ANGEL, S_CENTAUR, S_DRAGON, S_JABBERWOCK, '\0'
+ };
+diff -urN nethack-3.3.1.orig/src/timeout.c nethack-3.3.1/src/timeout.c
+--- nethack-3.3.1.orig/src/timeout.c   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/timeout.c        Sat Mar  9 11:34:20 2002
+@@ -16,7 +16,7 @@
+ #ifdef OVLB
+ /* He is being petrified - dialogue by inmet!tower */
+-static NEARDATA const char *stoned_texts[] = {
++static const char *stoned_texts[] = {
+       "You are slowing down.",                /* 5 */
+       "Your limbs are stiffening.",           /* 4 */
+       "Your limbs have turned to stone.",     /* 3 */
+@@ -39,7 +39,7 @@
+ }
+ /* He is getting sicker and sicker prior to vomiting */
+-static NEARDATA const char *vomiting_texts[] = {
++static const char *vomiting_texts[] = {
+       "are feeling mildly nauseous.",         /* 14 */
+       "feel slightly confused.",              /* 11 */
+       "can't seem to think straight.",        /* 8 */
+@@ -71,7 +71,7 @@
+       exercise(A_CON, FALSE);
+ }
+-static NEARDATA const char *choke_texts[] = {
++static const char *choke_texts[] = {
+       "You find it hard to breathe.",
+       "You're gasping for air.",
+       "You can no longer breathe.",
+@@ -79,7 +79,7 @@
+       "You suffocate."
+ };
+-static NEARDATA const char *choke_texts2[] = {
++static const char *choke_texts2[] = {
+       "Your %s is becoming constricted.",
+       "Your blood is having trouble reaching your brain.",
+       "The pressure on your %s increases.",
+@@ -107,7 +107,7 @@
+       exercise(A_STR, FALSE);
+ }
+-static NEARDATA const char *slime_texts[] = {
++static const char *slime_texts[] = {
+       "You are turning a little %s.",           /* 5 */
+       "Your limbs are getting oozy.",              /* 4 */
+       "Your skin begins to peel away.",            /* 3 */
+diff -urN nethack-3.3.1.orig/src/topten.c nethack-3.3.1/src/topten.c
+--- nethack-3.3.1.orig/src/topten.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/topten.c Sat Mar  9 11:34:20 2002
+@@ -37,9 +37,9 @@
+ #define DTHSZ 85
+ #endif /* LOG_MOVE_COUNT */
+ #define ROLESZ   3
+-#define PERSMAX        3              /* entries per name/uid per char. allowed */
++#define PERSMAX        10             /* entries per name/uid per char. allowed */
+ #define POINTSMIN     1       /* must be > 0 */
+-#define ENTRYMAX      100     /* must be >= 10 */
++#define ENTRYMAX      1000    /* must be >= 10 */
+ #if !defined(MICRO) && !defined(MAC)
+ #define PERS_IS_UID           /* delete for PERSMAX per name; now per uid */
+@@ -80,7 +80,7 @@
+ #endif
+ /* must fit with end.c; used in rip.c */
+-NEARDATA const char *killed_by_prefix[] = {
++const char *killed_by_prefix[] = {
+       "killed by ", "choked on ", "poisoned by ", "", "drowned in ",
+       "", "dissolved in ", "crushed to death by ", "petrified by ",
+       "turned to slime by ", "", "", "", "", "", ""
+diff -urN nethack-3.3.1.orig/src/track.c nethack-3.3.1/src/track.c
+--- nethack-3.3.1.orig/src/track.c     Thu Oct 28 03:45:31 1999
++++ nethack-3.3.1/src/track.c  Sat Mar  9 11:34:20 2002
+@@ -7,8 +7,8 @@
+ #define UTSZ  50
+-STATIC_VAR NEARDATA int utcnt, utpnt;
+-STATIC_VAR NEARDATA coord utrack[UTSZ];
++STATIC_VAR int utcnt, utpnt;
++STATIC_VAR coord utrack[UTSZ];
+ #ifdef OVLB
+diff -urN nethack-3.3.1.orig/src/trap.c nethack-3.3.1/src/trap.c
+--- nethack-3.3.1.orig/src/trap.c      Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/trap.c   Sat Mar  9 11:34:20 2002
+@@ -113,8 +113,8 @@
+ boolean print;
+ struct monst *victim;
+ {
+-      static NEARDATA const char *action[] = { "smoulder", "rust", "rot", "corrode" };
+-      static NEARDATA const char *msg[] =  { "burnt", "rusted", "rotten", "corroded" };
++      static const char *action[] = { "smoulder", "rust", "rot", "corrode" };
++      static const char *msg[] =  { "burnt", "rusted", "rotten", "corroded" };
+       boolean vulnerable = FALSE;
+       boolean plural;
+       boolean grprot = FALSE;
+@@ -2528,7 +2528,7 @@
+ }
+ /* getobj will filter down to cans of grease and known potions of oil */
+-static NEARDATA const char oil[] = { ALL_CLASSES, TOOL_CLASS, POTION_CLASS, 0 };
++static const char oil[] = { ALL_CLASSES, TOOL_CLASS, POTION_CLASS, 0 };
+ /* it may not make much sense to use grease on floor boards, but so what? */
+ STATIC_OVL int
+diff -urN nethack-3.3.1.orig/src/u_init.c nethack-3.3.1/src/u_init.c
+--- nethack-3.3.1.orig/src/u_init.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/u_init.c Sat Mar  9 11:34:20 2002
+@@ -909,10 +909,10 @@
+                       }
+                       obj = mksobj(otyp, TRUE, FALSE);
+               } else {        /* UNDEF_TYP */
+-                      static NEARDATA short nocreate = STRANGE_OBJECT;
+-                      static NEARDATA short nocreate2 = STRANGE_OBJECT;
+-                      static NEARDATA short nocreate3 = STRANGE_OBJECT;
+-                      static NEARDATA short nocreate4 = STRANGE_OBJECT;
++                      static short nocreate = STRANGE_OBJECT;
++                      static short nocreate2 = STRANGE_OBJECT;
++                      static short nocreate3 = STRANGE_OBJECT;
++                      static short nocreate4 = STRANGE_OBJECT;
+               /*
+                * For random objects, do not create certain overly powerful
+                * items: wand of wishing, ring of levitation, or the
+diff -urN nethack-3.3.1.orig/src/weapon.c nethack-3.3.1/src/weapon.c
+--- nethack-3.3.1.orig/src/weapon.c    Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/weapon.c Sat Mar  9 11:34:20 2002
+@@ -31,13 +31,13 @@
+ #ifndef OVLB
+-STATIC_DCL NEARDATA const short skill_names_indices[];
+-STATIC_DCL NEARDATA const char *odd_skill_names[];
+-STATIC_DCL NEARDATA const char *barehands_or_martial[];
++STATIC_DCL const short skill_names_indices[];
++STATIC_DCL const char *odd_skill_names[];
++STATIC_DCL const char *barehands_or_martial[];
+ #else /* OVLB */
+-STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = {
++STATIC_VAR const short skill_names_indices[P_NUM_SKILLS] = {
+       0,                DAGGER,         KNIFE,        AXE,
+       PICK_AXE,         SHORT_SWORD,    BROADSWORD,   LONG_SWORD,
+       TWO_HANDED_SWORD, SCIMITAR,       PN_SABER,     CLUB,
+@@ -57,7 +57,7 @@
+ };
+ /* note: entry [0] isn't used */
+-STATIC_VAR NEARDATA const char *odd_skill_names[] = {
++STATIC_VAR const char *odd_skill_names[] = {
+     "no skill",
+     "bare hands",             /* use barehands_or_martial[] instead */
+     "two weapon combat",
+@@ -75,7 +75,7 @@
+     "matter spells",
+ };
+ /* indexed vis `is_martial() */
+-STATIC_VAR NEARDATA const char *barehands_or_martial[] = {
++STATIC_VAR const char *barehands_or_martial[] = {
+     "bare handed combat", "martial arts"
+ };
+@@ -112,7 +112,7 @@
+                       odd_skill_names[-skill_names_indices[type]])
+ #ifdef OVLB
+-static NEARDATA const char kebabable[] = {
++static const char kebabable[] = {
+       S_XORN, S_DRAGON, S_JABBERWOCK, S_NAGA, S_GIANT, '\0'
+ };
+@@ -343,7 +343,7 @@
+       return (struct obj *)0;
+ }
+-static NEARDATA const int rwep[] =
++static const int rwep[] =
+ {     DWARVISH_SPEAR, SILVER_SPEAR, ELVEN_SPEAR, SPEAR, ORCISH_SPEAR,
+       JAVELIN, SHURIKEN, YA, SILVER_ARROW, ELVEN_ARROW, ARROW,
+       ORCISH_ARROW, CROSSBOW_BOLT, SILVER_DAGGER, ELVEN_DAGGER, DAGGER,
+@@ -352,7 +352,7 @@
+       /* note: CREAM_PIE should NOT be #ifdef KOPS */
+ };
+-static NEARDATA const int pwep[] =
++static const int pwep[] =
+ {     HALBERD, BARDICHE, SPETUM, BILL_GUISARME, VOULGE, RANSEUR, GUISARME,
+       GLAIVE, LUCERN_HAMMER, BEC_DE_CORBIN, FAUCHARD, PARTISAN, LANCE
+ };
+@@ -470,7 +470,7 @@
+ }
+ /* Weapons in order of preference */
+-static NEARDATA short hwep[] = {
++static short hwep[] = {
+         CORPSE,  /* cockatrice corpse */
+         TSURUGI, RUNESWORD, DWARVISH_MATTOCK, TWO_HANDED_SWORD, BATTLE_AXE,
+         KATANA, UNICORN_HORN, CRYSKNIFE, TRIDENT, LONG_SWORD,
+diff -urN nethack-3.3.1.orig/src/wield.c nethack-3.3.1/src/wield.c
+--- nethack-3.3.1.orig/src/wield.c     Sat Jul 15 19:22:32 2000
++++ nethack-3.3.1/src/wield.c  Sat Mar  9 11:34:20 2002
+@@ -217,11 +217,11 @@
+ /*** Commands to change particular slot(s) ***/
+-static NEARDATA const char wield_objs[] =
++static const char wield_objs[] =
+       { ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, TOOL_CLASS, 0 };
+-static NEARDATA const char ready_objs[] =
++static const char ready_objs[] =
+       { ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, 0 };
+-static NEARDATA const char bullets[] =        /* (note: different from dothrow.c) */
++static const char bullets[] = /* (note: different from dothrow.c) */
+       { ALL_CLASSES, ALLOW_NONE, GEM_CLASS, WEAPON_CLASS, 0 };
+ int
+diff -urN nethack-3.3.1.orig/src/windows.c nethack-3.3.1/src/windows.c
+--- nethack-3.3.1.orig/src/windows.c   Mon May  8 22:56:52 2000
++++ nethack-3.3.1/src/windows.c        Sat Mar  9 11:34:20 2002
+@@ -40,7 +40,7 @@
+ STATIC_DCL void FDECL(def_raw_print, (const char *s));
+-NEARDATA struct window_procs windowprocs;
++struct window_procs windowprocs;
+ static
+ struct win_choices {
+diff -urN nethack-3.3.1.orig/src/wizard.c nethack-3.3.1/src/wizard.c
+--- nethack-3.3.1.orig/src/wizard.c    Sun Jul 16 03:51:14 2000
++++ nethack-3.3.1/src/wizard.c Sat Mar  9 11:34:20 2002
+@@ -20,7 +20,7 @@
+ STATIC_DCL long FDECL(target_on, (int,struct monst *));
+ STATIC_DCL long FDECL(strategy, (struct monst *));
+-static NEARDATA const int nasties[] = {
++static const int nasties[] = {
+       PM_COCKATRICE, PM_ETTIN, PM_STALKER, PM_MINOTAUR, PM_RED_DRAGON,
+       PM_BLACK_DRAGON, PM_GREEN_DRAGON, PM_OWLBEAR, PM_PURPLE_WORM,
+       PM_ROCK_TROLL, PM_XAN, PM_GREMLIN, PM_UMBER_HULK, PM_VAMPIRE_LORD,
+@@ -32,7 +32,7 @@
+       PM_DISENCHANTER
+       };
+-static NEARDATA const unsigned wizapp[] = {
++static const unsigned wizapp[] = {
+       PM_HUMAN, PM_WATER_DEMON, PM_VAMPIRE,
+       PM_RED_DRAGON, PM_TROLL, PM_UMBER_HULK,
+       PM_XORN, PM_XAN, PM_COCKATRICE,
+diff -urN nethack-3.3.1.orig/src/write.c nethack-3.3.1/src/write.c
+--- nethack-3.3.1.orig/src/write.c     Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/write.c  Sat Mar  9 11:34:20 2002
+@@ -67,7 +67,7 @@
+       return(1000);
+ }
+-static NEARDATA const char write_on[] = { SCROLL_CLASS, SPBOOK_CLASS, 0 };
++static const char write_on[] = { SCROLL_CLASS, SPBOOK_CLASS, 0 };
+ int
+ dowrite(pen)
+diff -urN nethack-3.3.1.orig/src/zap.c nethack-3.3.1/src/zap.c
+--- nethack-3.3.1.orig/src/zap.c       Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/src/zap.c    Sat Mar  9 11:34:20 2002
+@@ -15,8 +15,8 @@
+ #define MAGIC_COOKIE 1000
+ #ifdef OVLB
+-static NEARDATA boolean obj_zapped;
+-static NEARDATA int poly_zapped;
++static boolean obj_zapped;
++static int poly_zapped;
+ #endif
+ extern boolean notonhead;     /* for long worms */
+@@ -1657,7 +1657,7 @@
+       useup(otmp);
+ }
+-static NEARDATA const char zap_syms[] = { WAND_CLASS, 0 };
++static const char zap_syms[] = { WAND_CLASS, 0 };
+ int
+ dozap()
+diff -urN nethack-3.3.1.orig/sys/amiga/wbgads.c nethack-3.3.1/sys/amiga/wbgads.c
+--- nethack-3.3.1.orig/sys/amiga/wbgads.c      Sat Apr  4 04:21:22 1998
++++ nethack-3.3.1/sys/amiga/wbgads.c   Sat Mar  9 11:34:20 2002
+@@ -6,7 +6,7 @@
+ static void GadSpaceOut(struct OPTGAD *gads , int row , int maxx);
+ static void CompSpaceOut(struct OPTGAD *gads , int row , int maxx);
+-extern NEARDATA struct flag flags;
++extern struct flag flags;
+ #define INITX 7
+ #define GADBORD       3
+diff -urN nethack-3.3.1.orig/sys/amiga/winext.h nethack-3.3.1/sys/amiga/winext.h
+--- nethack-3.3.1.orig/sys/amiga/winext.h      Thu Mar  2 19:35:47 2000
++++ nethack-3.3.1/sys/amiga/winext.h   Sat Mar  9 11:34:20 2002
+@@ -37,10 +37,10 @@
+  * extern const char *roles[];
+  * extern struct Library *ConsoleDevice;
+  * extern char toplines[ TBUFSZ ];
+- * extern NEARDATA winid WIN_MESSAGE;
+- * extern NEARDATA winid WIN_MAP;
+- * extern NEARDATA winid WIN_STATUS;
+- * extern NEARDATA winid WIN_INVEN;
++ * extern winid WIN_MESSAGE;
++ * extern winid WIN_MAP;
++ * extern winid WIN_STATUS;
++ * extern winid WIN_INVEN;
+  * extern winid WIN_OVER;
+  * extern struct GfxBase *GfxBase;
+  * extern struct Library *DiskfontBase;
+diff -urN nethack-3.3.1.orig/sys/share/ioctl.c nethack-3.3.1/sys/share/ioctl.c
+--- nethack-3.3.1.orig/sys/share/ioctl.c       Sat Jan 15 22:32:34 2000
++++ nethack-3.3.1/sys/share/ioctl.c    Sat Mar  9 11:34:20 2002
+@@ -76,6 +76,10 @@
+ extern void NDECL(linux_mapon);
+ extern void NDECL(linux_mapoff);
+ #endif
++#ifdef __linux__
++extern void NDECL(linux_mapon);
++extern void NDECL(linux_mapoff);
++#endif
+ #ifdef AUX
+ void
+@@ -163,6 +167,9 @@
+ #  ifdef __linux__
+               linux_mapon();
+ #  endif
++#  ifdef __linux__
++              linux_mapon();
++#  endif
+               (void) signal(SIGTSTP, SIG_DFL);
+ #  ifdef AUX
+               ( void ) kill ( 0 , SIGSTOP ) ;
+@@ -174,6 +181,9 @@
+ #  endif
+ #  ifdef __linux__
+               linux_mapoff();
++#  endif
++#  ifdef __linux__
++              linux_mapoff();
+ #  endif
+               resume_nhwindows();
+       } else {
+diff -urN nethack-3.3.1.orig/sys/share/unixtty.c nethack-3.3.1/sys/share/unixtty.c
+--- nethack-3.3.1.orig/sys/share/unixtty.c     Sat Aug  5 02:28:39 2000
++++ nethack-3.3.1/sys/share/unixtty.c  Sat Mar  9 11:34:20 2002
+@@ -426,8 +426,7 @@
+ # endif
+ }
+ #endif        /* __linux__ */
+-
+-
++      
+ #ifndef __begui__     /* the Be GUI will define its own error proc */
+ /* fatal error */
+ /*VARARGS1*/
+diff -urN nethack-3.3.1.orig/sys/unix/Makefile.doc nethack-3.3.1/sys/unix/Makefile.doc
+--- nethack-3.3.1.orig/sys/unix/Makefile.doc   Fri Jan 14 21:49:48 2000
++++ nethack-3.3.1/sys/unix/Makefile.doc        Sat Mar  9 11:34:20 2002
+@@ -34,7 +34,7 @@
+ GAME  = nethack
+-MANDIR        = /usr/man/man6
++MANDIR        = /usr/share/man/man6
+ MANEXT        = 6
+ # manual installation for most BSD-style systems
+@@ -51,11 +51,14 @@
+ # DLBMANCREATE = nroff -man dlb.6 >
+ manpages:
+-      -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
+-      -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
+-      -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
+-      -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
+-      -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
++  
++      -mkdir -p $(DESTDIR)/$(MANDIR)
++
++      -$(GAMEMANCREATE) $(DESTDIR)/$(MANDIR)/$(GAME).$(MANEXT)
++      -$(LEVMANCREATE) $(DESTDIR)/$(MANDIR)/lev_comp.$(MANEXT)
++      -$(DGNMANCREATE) $(DESTDIR)/$(MANDIR)/dgn_comp.$(MANEXT)
++      -$(RCVRMANCREATE) $(DESTDIR)/$(MANDIR)/recover.$(MANEXT)
++      -$(DLBMANCREATE) $(DESTDIR)/$(MANDIR)/dlb.$(MANEXT)
+ # manual creation for distribution
+ DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
+diff -urN nethack-3.3.1.orig/sys/unix/Makefile.src nethack-3.3.1/sys/unix/Makefile.src
+--- nethack-3.3.1.orig/sys/unix/Makefile.src   Sat Aug  5 12:52:57 2000
++++ nethack-3.3.1/sys/unix/Makefile.src        Sat Mar  9 11:34:20 2002
+@@ -24,6 +24,8 @@
+ #     'SysBe'         -- BeOS
+ SYSTEM = Sysunix
++QTDIR = /usr/X11R6/
++
+ #
+ # Make sure that your bourne shell is specified here, as you have to spawn
+ # some of the commands (eg. depend) in bourne shell for them to work.
+@@ -58,7 +60,7 @@
+ #     if you get setcgtty() warnings during execution, you are feeding gcc
+ #             a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
+ #             -traditional in CFLAGS
+-# CC = gcc
++CC = gcc
+ #
+ #     For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
+ #
+@@ -117,8 +119,11 @@
+ # flags for Linux
+ #   compile normally
+-# CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
+-# LFLAGS = -L/usr/X11/lib
++
++OPTFLAGS = -O2 -fomit-frame-pointer
++CFLAGS = $(OPTFLAGS) -I../include -I/usr/X11R6/include -I/usr/include/ncurses
++LFLAGS = -s -L/usr/X11R6/lib
++
+ #   OR compile backwards compatible a.out format
+ # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include
+ # LFLAGS = -b i486-linuxaout -L/usr/X11/lib
+@@ -150,7 +155,7 @@
+ # The Qt and Be window systems are written in C++, while the rest of
+ # NetHack is standard C.  If using Qt, uncomment the LD line here to get
+ # the C++ libraries linked in.
+-CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include
++CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include -I$(QTDIR)/include/qt
+ CXX=g++
+ #LD=g++
+@@ -203,8 +208,8 @@
+ #
+ #
+-WINSRC = $(WINTTYSRC)
+-WINOBJ = $(WINTTYOBJ)
++WINSRC = $(WINTTYSRC) $(WINQTSRC)
++WINOBJ = $(WINTTYOBJ) $(WINQTOBJ)
+ # on some systems the termcap library is in -ltermcap or -lcurses
+ # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
+@@ -219,15 +224,15 @@
+ # WINTTYLIB = -ltermcap
+ # WINTTYLIB = -lcurses
+ # WINTTYLIB = -lcurses16
+-# WINTTYLIB = -lncurses
+-WINTTYLIB = -ltermlib
++WINTTYLIB = -lncurses
++# WINTTYLIB = -ltermlib
+ #
+ # libraries for X11
+ # If USE_XPM is defined in config.h, you will also need -lXpm here.
+-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
++# WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
+ # WINX11LIB = -lXaw -lXmu -lXt -lX11
+ # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
+-# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
++WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
+ #
+ # libraries for Qt
+ WINQTLIB = -L$(QTDIR)/lib -lqt
+@@ -244,7 +249,7 @@
+ # libraries for BeOS 
+ WINBELIB = -lbe
+-WINLIB = $(WINTTYLIB)
++WINLIB = $(WINTTYLIB) $(WINQTLIB)
+ # any other strange libraries your system needs (for Sysunix only -- the more
+ # specialized targets should already be right)
+diff -urN nethack-3.3.1.orig/sys/unix/Makefile.top nethack-3.3.1/sys/unix/Makefile.top
+--- nethack-3.3.1.orig/sys/unix/Makefile.top   Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/sys/unix/Makefile.top        Sat Mar  9 11:34:20 2002
+@@ -35,14 +35,14 @@
+ # therefore there should not be anything in GAMEDIR that you want to keep
+ # (if there is, you'll have to do the installation by hand or modify the
+ # instructions)
+-GAMEDIR  = $(PREFIX)/games/lib/$(GAME)dir
+-VARDIR  = $(GAMEDIR)
++GAMEDIR  = /usr/share/games/$(GAME)
++VARDIR  = /var/games/$(GAME)
+ SHELLDIR = $(PREFIX)/games
+ # per discussion in Install.X11 and Install.Qt
+-VARDATND = 
++# VARDATND = 
+ # VARDATND = x11tiles pet_mark.xbm
+-# VARDATND = x11tiles pet_mark.xbm rip.xpm
++VARDATND = x11tiles pet_mark.xbm rip.xpm
+ # for Atari/Gem
+ # VARDATND = nh16.img title.img GEM_RSC.RSC
+ # for BeOS
+@@ -169,34 +169,22 @@
+               -e '}'                                  \
+               -e '$$s/.*/nodlb/p' < dat/options` ;    \
+       $(MAKE) dofiles-$${target-nodlb}
+-      cp src/$(GAME) $(GAMEDIR)
+-      -rm -f $(SHELLDIR)/$(GAME)
++      cp src/$(GAME) $(DESTDIR)/$(GAMEDIR)
++      -rm -f $(DESTDIR)/$(SHELLDIR)/$(GAME)
+       sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
+               -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
+               < sys/unix/nethack.sh \
+-              > $(SHELLDIR)/$(GAME)
++              > $(DESTDIR)/$(SHELLDIR)/$(GAME)
+ # set up their permissions
+-      -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
+-                      $(CHGRP) $(GAMEGRP) $(GAME) )
+-      chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
+-      -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
+-      $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+-      chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
+ dofiles-dlb: check-dlb
+-      ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) )
++      ( cd dat ; cp nhdat $(DATNODLB) $(DESTDIR)/$(GAMEDIR) )
+ # set up their permissions
+-      -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \
+-                      $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \
+-                      chmod $(FILEPERM) nhdat $(DATNODLB) )
+ dofiles-nodlb:
+ # copy over the game files
+-      ( cd dat ; cp $(DAT) $(GAMEDIR) )
++      ( cd dat ; cp $(DAT) $(DESTDIR)/$(GAMEDIR) )
+ # set up their permissions
+-      -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \
+-                      $(CHGRP) $(GAMEGRP) $(DAT) ; \
+-                      chmod $(FILEPERM) $(DAT) )
+ update: $(GAME) $(VARDAT) dungeon spec_levs
+ #     (don't yank the old version out from under people who're playing it)
+@@ -217,23 +205,14 @@
+ install: $(GAME) $(VARDAT) dungeon spec_levs
+ # set up the directories
+ # not all mkdirs have -p; those that don't will create a -p directory
+-      -mkdir -p $(SHELLDIR)
+-      -rm -rf $(GAMEDIR) $(VARDIR)
+-      -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+-      -rmdir ./-p
+-      -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+-      $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+-      chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
++      -mkdir -p $(DESTDIR)/$(SHELLDIR)
++      -rm -rf $(DESTDIR)/$(GAMEDIR) $(DESTDIR)/$(VARDIR)
++      -mkdir -p $(DESTDIR)/$(GAMEDIR) $(DESTDIR)/$(VARDIR) $(DESTDIR)/$(VARDIR)/save
+ # set up the game files
+       ( $(MAKE) dofiles )
+ # set up some additional files
+-      touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
+-      -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
+-                      $(CHGRP) $(GAMEGRP) perm record logfile ; \
+-                      chmod $(FILEPERM) perm record logfile )
++      touch $(DESTDIR)/$(VARDIR)/perm $(DESTDIR)/$(VARDIR)/record $(DESTDIR)/$(VARDIR)/logfile
+ # and a reminder
+-      @echo You may also want to reinstall the man pages via the doc Makefile.
+-
+ # 'make clean' removes all the .o files, but leaves around all the executables
+ # and compiled data files
+diff -urN nethack-3.3.1.orig/sys/unix/Makefile.utl nethack-3.3.1/sys/unix/Makefile.utl
+--- nethack-3.3.1.orig/sys/unix/Makefile.utl   Mon Apr 17 15:36:44 2000
++++ nethack-3.3.1/sys/unix/Makefile.utl        Sat Mar  9 11:34:20 2002
+@@ -15,7 +15,7 @@
+ # if you are using gcc as your compiler,
+ #     uncomment the CC definition below if it's not in your environment
+-# CC = gcc
++CC = gcc
+ #
+ #     For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
+ #
+@@ -72,8 +72,9 @@
+ # flags for Linux
+ #   compile normally
+-# CFLAGS = -O2 -fomit-frame-pointer -I../include -I/usr/X11/include
+-# LFLAGS = -L/usr/X11/lib
++OPTFLAGS = -O2 -fomit-frame-pointer
++CFLAGS = $(OPTFLAGS) -I../include -I/usr/X11R6/include
++LFLAGS = -s -L/usr/X11R6/lib
+ #   OR compile backwards compatible a.out format
+ # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include -I/usr/X11/include
+ # LFLAGS = -b i486-linuxaout -L/usr/X11/lib
+@@ -89,19 +90,19 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+-CFLAGS = -O -I../include
+-LFLAGS =
++# CFLAGS = -O -I../include
++# LFLAGS =
+ LIBS =
+  
+ # yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
+ # if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
+-YACC     = yacc
+-LEX      = lex
+-# YACC     = bison -y
++# YACC     = yacc
++# LEX      = lex
++YACC     = bison -y
+ # YACC     = byacc
+-# LEX      = flex
++LEX      = flex
+  
+ # these are the names of the output files from YACC/LEX. Under MS-DOS
+ # and similar systems, they may differ
+diff -urN nethack-3.3.1.orig/sys/unix/unixmain.c nethack-3.3.1/sys/unix/unixmain.c
+--- nethack-3.3.1.orig/sys/unix/unixmain.c     Wed Aug  9 19:42:26 2000
++++ nethack-3.3.1/sys/unix/unixmain.c  Sat Mar  9 11:34:20 2002
+@@ -39,6 +39,11 @@
+ extern void NDECL(init_linux_cons);
+ #endif
++#ifdef __linux__
++extern void NDECL(check_linux_console);
++extern void NDECL(init_linux_cons);
++#endif
++
+ static void NDECL(wd_message);
+ #ifdef WIZARD
+ static boolean wiz_error_flag = FALSE;
+@@ -184,11 +189,11 @@
+               (void) signal(SIGQUIT,SIG_IGN);
+               (void) signal(SIGINT,SIG_IGN);
+               if(!locknum)
+-                      Sprintf(lock, "%d%s", (int)getuid(), plname);
++                      Sprintf(lock, "/var/games/nethack/%d%s", (int)getuid(), plname);
+               getlock();
+ #ifdef WIZARD
+       } else {
+-              Sprintf(lock, "%d%s", (int)getuid(), plname);
++              Sprintf(lock, "/var/games/nethack/%d%s", (int)getuid(), plname);
+               getlock();
+       }
+ #endif /* WIZARD */
+diff -urN nethack-3.3.1.orig/sys/unix/unixunix.c nethack-3.3.1/sys/unix/unixunix.c
+--- nethack-3.3.1.orig/sys/unix/unixunix.c     Wed Aug  9 19:56:45 2000
++++ nethack-3.3.1/sys/unix/unixunix.c  Sat Mar  9 11:34:20 2002
+@@ -21,6 +21,10 @@
+ extern void NDECL(linux_mapon);
+ extern void NDECL(linux_mapoff);
+ #endif
++#ifdef __linux__
++extern void NDECL(linux_mapon);
++extern void NDECL(linux_mapoff);
++#endif
+ static struct stat buf, hbuf;
+@@ -195,14 +199,14 @@
+               error("%s", "");
+       }
+-      regularize(lock);
++      regularize(lock+23);
+       set_levelfile_name(lock, 0);
+       if(locknum) {
+               if(locknum > 25) locknum = 25;
+               do {
+-                      lock[0] = 'a' + i++;
++                      lock[23] = 'a' + i++;
+                       fq_lock = fqname(lock, LEVELPREFIX, 0);
+                       if((fd = open(fq_lock, 0)) == -1) {
+@@ -334,6 +338,9 @@
+ #ifdef __linux__
+       linux_mapon();
+ #endif
++#ifdef __linux__
++      linux_mapon();
++#endif
+       if((f = fork()) == 0){          /* child */
+               (void) setgid(getgid());
+               (void) setuid(getuid());
+@@ -355,6 +362,9 @@
+ #endif
+ #ifdef __linux__
+       linux_mapoff();
++#endif
++#ifdef __linux__
++      linux_mapoff();
+ #endif
+       (void) signal(SIGINT, (SIG_RET_TYPE) done1);
+ #ifdef WIZARD
+diff -urN nethack-3.3.1.orig/util/lev_main.c nethack-3.3.1/util/lev_main.c
+--- nethack-3.3.1.orig/util/lev_main.c Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/util/lev_main.c      Sat Mar  9 11:34:20 2002
+@@ -1560,7 +1560,7 @@
+ #  ifdef TOS
+ const char *hilites[CLR_MAX];
+ #  else
+-char NEARDATA *hilites[CLR_MAX];
++char *hilites[CLR_MAX];
+ #  endif
+ # endif
+ /* trap.c */
+diff -urN nethack-3.3.1.orig/util/makedefs.c nethack-3.3.1/util/makedefs.c
+--- nethack-3.3.1.orig/util/makedefs.c Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/util/makedefs.c      Sat Mar  9 11:34:20 2002
+@@ -2285,7 +2285,7 @@
+ #endif /* VISION_TABLES */
+ #ifdef STRICT_REF_DEF
+-NEARDATA struct flag flags;
++struct flag flags;
+ # ifdef ATTRIB_H
+ struct attribs attrmax, attrmin;
+ # endif
+diff -urN nethack-3.3.1.orig/win/tty/termcap.c nethack-3.3.1/win/tty/termcap.c
+--- nethack-3.3.1.orig/win/tty/termcap.c       Sat Mar  9 11:33:16 2002
++++ nethack-3.3.1/win/tty/termcap.c    Sat Mar  9 11:34:20 2002
+@@ -65,7 +65,7 @@
+ # ifdef TOS
+ const char *hilites[CLR_MAX]; /* terminal escapes for the various colors */
+ # else
+-char NEARDATA *hilites[CLR_MAX]; /* terminal escapes for the various colors */
++char *hilites[CLR_MAX]; /* terminal escapes for the various colors */
+ # endif
+ #endif
+@@ -833,7 +833,7 @@
+ #undef FALSE
+ #define m_move curses_m_move  /* Some curses.h decl m_move(), not used here */
+-#include <curses.h>
++#include <ncurses/curses.h>
+ #ifndef LINUX
+ extern char *tparm();
This page took 0.135737 seconds and 4 git commands to generate.