diff options
author | alepulver <alepulver@FreeBSD.org> | 2007-03-23 00:21:18 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2007-03-23 00:21:18 +0800 |
commit | 4a5da1ccae711200d73681de986c09612a653518 (patch) | |
tree | 438117f44e4d728f081f16f2b788ed114596296f /games/bfm | |
parent | 1dd6210f86a84815a6c1c812face699760780736 (diff) | |
download | freebsd-ports-gnome-4a5da1ccae711200d73681de986c09612a653518.tar.gz freebsd-ports-gnome-4a5da1ccae711200d73681de986c09612a653518.tar.zst freebsd-ports-gnome-4a5da1ccae711200d73681de986c09612a653518.zip |
- Fix building with GCC 4.x.
Reported by: pointyhat
Diffstat (limited to 'games/bfm')
-rw-r--r-- | games/bfm/files/patch-src__editor__editloop.c | 11 | ||||
-rw-r--r-- | games/bfm/files/patch-src__include__myendian.h | 20 | ||||
-rw-r--r-- | games/bfm/files/patch-src__unit__unittype.c | 24 |
3 files changed, 55 insertions, 0 deletions
diff --git a/games/bfm/files/patch-src__editor__editloop.c b/games/bfm/files/patch-src__editor__editloop.c new file mode 100644 index 000000000000..b65ab340f691 --- /dev/null +++ b/games/bfm/files/patch-src__editor__editloop.c @@ -0,0 +1,11 @@ +--- ./src/editor/editloop.c.orig Thu Apr 14 12:09:25 2005 ++++ ./src/editor/editloop.c Thu Mar 22 10:50:07 2007 +@@ -2043,7 +2043,7 @@ + ---------------------------------------------------------------------------*/ + + // Deletes all units, changes player properties and fills map with grass. +-local int EditorClearMap(void) ++int EditorClearMap(void) + { + Unit* unit; + int mz; diff --git a/games/bfm/files/patch-src__include__myendian.h b/games/bfm/files/patch-src__include__myendian.h new file mode 100644 index 000000000000..df135322d8f5 --- /dev/null +++ b/games/bfm/files/patch-src__include__myendian.h @@ -0,0 +1,20 @@ +--- ./src/include/myendian.h.orig Thu Apr 14 12:09:25 2005 ++++ ./src/include/myendian.h Thu Mar 22 10:53:40 2007 +@@ -102,7 +102,7 @@ + + #else + +-#define FetchLE16(p) SDL_SwapLE16(*((unsigned short*)(p))++) ++inline Uint16 FetchLE16(Uint16 **p); + + #endif + +@@ -122,7 +122,7 @@ + + #else + +-#define FetchLE32(p) SDL_SwapLE32(*((unsigned int*)(p))++) ++inline Uint32 FetchLE32(Uint32 **p); + + #endif + diff --git a/games/bfm/files/patch-src__unit__unittype.c b/games/bfm/files/patch-src__unit__unittype.c new file mode 100644 index 000000000000..29a10ea006a9 --- /dev/null +++ b/games/bfm/files/patch-src__unit__unittype.c @@ -0,0 +1,24 @@ +--- ./src/unit/unittype.c.orig Thu Apr 14 12:09:25 2005 ++++ ./src/unit/unittype.c Thu Mar 22 10:54:41 2007 +@@ -263,7 +263,20 @@ + } + + /// Macro to fetch an 8bit value, to have some looking 8/16/32 bit funcs. +-#define Fetch8(p) (*((unsigned char*)(p))++) ++inline Uint8 Fetch8(Uint8 **p) ++{ ++ return (*p++); ++} ++ ++inline Uint16 FetchLE16(Uint16 **p) ++{ ++ return (SDL_SwapLE16(*p++)); ++} ++ ++inline Uint32 FetchLE32(Uint32 **p) ++{ ++ return (SDL_SwapLE32(*p++)); ++} + + /** + ** Parse UDTA area from puds. |