]> granicus.if.org Git - nethack/commitdiff
win32 build
authornethack.allison <nethack.allison>
Fri, 5 Jan 2007 23:08:46 +0000 (23:08 +0000)
committernethack.allison <nethack.allison>
Fri, 5 Jan 2007 23:08:46 +0000 (23:08 +0000)
- 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.

sys/winnt/Makefile.msc
sys/winnt/nttty.c

index 414340c396bbcfe9b09170d2fd65dbc8ea7ab929..7e04f929fd97b16aec1ae4e93e1c642691612368 100644 (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)
index 368c42af921fc22ac16a77a9a0fe58f61339d947..24bacbcf462a39d91c412ff0f15f7ab15c9ef918 100644 (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)