Merge branch 'NetHack-3.7' into twitch-interact
This commit is contained in:
@@ -14,7 +14,7 @@ CCFLAGS = -g
|
||||
|
||||
#If you want to force use of one particular set of compilers, do it
|
||||
#here, ahead of the detection, so that the detection will match your
|
||||
#choice and set variables CCISCLANG, GCCGTEQ, CLANGPPGTEQ9 etc.
|
||||
#choice and set variables CCISCLANG, CCISGCC, GCCGTEQ, CLANGPPGTEQ9 etc.
|
||||
#accordingly.
|
||||
#
|
||||
#CC= gcc
|
||||
@@ -41,7 +41,7 @@ endif
|
||||
# If you want to override the compiler detection just carried out
|
||||
# uncomment one of the following pairs. Note, however, that
|
||||
# doing this after the detection above will likely result in
|
||||
# mismatched variable values for CCISCLANG, GCCGTEQ, CLANGPPGTEQ9 etc.
|
||||
# mismatched variable values for CCISCLANG, CCISGCC, GCCGTEQ, CLANGPPGTEQ9 etc.
|
||||
#
|
||||
#CC= gcc
|
||||
#CXX= g++ -std-gnu++11
|
||||
@@ -72,8 +72,17 @@ CFLAGS+=-Wstrict-prototypes
|
||||
CFLAGS+=-Wnonnull
|
||||
|
||||
#detection of clang vs gcc
|
||||
CCISCLANG := $(shell echo `$(CC) --version` | grep clang)
|
||||
ifeq "$(CCISCLANG)" ""
|
||||
CCTEST := $(shell echo `$(CC) --version` | grep clang)
|
||||
ifneq "$(CCTEST)" ""
|
||||
CCISCLANG=1
|
||||
CCISGCC=
|
||||
else
|
||||
CCISCLANG=
|
||||
CCISGCC=1
|
||||
endif
|
||||
#$(info CCISCLANG=$(CCISCLANG), CCISGCC=$(CCISGCC))
|
||||
|
||||
ifeq "$(CCISGCC)" "1"
|
||||
# gcc-specific follows
|
||||
CXX=g++ -std=gnu++11
|
||||
# get the version of gcc
|
||||
@@ -95,8 +104,8 @@ CFLAGS+=-Wimplicit-fallthrough
|
||||
#endif
|
||||
# end of gcc-specific
|
||||
else # gcc or clang?
|
||||
CXX=clang++ -std=gnu++11
|
||||
# clang-specific follows
|
||||
CXX=clang++ -std=gnu++11
|
||||
CLANGGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||
CLANGGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||
CLANGGTEQ21 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 21)
|
||||
|
||||
@@ -415,7 +415,7 @@ endif
|
||||
SYSCFLAGS=-DLUA_USE_LINUX
|
||||
ifdef GITSUBMODULES
|
||||
LUAFLAGS=CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
|
||||
ifneq "$(CCISCLANG)" ""
|
||||
ifeq "$(CCISCLANG)" "1"
|
||||
# clang
|
||||
LUAFLAGS +=CWARNGCC=''
|
||||
endif # clang
|
||||
|
||||
@@ -338,7 +338,7 @@ endif # WANT_LIBNH
|
||||
# this needs to be passed via make rather than defined in unixconf.h
|
||||
ifdef GITSUBMODULES
|
||||
LUAFLAGS=CC='$(CC)' MYCFLAGS=' -DLUA_USE_MACOSX'
|
||||
ifneq "$(CCISCLANG)" ""
|
||||
ifeq "$(CCISCLANG)" "1"
|
||||
# clang
|
||||
LUAFLAGS +=CWARNGCC=''
|
||||
endif # clang
|
||||
|
||||
@@ -123,10 +123,6 @@ main(int argc, char *argv[])
|
||||
dir = nh_getenv("HACKDIR");
|
||||
#endif /* CHDIR */
|
||||
program_state.early_options = 1;
|
||||
#ifdef ENHANCED_SYMBOLS
|
||||
if (argcheck(argc, argv, ARG_DUMPGLYPHIDS) == 2)
|
||||
exit(EXIT_SUCCESS);
|
||||
#endif
|
||||
/* handle -dalthackdir, -s <score stuff>, --version, --showpaths */
|
||||
early_options(&argc, &argv, &dir);
|
||||
program_state.early_options = 0;
|
||||
|
||||
@@ -139,8 +139,6 @@ GIT_AVAILABLE = N
|
||||
# if next line is commented out, full compiler command lines will be output
|
||||
Q=@
|
||||
|
||||
SKIP_NETHACKW = N
|
||||
|
||||
!IFNDEF LUA_VERSION
|
||||
LUAVER=5.4.8
|
||||
!ELSE
|
||||
|
||||
@@ -870,7 +870,7 @@ back_buffer_flip(void)
|
||||
do_anything |= do_wide_content;
|
||||
} else {
|
||||
#endif
|
||||
if (back->utf8str && front->utf8str
|
||||
if (back->utf8str[0] && front->utf8str[0]
|
||||
&& strcmp((const char *) back->utf8str,
|
||||
(const char *) front->utf8str))
|
||||
do_anything |= do_utf8_content;
|
||||
|
||||
@@ -167,12 +167,6 @@ MAIN(int argc, char *argv[])
|
||||
/* setting iflags.colorcount has to be after early_init()
|
||||
* because it zeros out all of iflags */
|
||||
hwnd = GetDesktopWindow();
|
||||
hdc = GetDC(hwnd);
|
||||
if (hdc) {
|
||||
bpp = GetDeviceCaps(hdc, BITSPIXEL);
|
||||
iflags.colorcount = (bpp >= 16) ? 16777216 : (bpp >= 8) ? 256 : 16;
|
||||
ReleaseDC(hwnd, hdc);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef DEBUG
|
||||
@@ -201,6 +195,15 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
#ifndef MSWIN_GRAPHICS
|
||||
early_init(argc, argv); /* already in WinMain for MSWIN_GRAPHICS */
|
||||
#endif
|
||||
|
||||
/* this must be done after early_init() because early_init()
|
||||
sets iflags to zero */
|
||||
hdc = GetDC(hwnd);
|
||||
if (hdc) {
|
||||
bpp = GetDeviceCaps(hdc, BITSPIXEL);
|
||||
iflags.colorcount = (bpp >= 16) ? 16777216 : (bpp >= 8) ? 256 : 16;
|
||||
ReleaseDC(hwnd, hdc);
|
||||
}
|
||||
gh.hname = "NetHack"; /* used for syntax messages */
|
||||
set_default_prefix_locations(
|
||||
argv[0]); /* must be re-done after initoptions_init()
|
||||
@@ -223,7 +226,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
|
||||
#ifdef EARLY_CONFIGFILE_PASS
|
||||
rcfile_interface_options();
|
||||
if (gc.chosen_windowtype && *gc.chosen_windowtype)
|
||||
if (*gc.chosen_windowtype)
|
||||
windowtype = gc.chosen_windowtype;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user