Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -441,9 +441,9 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \
|
||||
botl.c cmd.c dbridge.c decl.c detect.c dig.c display.c dlb.c do.c \
|
||||
do_name.c do_wear.c dog.c dogmove.c dokick.c dothrow.c drawing.c \
|
||||
dungeon.c eat.c end.c engrave.c exper.c explode.c extralev.c \
|
||||
files.c fountain.c hack.c hacklib.c invent.c light.c lock.c \
|
||||
mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c minion.c \
|
||||
mklev.c mkmap.c \
|
||||
files.c fountain.c hack.c hacklib.c invent.c isaac64.c light.c \
|
||||
lock.c mail.c makemon.c mapglyph.c mcastu.c mhitm.c mhitu.c \
|
||||
minion.c mklev.c mkmap.c \
|
||||
mkmaze.c mkobj.c mkroom.c mon.c mondata.c monmove.c monst.c \
|
||||
mplayer.c mthrowu.c muse.c music.c o_init.c objects.c objnam.c \
|
||||
options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \
|
||||
@@ -508,8 +508,8 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \
|
||||
bones.o botl.o cmd.o dbridge.o decl.o detect.o dig.o display.o dlb.o \
|
||||
do.o do_name.o do_wear.o dog.o dogmove.o dokick.o dothrow.o \
|
||||
drawing.o dungeon.o eat.o end.o engrave.o exper.o explode.o \
|
||||
extralev.o files.o fountain.o hack.o hacklib.o invent.o light.o \
|
||||
lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o \
|
||||
extralev.o files.o fountain.o hack.o hacklib.o invent.o isaac64.o \
|
||||
light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o \
|
||||
minion.o mklev.o mkmap.o \
|
||||
mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o \
|
||||
mplayer.o mthrowu.o muse.o music.o o_init.o objnam.o options.o \
|
||||
@@ -1013,6 +1013,7 @@ fountain.o: fountain.c $(HACK_H)
|
||||
hack.o: hack.c $(HACK_H)
|
||||
hacklib.o: hacklib.c $(HACK_H)
|
||||
invent.o: invent.c $(HACK_H)
|
||||
isaac64.o: isaac64.c ../include/isaac64.h ../include/integer.h
|
||||
light.o: light.c $(HACK_H) ../include/lev.h
|
||||
lock.o: lock.c $(HACK_H)
|
||||
mail.o: mail.c $(HACK_H) ../include/mail.h
|
||||
|
||||
@@ -69,7 +69,7 @@ CC=gcc
|
||||
#
|
||||
|
||||
#CFLAGS+=-W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic -Wno-long-long
|
||||
# As of LLVM build 2336.1.00, this gives dozens of spurious messages, so
|
||||
# leave it out by default.
|
||||
#CFLAGS+=-Wunreachable-code
|
||||
|
||||
@@ -69,7 +69,7 @@ CC=gcc
|
||||
#
|
||||
|
||||
#CFLAGS+=-W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic -Wno-long-long
|
||||
# As of LLVM build 2336.1.00, this gives dozens of spurious messages, so
|
||||
# leave it out by default.
|
||||
#CFLAGS+=-Wunreachable-code
|
||||
|
||||
@@ -53,7 +53,7 @@ GAMEGRP = games
|
||||
#WANT_SOURCE_INSTALL=1
|
||||
|
||||
#CC=gcc -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
|
||||
CC=gcc -Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic
|
||||
CC=gcc -Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic -Wno-long-long
|
||||
|
||||
#
|
||||
# You shouldn't need to change anything below here.
|
||||
|
||||
@@ -63,7 +63,7 @@ CC=gcc
|
||||
#
|
||||
|
||||
#CFLAGS+=-W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic -Wno-long-long
|
||||
# As of LLVM build 2336.1.00, this gives dozens of spurious messages, so
|
||||
# leave it out by default.
|
||||
#CFLAGS+=-Wunreachable-code
|
||||
|
||||
@@ -70,7 +70,7 @@ CC=gcc
|
||||
#
|
||||
|
||||
#CFLAGS+=-W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic
|
||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings -DGCC_WARN -ansi -pedantic -Wno-long-long
|
||||
# As of LLVM build 2336.1.00, this gives dozens of spurious messages, so
|
||||
# leave it out by default.
|
||||
#CFLAGS+=-Wunreachable-code
|
||||
|
||||
@@ -765,4 +765,36 @@ error:
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned long
|
||||
sys_random_seed()
|
||||
{
|
||||
unsigned long seed;
|
||||
unsigned long pid = (unsigned long) getpid();
|
||||
boolean no_seed = TRUE;
|
||||
#ifdef DEV_RANDOM
|
||||
FILE *fptr = NULL;
|
||||
|
||||
fptr = fopen(DEV_RANDOM, "r");
|
||||
if (fptr) {
|
||||
fread(&seed, sizeof(long), 1, fptr);
|
||||
has_strong_rngseed = TRUE; /* decl.c */
|
||||
no_seed = FALSE;
|
||||
fclose(fptr);
|
||||
} else {
|
||||
/* leaves clue, doesn't exit */
|
||||
paniclog("sys_random_seed", "falling back to weak seed");
|
||||
}
|
||||
#endif
|
||||
if (no_seed) {
|
||||
seed = (unsigned long) getnow(); /* time((TIME_type) 0) */
|
||||
/* Quick dirty band-aid to prevent PRNG prediction */
|
||||
if (pid) {
|
||||
if (!(pid & 3L))
|
||||
pid -= 1L;
|
||||
seed *= pid;
|
||||
}
|
||||
}
|
||||
return seed;
|
||||
}
|
||||
|
||||
/*unixmain.c*/
|
||||
|
||||
Reference in New Issue
Block a user