[PATCH] soup: union initialization should use named initializers (#32833)

Jeremy Katz <[email protected]> 24 Oct 2002 15:39:24 -0400
Newsgroups gmane.comp.gnome.evolution.patches,gmane.comp.gnome.ximian.soup
Message-ID <[email protected]>
soup does a cast from char * to a gint in a union initialization which
won't work for 64-bit platforms.  This patch changes to using named
initializers for the union.  Patch is against 0.7.4 since that's what
evolution 1.2 beta is building against -- a very similar fix is needed
for HEAD.

Jeremy

--- soup-0.7.4/src/libsoup/soup-message.c.initializer	2002-04-10 12:33:17.000000000 -0400
+++ soup-0.7.4/src/libsoup/soup-message.c	2002-10-24 15:31:54.000000000 -0400
@@ -922,7 +922,7 @@
 		redirect_handler, 
 		NULL, 
 		RESPONSE_HEADER_HANDLER, 
-		{ (guint) "Location" }
+		{ .header = "Location" }
 	},
 	/* 
 	 * Handle authorization.
@@ -932,7 +932,7 @@
 		(SoupCallbackFn) authorize_handler, 
 		GINT_TO_POINTER (FALSE), 
 		RESPONSE_ERROR_CODE_HANDLER, 
-		{ 401 }
+		{ .errorcode = 401 }
 	},
 	/* 
 	 * Handle proxy authorization.
@@ -942,7 +942,7 @@
 		(SoupCallbackFn) authorize_handler, 
 		GINT_TO_POINTER (TRUE), 
 		RESPONSE_ERROR_CODE_HANDLER, 
-		{ 407 }
+		{ .errorcode = 407 }
 	},
 	{ 0 }
 };
--- soup-0.7.4/ChangeLog.initializer	2002-10-24 15:15:15.000000000 -0400
+++ soup-0.7.4/ChangeLog	2002-10-24 15:33:59.000000000 -0400
@@ -0,0 +1,5 @@
+2002-10-24  Jeremy Katz  <[email protected]>
+
+	* src/libsoup/soup-message.c (global_handlers): Use C99 union 
+	initialization.
+