]> granicus.if.org Git - nethack/commitdiff
put mystery line back but !WIN32
authornhmall <mjnh@persona.ca>
Sat, 21 Mar 2015 20:17:17 +0000 (16:17 -0400)
committernhmall <mjnh@persona.ca>
Sat, 21 Mar 2015 20:17:17 +0000 (16:17 -0400)
Since that line of code is used by a lot of different ports, I decided to
recant its removal and just add #ifdef to ensure it isn't compiled on WIN32.

I think other ports might encounter the same issue where the first pass with
filename set to 'sysconf', is then going to overwrite the hard-coded user
config file name, but I can't fix or test those so for those ports, it
will be now be back the way it was.

src/files.c

index eeebd6e086f735a52ce305877102c6f1e6f48a95..b9942246a94643187ecab6e23d79070accfc8477 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.5 files.c $NHDT-Date: 1426968058 2015/03/21 20:00:58 $  $NHDT-Branch: master $:$NHDT-Revision: 1.136 $ */
+/* NetHack 3.5 files.c $NHDT-Date: 1426969026 2015/03/21 20:17:06 $  $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */
 /* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $  $Revision: 1.124 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1858,6 +1858,9 @@ int src;
                } else
 #endif
                if ((fp = fopenp(filename, "r")) != (FILE *)0) {
+#ifndef WIN32
+                   configfile = filename;
+#endif
                    return(fp);
 #if defined(UNIX) || defined(VMS)
                } else {