devel/uqm uqm-decls.patch, NONE, 1.1 uqm-lvalues.patch, NONE, 1.1 uqm-macros.patch, NONE, 1.1 uqm.spec, 1.5, 1.6

Ville Skytta (scop) fedora-extras-commits at redhat.com
Fri Mar 18 13:20:42 UTC 2005


Author: scop

Update of /cvs/extras/devel/uqm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30436

Modified Files:
	uqm.spec 
Added Files:
	uqm-decls.patch uqm-lvalues.patch uqm-macros.patch 
Log Message:
Fix FC4 build.

uqm-decls.patch:

--- NEW FILE uqm-decls.patch ---
diff -Naru uqm-0.3.orig/src/sc2code/comm/starbas/starbas.c uqm-0.3/src/sc2code/comm/starbas/starbas.c
--- uqm-0.3.orig/src/sc2code/comm/starbas/starbas.c	2003-06-22 03:55:59.000000000 +0300
+++ uqm-0.3/src/sc2code/comm/starbas/starbas.c	2005-03-18 14:40:50.000000000 +0200
@@ -552,6 +552,8 @@
 	Response (enough_history, NeedInfo);
 }
 
+static void TellMission (RESPONSE_REF R);
+
 static void
 DefeatUrquan (RESPONSE_REF R)
 {
@@ -560,7 +562,6 @@
 #define HOW_ALLY_AGAINST_URQUAN (1 << 2)
 #define HOW_STRONG_AGAINST_URQUAN (1 << 3)
 	static BYTE DefeatMask = 0;
-	static void TellMission (RESPONSE_REF R);
 
 	if (PLAYER_SAID (R, how_defeat))
 	{
@@ -1635,6 +1636,8 @@
 	}
 }
 
+static void SellMinerals (RESPONSE_REF R);
+
 static void
 NormalStarbase (RESPONSE_REF R)
 {
@@ -1716,8 +1719,6 @@
 
 	if (GLOBAL_SIS (TotalElementMass))
 	{
-		static void SellMinerals (RESPONSE_REF R);
-
 		Response (have_minerals, SellMinerals);
 	}
 	if (DiscussDevices (FALSE))
diff -Naru uqm-0.3.orig/src/sc2code/gameopt.c uqm-0.3/src/sc2code/gameopt.c
--- uqm-0.3.orig/src/sc2code/gameopt.c	2003-09-05 00:32:06.000000000 +0300
+++ uqm-0.3/src/sc2code/gameopt.c	2005-03-18 14:39:21.000000000 +0200
@@ -188,6 +188,8 @@
 
 static BOOLEAN DoSettings (PMENU_STATE pMS);
 
+static BOOLEAN DoNaming (PMENU_STATE pMS);
+
 static BOOLEAN
 DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
 {
@@ -196,7 +198,6 @@
 	TEXT lf;
 	COLOR BackGround, ForeGround;
 	FONT Font;
-	static BOOLEAN DoNaming (PMENU_STATE pMS);
 
 	SetSemaphore (GraphicsSem);
 
diff -Naru uqm-0.3.orig/src/sc2code/melee.c uqm-0.3/src/sc2code/melee.c
--- uqm-0.3.orig/src/sc2code/melee.c	2003-08-26 06:22:58.000000000 +0300
+++ uqm-0.3/src/sc2code/melee.c	2005-03-18 14:40:53.000000000 +0200
@@ -201,13 +201,13 @@
 	DrawMeleeIcon (1 + (8 * (1 - which_side)) + (HiLite ? 4 : 0) + which_icon);
 }
 
+static void DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip);
+
 static void
 DrawPickFrame (PMELEE_STATE pMS)
 {
 	FRAME F;
 	RECT r, r0, r1, ship_r;
-	static void DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE
-			NewStarShip);
 				
 	GetShipBox (&r0, 0, 0, 0),
 	GetShipBox (&r1, 1, NUM_MELEE_ROWS - 1, NUM_MELEE_COLUMNS - 1),

uqm-lvalues.patch:

--- NEW FILE uqm-lvalues.patch ---
diff -Naru uqm-0.3.orig/src/sc2code/libs/decomp/lzencode.c uqm-0.3/src/sc2code/libs/decomp/lzencode.c
--- uqm-0.3.orig/src/sc2code/libs/decomp/lzencode.c	2003-07-08 21:17:39.000000000 +0300
+++ uqm-0.3/src/sc2code/libs/decomp/lzencode.c	2005-03-18 14:43:35.000000000 +0200
@@ -60,9 +60,9 @@
 		*(MEM_HANDLE *)lson = h;
 		lson = (PSWORD)((PBYTE)lson + sizeof (h));
 		rson = lson;
-		((BYTE *) rson) += (N + 1) * sizeof (lson[0]);
+		rson = ((BYTE *) rson) + (N + 1) * sizeof (lson[0]);
 		dad = rson;
-		((BYTE *) dad) += (N + 257) * sizeof (rson[0]);
+		dad = ((BYTE *) dad) + (N + 257) * sizeof (rson[0]);
 
 		for (i = N + 1; i <= N + 256; i++)
 			rson[i] = NIL; /* root */
diff -Naru uqm-0.3.orig/src/sc2code/libs/resource/loadres.c uqm-0.3/src/sc2code/libs/resource/loadres.c
--- uqm-0.3.orig/src/sc2code/libs/resource/loadres.c	2003-07-08 21:17:39.000000000 +0300
+++ uqm-0.3/src/sc2code/libs/resource/loadres.c	2005-03-18 14:43:13.000000000 +0200
@@ -62,7 +62,7 @@
 					if ((int)(ReadResFile (RDPtr, 1, num_read, fp)) != (int)num_read)
 						break;
 				}
-				((BYTE *) RDPtr) += num_read;
+				RDPtr = ((BYTE *) RDPtr) + num_read;
 			} while (length -= num_read);
 
 			UnlockResourceData (RData);
diff -Naru uqm-0.3.orig/src/sc2code/libs/strings/strings.c uqm-0.3/src/sc2code/libs/strings/strings.c
--- uqm-0.3.orig/src/sc2code/libs/strings/strings.c	2003-01-19 01:08:39.000000000 +0200
+++ uqm-0.3/src/sc2code/libs/strings/strings.c	2005-03-18 14:45:07.000000000 +0200
@@ -176,8 +176,7 @@
 			StringAddr = 0;
 		else
 		{
-			StringAddr = (STRINGPTR)StringTablePtr;
-			((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex];
+			StringAddr = (STRINGPTR)StringTablePtr + StringTablePtr->StringOffsets[StringIndex];
 		}
 		UnlockStringTable (StringTable);
 	}
@@ -209,8 +208,7 @@
 			StringAddr = 0;
 		else
 		{
-			StringAddr = (STRINGPTR)StringTablePtr;
-			((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex];
+			StringAddr = (STRINGPTR)StringTablePtr + StringTablePtr->StringOffsets[StringIndex];
 		}
 		UnlockStringTable (StringTable);
 	}
@@ -233,8 +231,7 @@
 
 		StringIndex = STRING_INDEX (String);
 		LockStringTable (StringTable, &StringTablePtr);
-		StringAddr = (STRINGPTR)StringTablePtr;
-		((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex];
+		StringAddr = (STRINGPTR)StringTablePtr + StringTablePtr->StringOffsets[StringIndex];
 		UnlockStringTable (StringTable);
 	}
 
diff -Naru uqm-0.3.orig/src/sc2code/libs/uio/uiostream.c uqm-0.3/src/sc2code/libs/uio/uiostream.c
--- uqm-0.3.orig/src/sc2code/libs/uio/uiostream.c	2003-07-13 02:02:55.000000000 +0300
+++ uqm-0.3/src/sc2code/libs/uio/uiostream.c	2005-03-18 14:45:05.000000000 +0200
@@ -141,7 +141,7 @@
 
 		numRead = minu(stream->readEnd - stream->bufPtr, bytesToRead);
 		memcpy(buf, stream->bufPtr, numRead);
-		(char *) buf += numRead;
+		buf = (char *) buf + numRead;
 		stream->bufPtr += numRead;
 		bytesToRead -= numRead;
 		bytesRead += numRead;

uqm-macros.patch:

--- NEW FILE uqm-macros.patch ---
diff -Naru uqm-0.3.orig/src/sc2code/libs/uio/ioaux.c uqm-0.3/src/sc2code/libs/uio/ioaux.c
--- uqm-0.3.orig/src/sc2code/libs/uio/ioaux.c	2003-08-31 21:40:01.000000000 +0300
+++ uqm-0.3/src/sc2code/libs/uio/ioaux.c	2005-03-18 14:46:39.000000000 +0200
@@ -182,7 +182,7 @@
 			// not allocated on the stack, as this function may be called
 			// from a thread with little stack space.
 	while (1) {
-		numInBuf = fromHandler->read(fromHandle, buf, BUFSIZE);
+		numInBuf = (fromHandler->read)(fromHandle, buf, BUFSIZE);
 		if (numInBuf == -1)
 		{
 			if (errno == EINTR)
diff -Naru uqm-0.3.orig/src/sc2code/libs/uio/io.c uqm-0.3/src/sc2code/libs/uio/io.c
--- uqm-0.3.orig/src/sc2code/libs/uio/io.c	2003-09-05 06:12:18.000000000 +0300
+++ uqm-0.3/src/sc2code/libs/uio/io.c	2005-03-18 14:46:39.000000000 +0200
@@ -680,7 +680,7 @@
 
 ssize_t
 uio_read(uio_Handle *handle, void *buf, size_t count) {
-	return handle->root->handler->read(handle, buf, count);
+	return (handle->root->handler->read)(handle, buf, count);
 }
 
 int


Index: uqm.spec
===================================================================
RCS file: /cvs/extras/devel/uqm/uqm.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- uqm.spec	5 Mar 2005 19:55:54 -0000	1.5
+++ uqm.spec	18 Mar 2005 13:20:40 -0000	1.6
@@ -1,6 +1,6 @@
 Name:           uqm
 Version:        0.3
-Release:        3
+Release:        4
 Summary:        The Ur-Quan Masters, a port of the classic game Star Control II
 
 Group:          Amusements/Games
@@ -14,6 +14,9 @@
 # Patch2: http://uqm.stack.nl/cgi-bin/bugs/show_bug.cgi?id=363#c20
 Patch2:         %{name}-comms-bluescreen.patch
 Patch3:         %{name}-gcc34MM.patch
+Patch4:         %{name}-decls.patch
+Patch5:         %{name}-lvalues.patch
+Patch6:         %{name}-macros.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  SDL-devel >= 1.2.3, SDL_image-devel, SDL_mixer-devel
@@ -34,6 +37,9 @@
 %patch1 -p0
 %patch2 -p0
 %patch3
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 
 %build
@@ -87,6 +93,9 @@
 
 
 %changelog
+* Fri Mar 18 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.3-4
+- Fix FC4 build.
+
 * Sat Dec 11 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.3-3
 - Fix build on FC3.
 - Improve comment in desktop entry file, add Finnish translation.




More information about the fedora-extras-commits mailing list