replace NOTPARMDECL with TPARM_WORKAROUND
The old logic used a negative check to emit an extern declaration for tparm(). This guarded against old platforms whose curses implementations did not declare their own functions. If there are still any platforms left that need this declaration, they can set TPARM_WORKAROUND to get the old behavior back.
This commit is contained in:
@@ -246,10 +246,10 @@ Notes:
|
||||
|
||||
13. If you get a compiler warning about 'get_colors()' being implicitly
|
||||
declared, try uncommenting NEED_GET_COLORS_DECL in unixconf.h.
|
||||
If you get a compiler complaint about tparmdecl() having conflicting
|
||||
declarations, add '#define NOTPARMDECL' to unixconf.h or '-DNOTPARMDECL'
|
||||
to CFLAGS in src/Makefile. (The hints files for Mac OSX already do the
|
||||
latter.)
|
||||
If you get a compiler warning about tparm() being implicitly
|
||||
declared, add '#define TPARM_WORKAROUND' to unixconf.h or
|
||||
'-DTPARM_WORKAROUND' to CFLAGS. (This should not be needed
|
||||
on any modern system.)
|
||||
|
||||
# NetHack 5.0 Install.unx $NHDT-Date: 1577568915 2019/12/28 21:35:15 $ $NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.14 $
|
||||
# Copyright (c) 2012 by Kenneth Lorber, Kensington, Maryland
|
||||
|
||||
@@ -2219,7 +2219,6 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = (
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2301,7 +2300,6 @@
|
||||
NH_UTIL_DIR = "$(NH_ROOT_DIR)/util";
|
||||
OTHER_CFLAGS = (
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2332,7 +2330,6 @@
|
||||
OTHER_CFLAGS = (
|
||||
"-Wno-ambiguous-macro",
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2366,7 +2363,6 @@
|
||||
OTHER_CFLAGS = (
|
||||
"-Wno-ambiguous-macro",
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2415,7 +2411,6 @@
|
||||
OTHER_CFLAGS = (
|
||||
"-DMINIMAL_FOR_RECOVER",
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2442,7 +2437,6 @@
|
||||
OTHER_CFLAGS = (
|
||||
"-DMINIMAL_FOR_RECOVER",
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2498,7 +2492,6 @@
|
||||
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
|
||||
OTHER_CFLAGS = (
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
@@ -2535,7 +2528,6 @@
|
||||
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
|
||||
OTHER_CFLAGS = (
|
||||
"-DNOMAIL",
|
||||
"-DNOTPARMDECL",
|
||||
"-DDEFAULT_WINDOW_SYS=\\\"tty\\\"",
|
||||
"-DDLB",
|
||||
"-DGREPPATH=\\\"/usr/bin/grep\\\"",
|
||||
|
||||
@@ -49,7 +49,7 @@ endif
|
||||
#CC= clang
|
||||
#CXX=clang++ -std=gnu++11
|
||||
|
||||
CFLAGS=$(CCFLAGS) -I../include -DNOTPARMDECL
|
||||
CFLAGS=$(CCFLAGS) -I../include
|
||||
CFLAGS+=-Wall -Wextra \
|
||||
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
||||
CFLAGS+=-pedantic
|
||||
@@ -133,7 +133,7 @@ endif # clang-specific ends here
|
||||
|
||||
ifdef MAKEFILE_SRC
|
||||
ifdef CPLUSPLUS_NEEDED
|
||||
CCXXFLAGS = -g -I../include -DNOTPARMDECL
|
||||
CCXXFLAGS = -g -I../include
|
||||
CCXXFLAGS+=-Wall -Wextra -Wno-missing-field-initializers \
|
||||
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
||||
CCXXFLAGS+=-pedantic
|
||||
|
||||
@@ -338,8 +338,8 @@ WASM_CFLAGS += -Wshadow
|
||||
# Nethack C flags
|
||||
WASM_CFLAGS += $(WINCFLAGS) #WINCFLAGS set from multiw-2.500
|
||||
WASM_CFLAGS += -DSYSCF -DSYSCF_FILE=\"/sysconf\" -DSECURE -DNHUUID
|
||||
#WASM_CFLAGS += -g -I../include -DNOTPARMDECL
|
||||
WASM_CFLAGS += -I../include -DNOTPARMDECL
|
||||
#WASM_CFLAGS += -g -I../include
|
||||
WASM_CFLAGS += -I../include
|
||||
# NetHack sources control
|
||||
WASM_CFLAGS += -DDLB
|
||||
WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ $specials = {
|
||||
# TIMED_DELAY DEF_MAILREADER DEF_PAGER NO_SIGNAL PC_LOCKING LATTICE __GO32__
|
||||
# msleep NO_FILE_LINKS bsdi HPUX AMIFLUSH
|
||||
# SCREEN_BIOS SCREEN_DJGPPFAST SCREEN_VGA SCREEN_8514
|
||||
# EXEPATH NOTSTDC SELECTSAVED NOTPARMDECL
|
||||
# EXEPATH NOTSTDC SELECTSAVE
|
||||
|
||||
# constants
|
||||
@const_true = qw/1 TRUE/;
|
||||
|
||||
+1
-2
@@ -895,8 +895,7 @@ cl_eos(void) /* free after Robert Viduya */
|
||||
|
||||
#include <curses.h>
|
||||
|
||||
#if !defined(LINUX) && !defined(__FreeBSD__) && !defined(__OpenBSD__) \
|
||||
&& !defined(NOTPARMDECL)
|
||||
#if defined(TPARM_WORKAROUND)
|
||||
extern char *tparm();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user