diff options
author | glewis <glewis@FreeBSD.org> | 2003-08-08 06:21:48 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2003-08-08 06:21:48 +0800 |
commit | 7aa1e77dca894e0c281c1b64b9040334358f875d (patch) | |
tree | 7e2bed46d323cf957369e7c4eda9e8b4273579a8 /games/moria | |
parent | f183d7fa02c16e649336d960a65f98e194c30fef (diff) | |
download | freebsd-ports-gnome-7aa1e77dca894e0c281c1b64b9040334358f875d.tar.gz freebsd-ports-gnome-7aa1e77dca894e0c281c1b64b9040334358f875d.tar.zst freebsd-ports-gnome-7aa1e77dca894e0c281c1b64b9040334358f875d.zip |
. Make this compile cleanly on current. Mainly we want to use time_t
for time(), not long.
Pointed out by: Pav Lucistnik <pav@oook.cz>
Diffstat (limited to 'games/moria')
-rw-r--r-- | games/moria/files/patch-source::death.c | 34 | ||||
-rw-r--r-- | games/moria/files/patch-source::main.c | 31 | ||||
-rw-r--r-- | games/moria/files/patch-source::misc1.c | 38 |
3 files changed, 103 insertions, 0 deletions
diff --git a/games/moria/files/patch-source::death.c b/games/moria/files/patch-source::death.c new file mode 100644 index 000000000000..3e7795add028 --- /dev/null +++ b/games/moria/files/patch-source::death.c @@ -0,0 +1,34 @@ +$FreeBSD$ + +--- source/death.c.orig Thu Aug 7 16:02:45 2003 ++++ source/death.c Thu Aug 7 16:06:12 2003 +@@ -123,6 +123,7 @@ + #include <stdlib.h> + #endif + ++#ifndef __FreeBSD__ + #ifndef VMS + #ifndef MAC + #if !defined(ATARIST_MWC) && !defined(AMIGA) +@@ -130,18 +131,19 @@ + #endif + #endif + #endif ++#endif + + static void date(day) + char *day; + { + register char *tmp; +-#ifdef MAC ++#if defined(MAC) || defined(__FreeBSD__) + time_t clockvar; + #else + long clockvar; + #endif + +-#ifdef MAC ++#if defined(MAC) || defined(__FreeBSD__) + clockvar = time((time_t *) 0); + #else + clockvar = time((long *) 0); diff --git a/games/moria/files/patch-source::main.c b/games/moria/files/patch-source::main.c new file mode 100644 index 000000000000..a07015ed4d03 --- /dev/null +++ b/games/moria/files/patch-source::main.c @@ -0,0 +1,31 @@ +$FreeBSD$ + +--- source/main.c.orig Thu Jul 21 19:47:27 1994 ++++ source/main.c Thu Aug 7 16:12:13 2003 +@@ -88,6 +88,7 @@ + #include <time.h> + #endif + ++#ifndef __FreeBSD__ + #ifndef VMS + #ifndef MAC + #ifndef GEMDOS +@@ -98,6 +99,9 @@ + char *getenv(); + #endif + #endif ++#else ++#include <stdlib.h> ++#endif + + #ifndef MAC + #ifndef AMIGA +@@ -360,7 +364,7 @@ + else + { /* Create character */ + create_character(); +-#ifdef MAC ++#if defined(MAC) || defined(__FreeBSD__) + birth_date = time ((time_t *)0); + #else + birth_date = time ((long *)0); diff --git a/games/moria/files/patch-source::misc1.c b/games/moria/files/patch-source::misc1.c new file mode 100644 index 000000000000..313c932c4a99 --- /dev/null +++ b/games/moria/files/patch-source::misc1.c @@ -0,0 +1,38 @@ +$FreeBSD$ + +--- source/misc1.c.orig Thu Aug 7 16:07:21 2003 ++++ source/misc1.c Thu Aug 7 16:08:58 2003 +@@ -28,7 +28,7 @@ + #endif + #endif + +-#if !defined(ATARIST_MWC) && !defined(MAC) && !defined(VMS) && !defined(AMIGA) ++#if !defined(ATARIST_MWC) && !defined(MAC) && !defined(VMS) && !defined(AMIGA) && !defined(__FreeBSD__) + long time(); + #endif + struct tm *localtime(); +@@ -45,7 +45,7 @@ + register int32u clock_var; + + if (seed == 0) +-#ifdef MAC ++#if defined(MAC) || defined(__FreeBSD__) + clock_var = time((time_t *)0); + #else + clock_var = time((long *)0); +@@ -89,10 +89,14 @@ + int check_time() + { + #ifdef MORIA_HOU ++#if defined(MAC) || defined(__FreeBSD__) ++ time_t clock_var; ++#else + long clock_var; ++#endif + register struct tm *tp; + +-#ifdef MAC ++#if defined(MAC) || defined(__FreeBSD__) + clock_var = time((time_t *)0); + #else + clock_var = time((long *)0); |