]> granicus.if.org Git - nethack/commitdiff
build issue without DLB defined
authornhmall <nhmall@nethack.org>
Sun, 22 Aug 2021 02:47:55 +0000 (22:47 -0400)
committernhmall <nhmall@nethack.org>
Sun, 22 Aug 2021 02:47:55 +0000 (22:47 -0400)
sys/unix/hints/linux.2020
util/dlb_main.c

index 76701643ca3a4bb4e8bea4508374f5e37c9d5ce0..dc7f23df8e0f8ebefdb9f07db68048661e525953 100755 (executable)
@@ -53,7 +53,7 @@ GAMEGRP  = games
 #-INCLUDE compiler.2020
 
 # NetHack sources control
-NHCFLAGS+=-DDLB
+#NHCFLAGS+=-DDLB
 NHCFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
 NHCFLAGS+=-DDEFAULT_WINDOW_SYS=\"$(WANT_DEFAULT)\"
 NHCFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
index db0b1f41aa35b4fab826467daf92ab9c6092cda1..aab866d642c84419431a8f67deca88ace700c3f8 100644 (file)
 #include <string.h>
 #endif
 
-static void grow_ld(libdir **, int *, int);
 static void xexit(int) NORETURN;
+char *eos(char *); /* also used by dlb.c */
+FILE *fopen_datafile(const char *, const char *);
 
 #ifdef DLB
 #ifdef DLBLIB
+static void grow_ld(libdir **, int *, int);
 
 #define DLB_DIRECTORY "Directory" /* name of lib directory */
 #define LIBLISTFILE "dlb.lst"     /* default list file */
@@ -27,9 +29,6 @@ static void xexit(int) NORETURN;
 extern boolean open_library(const char *, library *);
 extern void close_library(library *);
 
-char *eos(char *); /* also used by dlb.c */
-FILE *fopen_datafile(const char *, const char *);
-
 static void Write(int, char *, long);
 static void usage(void) NORETURN;
 static void verbose_help(void) NORETURN;
@@ -128,14 +127,8 @@ Write(int out, char *buf, long len)
         xexit(EXIT_FAILURE);
     }
 }
-
-char *
-eos(char *s)
-{
-    while (*s)
-        s++;
-    return s;
-}
+#endif /* DLBLIB */
+#endif /* DLB */
 
 /* open_library(dlb.c) needs this (which normally comes from src/files.c) */
 FILE *
@@ -144,11 +137,24 @@ fopen_datafile(const char *filename, const char *mode)
     return fopen(filename, mode);
 }
 
-#endif /* DLBLIB */
-#endif /* DLB */
+       char *
+eos(char *s)
+{
+    while (*s)
+        s++;
+    return s;
+}
 
 int
-main(int argc, char **argv)
+main(int argc 
+#ifndef DLB
+     UNUSED 
+#endif
+     , char **argv
+#ifndef DLB
+     UNUSED
+#endif
+     )
 {
 #ifdef DLB
 #ifdef DLBLIB