win32 build

- force time_t to be 32 bits via Makefile. (If struct u gets changed to not
store a time_t field, this can be removed).

- Latest Windows SDK (supporting Vista) causes a warning due to
a prototype in sys/winnt/nttty. Since we don't actually link with that
function and rely on a DLL find procedure at run time, comment out
the prototype. The function is now officially in the SDK in the
windows header files anyway.
This commit is contained in:
nethack.allison
2007-01-05 23:08:46 +00:00
parent 448b7cc7b6
commit 76345fb40c
2 changed files with 13 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
# SCCS Id: @(#)Makefile.msc 3.5 $Date$
# Copyright (c) NetHack PC Development Team 1993-2006
# Copyright (c) NetHack PC Development Team 1993-2007
#
# NetHack 3.5.x Makefile for MS Visual C++
#
@@ -218,7 +218,8 @@ cdebug = -Zi -Od
# Util builds
#==========================================
cflagsUtil = $(cdebug) $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG)
cflagsUtil = $(cdebug) $(cflags) /D_USE_32BIT_TIME_T $(INCLDIR) \
$(WINPFLAG) $(DLBFLG)
lflagsUtil = $(ldebug) $(lflags) $(conlibs)
#==========================================
@@ -231,14 +232,14 @@ LIBS= user32.lib winmm.lib $(ZLIB)
!IF ("$(GRAPHICAL)"=="Y")
cflagsGame = $(cdebug) $(cflags) $(guiflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) \
$(GAMEPDBFILE) $(GAMEMAPFILE)
cflagsGame = $(cdebug) $(cflags) /D_USE_32BIT_TIME_T $(guiflags) $(INCLDIR) \
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE)
lflagsGame = $(ldebug) $(lflags) $(guilibs)
!ELSE
cflagsGame = $(cdebug) $(cflags) $(conflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) \
$(GAMEPDBFILE) $(GAMEMAPFILE)
cflagsGame = $(cdebug) $(cflags) /D_USE_32BIT_TIME_T $(conflags) $(INCLDIR) \
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE)
lflagsGame = $(ldebug) $(lflags) $(conlibs)
!ENDIF
@@ -677,6 +678,11 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
#==========================================
# Makedefs Stuff
#==========================================
$(U)nhsizes.exe: $(O)nhsizes.o
$(link) $(lflagsUtil) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c
$(CC) $(cflagsUtil) -Fo$@ nhsizes.c
$(U)makedefs.exe: $(MAKEOBJS)
$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS)

View File

@@ -1336,7 +1336,7 @@ adjust_palette(VOID_ARGS)
/*
/* only in Win2k+ (use FindWindow for NT4) */
HWND WINAPI GetConsoleWindow();
/* HWND WINAPI GetConsoleWindow(); */
/* Undocumented console message */
#define WM_SETCONSOLEINFO (WM_USER+201)