From a73f83276c3e52146af003c70a099f9a3e8934f5 Mon Sep 17 00:00:00 2001 From: John Marino Date: Mon, 16 Mar 2015 19:01:40 +0000 Subject: [PATCH] www/aws: Fix dispatcher-timer bug discovered by gcc5-aux --- www/aws/Makefile | 2 +- ...xtended_aws-services-dispatchers-timer.adb | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 www/aws/files/patch-src_extended_aws-services-dispatchers-timer.adb diff --git a/www/aws/Makefile b/www/aws/Makefile index 10b4c15dec75..53184bd395cc 100644 --- a/www/aws/Makefile +++ b/www/aws/Makefile @@ -3,7 +3,7 @@ PORTNAME= aws PORTVERSION= 3.2.0.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www MASTER_SITES= http://downloads.dragonlace.net/src/ diff --git a/www/aws/files/patch-src_extended_aws-services-dispatchers-timer.adb b/www/aws/files/patch-src_extended_aws-services-dispatchers-timer.adb new file mode 100644 index 000000000000..34373bacb4f5 --- /dev/null +++ b/www/aws/files/patch-src_extended_aws-services-dispatchers-timer.adb @@ -0,0 +1,37 @@ +--- src/extended/aws-services-dispatchers-timer.adb.orig 2014-05-15 19:48:07 UTC ++++ src/extended/aws-services-dispatchers-timer.adb +@@ -480,7 +480,11 @@ package body AWS.Services.Dispatchers.Ti + + procedure Unregister + (Dispatcher : in out Handler; +- Name : String) is ++ Name : String) ++ is ++ use type Period_Table.Cursor; ++ ++ Pos : Period_table.Cursor := Period_Table.No_Element; + begin + for Cursor in Dispatcher.Table.Iterate loop + declare +@@ -488,13 +492,18 @@ package body AWS.Services.Dispatchers.Ti + begin + if To_String (Item.Name) = Name then + Unchecked_Free (Item); +- Period_Table.Delete (Dispatcher.Table, Cursor); +- return; ++ Pos := Cursor; ++ exit; + end if; + end; + end loop; + +- raise Constraint_Error with "Timer distpatcher " & Name & " not found"; ++ if Pos = Period_Table.No_Element then ++ raise Constraint_Error ++ with "Timer distpatcher " & Name & " not found"; ++ else ++ Period_Table.Delete (Dispatcher.Table, Pos); ++ end if; + end Unregister; + + ------------