The unified diff between revisions [d88decc7..] and [101a9998..] is displayed below. It can also be downloaded as a raw diff.

#
#
# delete "examples/dsa/Makefile.local"
#
# delete "examples/dsa/README"
#
# delete "examples/dsa/client.adb"
#
# delete "examples/dsa/client.ads"
#
# delete "examples/dsa/echo/README"
#
# delete "examples/dsa/local.gpr"
#
# delete "examples/dsa/polyorb-partition_elaboration.adb"
#
# delete "examples/dsa/server.adb"
#
# delete "examples/dsa/server.ads"
#
# rename "examples/dsa/client_main.adb"
#     to "examples/dsa/demo/client_main.adb"
#
# rename "examples/dsa/matrices.adb"
#     to "examples/dsa/demo/matrices.adb"
#
# rename "examples/dsa/matrices.ads"
#     to "examples/dsa/demo/matrices.ads"
#
# rename "examples/dsa/rci.adb"
#     to "examples/dsa/demo/rci.adb"
#
# rename "examples/dsa/rci.ads"
#     to "examples/dsa/demo/rci.ads"
#
# rename "examples/dsa/rt.ads"
#     to "examples/dsa/demo/rt.ads"
#
# rename "examples/dsa/sp.ads"
#     to "examples/dsa/demo/sp.ads"
#
# rename "examples/dsa/testbed.cfg"
#     to "examples/dsa/demo/testbed.cfg"
#
# add_dir "examples/dsa/connections"
#
# add_dir "examples/dsa/demo"
#
# add_dir "examples/dsa/mailboxes"
#
# add_dir "testsuite/corba/performance/java"
#
# add_dir "testsuite/tests/corba"
#
# add_dir "testsuite/tests/corba/all_exceptions"
#
# add_dir "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_0"
#
# add_dir "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_1"
#
# add_dir "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_2"
#
# add_dir "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_3"
#
# add_dir "testsuite/tests/corba/benchs"
#
# add_dir "testsuite/tests/corba/benchs/CORBA_BENCHS_0"
#
# add_dir "testsuite/tests/corba/code_sets"
#
# add_dir "testsuite/tests/corba/code_sets/CODE_SETS_0"
#
# add_dir "testsuite/tests/corba/code_sets/CODE_SETS_1"
#
# add_dir "testsuite/tests/corba/domainmanager"
#
# add_dir "testsuite/tests/corba/domainmanager/DOMAINMANAGER_0"
#
# add_dir "testsuite/tests/corba/harness"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_0"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_1"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_2"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_3"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_4"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_5"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_6"
#
# add_dir "testsuite/tests/corba/harness/CORBA_HARNESS_7"
#
# add_dir "testsuite/tests/corba/interop"
#
# add_dir "testsuite/tests/corba/interop/CORBA_INTEROP_0"
#
# add_dir "testsuite/tests/corba/interop/CORBA_INTEROP_1"
#
# add_dir "testsuite/tests/corba/interop/CORBA_INTEROP_2"
#
# add_dir "testsuite/tests/corba/interop/CORBA_INTEROP_3"
#
# add_dir "testsuite/tests/corba/interop/CORBA_INTEROP_4"
#
# add_dir "testsuite/tests/corba/interop/CORBA_INTEROP_5"
#
# add_dir "testsuite/tests/corba/local"
#
# add_dir "testsuite/tests/corba/local/LOCAL_0"
#
# add_dir "testsuite/tests/corba/location_forwarding"
#
# add_dir "testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_0"
#
# add_dir "testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_1"
#
# add_dir "testsuite/tests/corba/object"
#
# add_dir "testsuite/tests/corba/object/OBJECT_0"
#
# add_dir "testsuite/tests/corba/orb_init"
#
# add_dir "testsuite/tests/corba/orb_init/ORB_INIT_0"
#
# add_dir "testsuite/tests/corba/performance"
#
# add_dir "testsuite/tests/corba/performance/CORBA_PERFORMANCE_0"
#
# add_dir "testsuite/tests/corba/portableinterceptor"
#
# add_dir "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_0"
#
# add_dir "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1"
#
# add_dir "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_2"
#
# add_dir "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_3"
#
# add_dir "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_4"
#
# add_dir "testsuite/tests/corba/portableserver"
#
# add_dir "testsuite/tests/corba/portableserver/PORTABLESERVER_0"
#
# add_dir "testsuite/tests/corba/portableserver/PORTABLESERVER_1"
#
# add_dir "testsuite/tests/corba/portableserver/PORTABLESERVER_2"
#
# add_dir "testsuite/tests/corba/rtcorba-rtcurrent"
#
# add_dir "testsuite/tests/corba/rtcorba-rtcurrent/RTCURRENT_0"
#
# add_dir "testsuite/tests/corba/rtcorba-rtorb"
#
# add_dir "testsuite/tests/corba/rtcorba-rtorb/RTORB_0"
#
# add_dir "testsuite/tests/corba/rtcorba-rtpoa"
#
# add_dir "testsuite/tests/corba/rtcorba-rtpoa/RTPOA_0"
#
# add_dir "testsuite/tests/corba/shutdown"
#
# add_dir "testsuite/tests/corba/shutdown/SHUTDOWN_0"
#
# add_dir "testsuite/tests/corba/shutdown/SHUTDOWN_1"
#
# add_dir "testsuite/tests/core"
#
# add_dir "testsuite/tests/core/chained_lists"
#
# add_dir "testsuite/tests/core/chained_lists/CHAINED_LIST_0"
#
# add_dir "testsuite/tests/core/dynamic_dict"
#
# add_dir "testsuite/tests/core/dynamic_dict/DYNAMIC_DICT_0"
#
# add_dir "testsuite/tests/core/fixed_point"
#
# add_dir "testsuite/tests/core/fixed_point/FIXED_0"
#
# add_dir "testsuite/tests/core/initialization"
#
# add_dir "testsuite/tests/core/initialization/INIT_0"
#
# add_dir "testsuite/tests/core/initialization/INIT_1"
#
# add_dir "testsuite/tests/core/initialization/INIT_2"
#
# add_dir "testsuite/tests/core/initialization/INIT_3"
#
# add_dir "testsuite/tests/core/initialization/INIT_4"
#
# add_dir "testsuite/tests/core/obj_adapters"
#
# add_dir "testsuite/tests/core/obj_adapters/OA_0"
#
# add_dir "testsuite/tests/core/obj_adapters/OA_1"
#
# add_dir "testsuite/tests/core/poa"
#
# add_dir "testsuite/tests/core/poa/POA_0"
#
# add_dir "testsuite/tests/core/random"
#
# add_dir "testsuite/tests/core/random/RANDOM_0"
#
# add_dir "testsuite/tests/core/sync_policies"
#
# add_dir "testsuite/tests/core/sync_policies/CORE_SYNC_POLICIES_0"
#
# add_dir "testsuite/tests/core/tasking"
#
# add_dir "testsuite/tests/core/tasking/TASK_0"
#
# add_dir "testsuite/tests/core/tasking/TASK_1"
#
# add_dir "testsuite/tests/core/tasking/TASK_2"
#
# add_dir "testsuite/tests/core/tasking/TASK_3"
#
# add_dir "testsuite/tests/core/uri_encoding"
#
# add_dir "testsuite/tests/core/uri_encoding/URI_ENCODING_0"
#
# add_dir "testsuite/tests/cos"
#
# add_dir "testsuite/tests/cos/ir"
#
# add_dir "testsuite/tests/cos/ir/IR_0"
#
# add_dir "testsuite/tests/cos/naming"
#
# add_dir "testsuite/tests/cos/naming/NAMING_0"
#
# add_dir "testsuite/tests/cos/time"
#
# add_dir "testsuite/tests/cos/time/TIME_0"
#
# add_dir "testsuite/tests/examples"
#
# add_dir "testsuite/tests/examples/corba-all_functions"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_0"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_4"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_5"
#
# add_dir "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_6"
#
# add_dir "testsuite/tests/examples/corba-all_types"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_0"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_1"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_2"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_3"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_4"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_5"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_6"
#
# add_dir "testsuite/tests/examples/corba-all_types/ALL_TYPES_7"
#
# add_dir "testsuite/tests/examples/corba-echo"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_0"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_1"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_2"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_3"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_4"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_5"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_6"
#
# add_dir "testsuite/tests/examples/corba-echo/ECHO_7"
#
# add_dir "testsuite/tests/examples/corba-random"
#
# add_dir "testsuite/tests/examples/corba-random/CORBA_RANDOM_0"
#
# add_dir "testsuite/tests/examples/corba-random/CORBA_RANDOM_1"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-client_propagated"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-client_propagated/RTCORBA_CLIENT_PROPAGATED_0"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-dhb"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-rtcosscheduling"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-server_declared"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_0"
#
# add_dir "testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_1"
#
# add_dir "testsuite/tests/examples/corba-secure_echo"
#
# add_dir "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0"
#
# add_dir "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1"
#
# add_dir "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2"
#
# add_dir "testsuite/tests/examples/corba-send"
#
# add_dir "testsuite/tests/examples/corba-send/CORBA_MIOP_0"
#
# add_dir "testsuite/tests/examples/moma"
#
# add_dir "testsuite/tests/examples/moma/MOMA_0"
#
# add_dir "testsuite/tests/examples/moma/MOMA_1"
#
# add_dir "testsuite/tests/examples/polyorb"
#
# add_dir "testsuite/tests/examples/polyorb/POLYORB_CORE_0"
#
# add_dir "testsuite/tests/examples/polyorb/POLYORB_CORE_1"
#
# add_dir "testsuite/tests/examples/polyorb/POLYORB_CORE_2"
#
# add_dir "testsuite/tests/examples/polyorb/POLYORB_CORE_3"
#
# add_file "README.DSA"
#  content [6e29a4d76d753d5388157d456c86d5917a04b01d]
#
# add_file "examples/dsa/README"
#  content [796d115225797a4046b009c0126e899501a87b77]
#
# add_file "examples/dsa/connections/client.adb"
#  content [911255a625f7fc6967ebdf5956431c9900142808]
#
# add_file "examples/dsa/connections/connect.cfg"
#  content [d1e30deee35b56f8975f2257b70ba0946fcd3ae3]
#
# add_file "examples/dsa/connections/connections.ads"
#  content [775ec503428acc9532c53de0e4401e98d49a3225]
#
# add_file "examples/dsa/connections/hub.adb"
#  content [3f5f706c6cb63d443b9eb176faf95280964708d6]
#
# add_file "examples/dsa/connections/hub.ads"
#  content [9f18e8a06324919990bf538c7b8f1fbbde8dfa31]
#
# add_file "examples/dsa/connections/hub_main.adb"
#  content [2c0618fb2dc2a6b36596a48748f4489cdd155742]
#
# add_file "examples/dsa/connections/listeners.adb"
#  content [6ad568d0e3f5465188ce51b6745d4eba2ac60e37]
#
# add_file "examples/dsa/connections/listeners.ads"
#  content [b72644e6bfe854a3177ab81201a76e49b1781839]
#
# add_file "examples/dsa/connections/server.adb"
#  content [4db75de686addf2e2fce7f99efe27f694f2c71dd]
#
# add_file "examples/dsa/demo/noproc.adb"
#  content [bff9459eb46ae6e22a6c759566cff76a84da8b45]
#
# add_file "examples/dsa/mailboxes/client.adb"
#  content [04f7a4a79bd63f8b527df879cdc98fa0eb2e69eb]
#
# add_file "examples/dsa/mailboxes/hub.adb"
#  content [0a83fbf08b81b00121d33e10937488af6a555105]
#
# add_file "examples/dsa/mailboxes/hub.ads"
#  content [ffce810b2d99452e7c1d96fb195421909616dade]
#
# add_file "examples/dsa/mailboxes/hub_main.adb"
#  content [2c0618fb2dc2a6b36596a48748f4489cdd155742]
#
# add_file "examples/dsa/mailboxes/mail.cfg"
#  content [fc56260163f31af745d8bcd20536032b1432918f]
#
# add_file "examples/dsa/mailboxes/mailboxes-active.adb"
#  content [72f93254e8f3f4f605b927ce32bfa3959e48d734]
#
# add_file "examples/dsa/mailboxes/mailboxes-active.ads"
#  content [bf1a5734d4fab0c92e360d39e9e38a8d04fa77c6]
#
# add_file "examples/dsa/mailboxes/mailboxes.ads"
#  content [31a7d428af9323261233544e346f83636f5f0962]
#
# add_file "examples/dsa/mailboxes/server.adb"
#  content [5edd69503aaf4f5e9354404ec4cf1fb1f38189e3]
#
# add_file "src/polyorb-binding_objects-lists.ads"
#  content [86bb9768ebb01776af6bc37fd94da35104f3faf7]
#
# add_file "src/polyorb-smart_pointers-controlled_entities.adb"
#  content [dd5040a6c8705af779478374a8a69990c5a0d5db]
#
# add_file "src/polyorb-smart_pointers-controlled_entities.ads"
#  content [7d5bc6a3224152984c49c4c5683fc8bdec3e0cfe]
#
# add_file "src/polyorb-utils-ilists.adb"
#  content [543a3a13b36531e8ad8cb27765c8228b3dd52185]
#
# add_file "src/polyorb-utils-ilists.ads"
#  content [1ab855572ebcd02f9d6097a99c82ac99bad1cbf8]
#
# add_file "testsuite/corba/performance/java/Makefile"
#  content [dfb0bb2fd6c08a04744e1343f34bf7d0efabd79e]
#
# add_file "testsuite/corba/performance/java/benchs.idl"
#  content [54e065e2fcb2b7adbe6545d60b876fcb76579e18]
#
# add_file "testsuite/corba/performance/java/benchsServer.java"
#  content [133acd9eb48e2ca9f7823e6d5c8ff8c8af0fafeb]
#
# add_file "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_0/test.py"
#  content [02b4bc3f8ff05ad994890748c600e1c894841eb7]
#
# add_file "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_1/test.py"
#  content [3bceede77661af46ccccc1f3d84a9b62f4b7e6bd]
#
# add_file "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_2/test.py"
#  content [065d4ded6344ad6e938171fcaea627c0629d8b9f]
#
# add_file "testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_3/test.py"
#  content [1edc10f2a3e43cd24af64e3f1a1e04cff5e7b5a6]
#
# add_file "testsuite/tests/corba/benchs/CORBA_BENCHS_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/benchs/CORBA_BENCHS_0/test.py"
#  content [7208b2de5b0b61063f72adb210b762648e7e3b02]
#
# add_file "testsuite/tests/corba/code_sets/CODE_SETS_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/code_sets/CODE_SETS_0/test.py"
#  content [025bd2d387115a002d157efe46c2285c4f59622d]
#
# add_file "testsuite/tests/corba/code_sets/CODE_SETS_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/code_sets/CODE_SETS_1/test.py"
#  content [48ce89ba8afb85a55f9ec222b0c4243422d54f29]
#
# add_file "testsuite/tests/corba/domainmanager/DOMAINMANAGER_0/test.py"
#  content [33b6110d5102fa0a0c251600e0a1ceca16709ab4]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_0/test.py"
#  content [ac082d9b2e3beadbb9ae7e6f93b2cdd87f6a3048]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_1/test.py"
#  content [45e8fd2ef6da1fffb74feaac5b6a7b019d4d9384]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_2/test.py"
#  content [d7fef518a6aa9dab4f94cc7bb63c03a945a644f9]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_3/test.py"
#  content [162fb2e48de6005e7dc1692948f4464bb6601027]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_4/test.py"
#  content [a0d1cc6638f3f15f3a1de9d8ee99d7352071545f]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_5/test.py"
#  content [9b084452f13adfcab9160fdc11356bea3834cf53]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_6/test.py"
#  content [6d311c82f6c37d8680beac386fee4746da4be8c3]
#
# add_file "testsuite/tests/corba/harness/CORBA_HARNESS_7/test.py"
#  content [0eb455a2b48d040941a3820fb8f66f3c2314d5ff]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_0/test.py"
#  content [1ff2261b75a3124a5d0efadac0ff1cf607a1c396]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_1/test.py"
#  content [93b1e3d4c0a81a060f93d4f9e19eb4600e5c5e34]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_2/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_2/test.py"
#  content [647e6bc5a42f1654fba03d56f22d9a92b18a4051]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_3/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_3/test.py"
#  content [ef0c7484ed912eb831a122002a23f0be06ab9cef]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_4/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_4/test.py"
#  content [98c03befc07827a744b6d69296a9d05c7ab1741d]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_5/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/interop/CORBA_INTEROP_5/test.py"
#  content [3f3ff74c817f400f9a8083a11d340b782dcec782]
#
# add_file "testsuite/tests/corba/local/LOCAL_0/test.py"
#  content [23fb2fcd10ed6daff01e5bc8280ab30b44b6ebbf]
#
# add_file "testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_0/test.py"
#  content [267a18f97db706e90b00f104de0770079cef4661]
#
# add_file "testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_1/test.py"
#  content [e4e84559e4f8c29b4f5db8682c7fefdffc0a7159]
#
# add_file "testsuite/tests/corba/object/OBJECT_0/test.py"
#  content [361d469e9e034efcc3c14a052f9ebe31b508ffd0]
#
# add_file "testsuite/tests/corba/orb_init/ORB_INIT_0/test.py"
#  content [f3d5ad870f5de47d812a79c85117767832a6d834]
#
# add_file "testsuite/tests/corba/performance/CORBA_PERFORMANCE_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/performance/CORBA_PERFORMANCE_0/test.py"
#  content [09e29d2242ba9e03077f05d4461f95249b4d8f6e]
#
# add_file "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_0/test.py"
#  content [fbca7a5b66b64e64596baea36361661f0afc07c1]
#
# add_file "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1/test.py"
#  content [8686af4940669e87d4ad8aa15ef7cc7145c7b7f5]
#
# add_file "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_2/test.py"
#  content [b2aaa0f42bcd44a218f56df92e9c721e7cfeec68]
#
# add_file "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_3/test.py"
#  content [56bfdcfb8894c6729ef232a3a3fe8d2a75c70ec8]
#
# add_file "testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_4/test.py"
#  content [b69c8f29369f3c1447e7a7ef590acd36224d8e09]
#
# add_file "testsuite/tests/corba/portableserver/PORTABLESERVER_0/test.py"
#  content [a19b32844451698820c18c5e22facb34b7fe1420]
#
# add_file "testsuite/tests/corba/portableserver/PORTABLESERVER_1/test.py"
#  content [fcf0ef0d3eebb594da0d66f397da5cfff83b5162]
#
# add_file "testsuite/tests/corba/portableserver/PORTABLESERVER_2/test.py"
#  content [1463baa82fdae53584f2b0542a8d6e1225311912]
#
# add_file "testsuite/tests/corba/rtcorba-rtcurrent/RTCURRENT_0/test.py"
#  content [e1b3988f7b688e5bd64bbd698378e7ff53d826a4]
#
# add_file "testsuite/tests/corba/rtcorba-rtorb/RTORB_0/test.py"
#  content [8eac96978d21730754fac0b81fd8e5d5201b1ed3]
#
# add_file "testsuite/tests/corba/rtcorba-rtpoa/RTPOA_0/test.py"
#  content [0b7f1a571559b94858f12fdf444958b979f72945]
#
# add_file "testsuite/tests/corba/shutdown/SHUTDOWN_0/test.py"
#  content [a5309db45b9efd84ff4a52b93959028a774ba13b]
#
# add_file "testsuite/tests/corba/shutdown/SHUTDOWN_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/corba/shutdown/SHUTDOWN_1/test.py"
#  content [a1c6290dbeab094863bfac52bd61ffa1d54bd05f]
#
# add_file "testsuite/tests/core/chained_lists/CHAINED_LIST_0/test.py"
#  content [649c3dada77dcf40bf27c6663cc2c3e76c70b6db]
#
# add_file "testsuite/tests/core/dynamic_dict/DYNAMIC_DICT_0/test.py"
#  content [916779b2b27c85d980968dffab92d6f528bee857]
#
# add_file "testsuite/tests/core/fixed_point/FIXED_0/test.py"
#  content [b0785c9190ae16a049453015eaf5b901712ab91e]
#
# add_file "testsuite/tests/core/initialization/INIT_0/test.py"
#  content [923e889c69b26a531b8e9123503e58e0bf1d4a19]
#
# add_file "testsuite/tests/core/initialization/INIT_1/test.py"
#  content [dc8b188cd3945cb2a77c30cf500186cf60a1dc95]
#
# add_file "testsuite/tests/core/initialization/INIT_2/test.py"
#  content [7d92364e62d62c90e5aaddaa0ba2fb60f314c08f]
#
# add_file "testsuite/tests/core/initialization/INIT_3/test.py"
#  content [992d550f74b270fa8eb154bd99d2515caab22d9f]
#
# add_file "testsuite/tests/core/initialization/INIT_4/test.py"
#  content [3f07df197fe5ec9c55341a1ca4a43951161e17d7]
#
# add_file "testsuite/tests/core/obj_adapters/OA_0/test.py"
#  content [14752ff3e239330f2cfdff8da046bb0c6f2c6dc9]
#
# add_file "testsuite/tests/core/obj_adapters/OA_1/test.py"
#  content [b2f36cc5db8347a10aa11b793608d6db3ea9e72f]
#
# add_file "testsuite/tests/core/poa/POA_0/test.py"
#  content [d8cd328c2a2a9416181c6efbc5741f1cae72f112]
#
# add_file "testsuite/tests/core/random/RANDOM_0/test.py"
#  content [a34a169faeda7147f3c2e21bdbc905d16f9569ed]
#
# add_file "testsuite/tests/core/sync_policies/CORE_SYNC_POLICIES_0/test.py"
#  content [9a030c9a917bdb6cdc0966f7fae40136b190aa4e]
#
# add_file "testsuite/tests/core/tasking/TASK_0/test.py"
#  content [029f54bdc4221981b90ac68d2d3063a545e8b586]
#
# add_file "testsuite/tests/core/tasking/TASK_1/test.py"
#  content [9a2db0c9ab147bfd2e9d13b8e5adb2d42cc2d8d5]
#
# add_file "testsuite/tests/core/tasking/TASK_2/test.py"
#  content [3ebacceb7afe6b9d3d3c60d5f852fc2fc4ce90af]
#
# add_file "testsuite/tests/core/tasking/TASK_3/test.py"
#  content [a9f48a6e20189d77d144275b9345a41b565a1e72]
#
# add_file "testsuite/tests/core/uri_encoding/URI_ENCODING_0/test.py"
#  content [787062f6b16174e18f03bff998d88b0a8a6cbe69]
#
# add_file "testsuite/tests/cos/ir/IR_0/test.py"
#  content [e5aa5a44895f831859c578b7b26fd4ea79203c35]
#
# add_file "testsuite/tests/cos/naming/NAMING_0/test.py"
#  content [a20fc47ed0503e15f3d2ec7882caa78f6e7a19d8]
#
# add_file "testsuite/tests/cos/time/TIME_0/test.py"
#  content [b88c064c898d7d75c5bc32d750b48a4d12d4ed50]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_0/test.py"
#  content [68aa225c597ee1ea1e57bf8327d51a4c0e6d649c]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1/test.py"
#  content [a9e16bdeda47e08878aa5a5a8b21b1c30b3881fd]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2/test.py"
#  content [095ea4fd0e64c6d28d9a8f438d6adaf8f664d29c]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3/test.py"
#  content [6aaa8104fc496100e12d452b9c32cc48bb2c6589]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_4/test.py"
#  content [81d7aa7dba5d85b38893ac9b57fc8d16d20dd365]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_5/test.py"
#  content [87e0e7439a7d748e177102e2cf098f2f17ba6581]
#
# add_file "testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_6/test.py"
#  content [17ecf31c0883d79dc14bc798df49da7e68970074]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_0/test.py"
#  content [e4265b5ba5f5b7501c27a1f126e664bf41f82fc1]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_1/test.py"
#  content [5787206f07f7dfe5e8ee1db67766458cce462035]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_2/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_2/test.py"
#  content [deff83559a903317c7eefa2a473395cc876349ba]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_3/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_3/test.py"
#  content [dc2d40418cf86d7478a2c1e46c91ed02bf6d6657]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_4/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_4/test.py"
#  content [5f13fb1756c71da7191b9f0db57c313f60df2a23]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_5/test.py"
#  content [bde530741e5188a744cf07e049874f77ad76054a]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_6/test.py"
#  content [b6fe510f02e466e6ec6439b9b649cd6c056dba83]
#
# add_file "testsuite/tests/examples/corba-all_types/ALL_TYPES_7/test.py"
#  content [af7461b837c089c4d285991f0849de52a1c3bee6]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_0/test.py"
#  content [a137b15e04e8921d2454d76e615fcd342aebe29d]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_1/test.py"
#  content [a98c4323ca0913c26ca1c017cd7b21d7485c662b]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_2/test.py"
#  content [ac078c610334cc58bd98d1d380fceb0e1f5e0f3f]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_3/test.py"
#  content [573d5e8b192de06b6ef3fb0b314b3945fb515c43]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_4/test.py"
#  content [c9e52764bc62e3d5365584e9b4b54b4bca540b0b]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_5/test.py"
#  content [b002b1a4d6669b66adc84404f2880d4aef6167fc]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_6/test.py"
#  content [c19dad02feb280d47ec405e2d9c394465fd998ce]
#
# add_file "testsuite/tests/examples/corba-echo/ECHO_7/test.py"
#  content [af110eecdf05cecd91d7ab2580f5f16c17965686]
#
# add_file "testsuite/tests/examples/corba-random/CORBA_RANDOM_0/test.py"
#  content [6dce46ed02bed61b77ac825525b7a53a0be34b66]
#
# add_file "testsuite/tests/examples/corba-random/CORBA_RANDOM_1/test.py"
#  content [b61a010850494f7edbb30b8d3ea229be1bc0b305]
#
# add_file "testsuite/tests/examples/corba-rtcorba-client_propagated/RTCORBA_CLIENT_PROPAGATED_0/test.py"
#  content [f83ee0cf1f7c7b6dcea97bfe4558f4aa94983ac4]
#
# add_file "testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0/test.py"
#  content [2b28e439b56093378a809e48d1c96c0e828325b1]
#
# add_file "testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0/test.py"
#  content [35bc2e824be67e6584afee208d5ad2f245f3e181]
#
# add_file "testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_0/test.py"
#  content [b05bf0f80cd66aa50a08953a81be621d8589ac22]
#
# add_file "testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_1/test.py"
#  content [ec64e5c98ed3e89b2be01617d30dd7f81c6bdf8d]
#
# add_file "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0/test.py"
#  content [fbeefc45c9538c10f319a6990606ab395fdafe7b]
#
# add_file "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1/test.py"
#  content [4b03d1a1d9410f0714b5c536059d5757dc1c40af]
#
# add_file "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2/test.py"
#  content [f111fa79ac937964a0ddf3fe2f5121dde8612b1c]
#
# add_file "testsuite/tests/examples/corba-send/CORBA_MIOP_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/corba-send/CORBA_MIOP_0/test.py"
#  content [1fa34c814de58ac2b0702a4317bdc812a11f0b79]
#
# add_file "testsuite/tests/examples/moma/MOMA_0/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/moma/MOMA_0/test.py"
#  content [3339674efe649e7a96c1cb0958e833f56fea17ff]
#
# add_file "testsuite/tests/examples/moma/MOMA_1/test.opt"
#  content [256d3f81acf90fc4f2e607c420a7eb496f6b0758]
#
# add_file "testsuite/tests/examples/moma/MOMA_1/test.py"
#  content [9beac423042e6a59ce34544fbc4a6d12f58db5dd]
#
# add_file "testsuite/tests/examples/polyorb/POLYORB_CORE_0/test.py"
#  content [010053b9ca51afba7b1a56b706e8e4536eaf1ef7]
#
# add_file "testsuite/tests/examples/polyorb/POLYORB_CORE_1/test.py"
#  content [b05b3d2e46d13c4d8af74c6957997e82cfc1a0fd]
#
# add_file "testsuite/tests/examples/polyorb/POLYORB_CORE_2/test.py"
#  content [44ae14db934212dbaca6300b106ff391b3eaca0c]
#
# add_file "testsuite/tests/examples/polyorb/POLYORB_CORE_3/test.py"
#  content [ea3a2fc70be49b54254fe2d5e2cf4dfbd33ebe9b]
#
# patch "MANIFEST"
#  from [beaa6ff2ced91a674fbd62d84038eecee7ce4c8d]
#    to [3650d7c4d95f47132a24bd91ab8215d95931b59c]
#
# patch "compilers/gnatdist/xe_back-garlic.adb"
#  from [c52091abc55e375b7c67530abb05cdb2029600eb]
#    to [db020e216021be3720439b03c028a04d168d8f57]
#
# patch "compilers/gnatdist/xe_back-polyorb.adb"
#  from [81f191f0ef2a4fbf491be8be55bdd9d2328b36bd]
#    to [82ab92ff04440b8503b750c15cda38655afa6788]
#
# patch "compilers/gnatdist/xe_back.adb"
#  from [a4bff0627c887d0f1a1170a3be80ca49235a375c]
#    to [e6031c8a2f86c92bd55a6bca1a1f8154574777e8]
#
# patch "compilers/gnatdist/xe_flags.ads"
#  from [ef95ccb18f67845ad7caf4c185cfe0a1db336003]
#    to [5d2516a7566b6a461e9e4b8ec52e8057ed123b6d]
#
# patch "compilers/gnatdist/xe_list.adb"
#  from [017c13ddc3a72affbbea32baf8ba5060ea5d35bb]
#    to [841330bc0c7fb68fda1c2da7c4d9dbaf4fa29f73]
#
# patch "compilers/gnatdist/xe_main.adb"
#  from [98a6d62cc9dc99e21bfad88c15d4112f1ed31d11]
#    to [6e4a4ef4eb560b3825f7ec1e5421604e4e424ae1]
#
# patch "compilers/gnatdist/xe_parse.adb"
#  from [c524a0386ba7ea97be371dfc2010cd6d79080d4d]
#    to [cda336845cecc5a4ed0a0fe60c085a7cbe615668]
#
# patch "compilers/gnatdist/xe_scan.adb"
#  from [d15f25466eb90e1b83b877d9ff986e6084df4a8e]
#    to [1f8f5e6a54215dcf0f91f1084d6d61bf1d1fa670]
#
# patch "compilers/gnatdist/xe_sem.adb"
#  from [d19fd0a8dfd7f5114830f15f8eb4d23e47badfaa]
#    to [1ff47ac35f71dbe29d2cc9460e7a824395579bda]
#
# patch "compilers/gnatdist/xe_usage.adb"
#  from [53f18cb0bf11cea126795b3b38b3b9363f1e9def]
#    to [0b2e65afe4db4c55f045d21d58fff6cb65ff7cac]
#
# patch "compilers/gnatdist/xe_utils.adb"
#  from [74d04cc35273e32850a84734cfe4f5cf2c2af286]
#    to [eb71f5970e1ed38bd2fcd9d6806cf696ce77ddf0]
#
# patch "compilers/gnatdist/xe_utils.ads"
#  from [35372da9b4206b30281b9b0e63d65e9cf3280a0d]
#    to [d7c7889181a94f3184855858974cfa8a269b83d0]
#
# patch "configure.ac"
#  from [6b898edb0ce723094ea72b5f5e2027497f2f56d8]
#    to [db7c56dfe04a1db7c9ad3c83baccd9fe817705dc]
#
# patch "examples/dsa/demo/client_main.adb"
#  from [b8c2054360f9753bd23be71f44c6072fb0271cc9]
#    to [dd86f2e031eb54e6cbe48456f3e0ea2a9e69a92e]
#
# patch "examples/dsa/demo/matrices.adb"
#  from [d574ef0dfc5c978195d5f03bbe74d1f6b05a7614]
#    to [f48c3f98e76acd4a252d1f1c499e0e1134573fc8]
#
# patch "examples/dsa/demo/matrices.ads"
#  from [f22f5a6a4297e30490b530bc92cfde1f3fe62b6d]
#    to [8a898017395be8ed8ade5036ae0fef21023d8612]
#
# patch "examples/dsa/demo/rci.adb"
#  from [2e54ffb7af99957599974f89b75e8ef59b56e7e2]
#    to [5e6ace67f1c653baa1fa81b338f29c4abe7d7710]
#
# patch "examples/dsa/demo/rci.ads"
#  from [3d7b4453d313093bbca5feda10c0b975ecfe8ca7]
#    to [ac1276b4404248d13977d8cb491d25437dfd156d]
#
# patch "examples/dsa/demo/rt.ads"
#  from [3637c580d90926ee48cb4d6c50fbe1aa6a19d78c]
#    to [3f1d3f8e168c26ef182a8b63f29f8c56531ad984]
#
# patch "examples/dsa/demo/sp.ads"
#  from [a5916a1359563d3e53088ee27238db2b2f992257]
#    to [08bb96dcd4ee958f7173690c4fb31bcc1cef816c]
#
# patch "examples/dsa/demo/testbed.cfg"
#  from [5bf6d9ea28999dea9fc88efb16ffc5fe5d2ac693]
#    to [d1cf575e218fa8ee88cb527a20b316151b920261]
#
# patch "features-26"
#  from [5e90266bc20d4c6bcdc0235f37465302fe1b007a]
#    to [41735ecbb7684cf95cc43957d8ba60913db6ca58]
#
# patch "idls/CORBA_IDL/CORBA_InterfaceRepository.idl"
#  from [7acb6f362398fce414e92996b12c22c477bc28e4]
#    to [844fb3725d892426da3cc46df707e314132fa80d]
#
# patch "idls/CORBA_IDL/orb.idl"
#  from [639f980419dec09a2f920474c0689d810dca5037]
#    to [9779ae7f13e7a021799b4358f670384be4f42db9]
#
# patch "src/corba/corba-impl.ads"
#  from [aa835283edc63b97e1deb24eef71aae532258efa]
#    to [718a38a5b5443f36dc1e1d78d91d4d887d93f70d]
#
# patch "src/corba/corba-object-helper.adb"
#  from [c57cd12d420117a4f3e18e7c9ce72b1f03978a36]
#    to [9ac407e68d900308b7d42902f4f66a276c98edfc]
#
# patch "src/corba/corba-object.adb"
#  from [67106837169e07ab8ab2cc086006b834080cf1a5]
#    to [7e882b38a09a51f3a067eae19583de4e36d43d13]
#
# patch "src/corba/corba-object.ads"
#  from [5ae29a3f4c2a911a546de7440540128ff679fbd7]
#    to [ea5942a564aa71d3704415705019ed49022fde03]
#
# patch "src/corba/corba-orb.adb"
#  from [a74270a24b312144fa0b01230403f4c6fe6ff328]
#    to [e7ec35ffe299d70cb6c2fad615ddbee7bc569d2f]
#
# patch "src/corba/corba-orb.ads"
#  from [aa906897ac4eb3ded98bbb78fda830d0e1891545]
#    to [880b3419411d9d3682a7795c5f8d2777b1e3324d]
#
# patch "src/corba/polyorb-corba_p-interceptors_hooks.ads"
#  from [98eaddd0e37a6905523f11a7e60b895564db8cfb]
#    to [aed849baa66bd04eae5b88c9cbce4483adf3a260]
#
# patch "src/corba/polyorb-corba_p-local.ads"
#  from [ebcf72aace438dfd761f113048b97257ab52b7fa]
#    to [a2dda3cf96c7a578dbc26a8aefe9cba6f4be403c]
#
# patch "src/corba/polyorb-corba_p-policy.ads"
#  from [ec6aa6561b854cc389e1fc3a118298abfd52d1a9]
#    to [91a076df115ca593c8c518d25c4003d11ca73d56]
#
# patch "src/corba/portableinterceptor/polyorb-corba_p-interceptors.adb"
#  from [33539a6fd20c74ca0a00d77d2abdedbe279fb449]
#    to [fe5649fdf103fa33e133623f45760cdbadc7bacc]
#
# patch "src/corba/portableinterceptor/portableinterceptor-clientrequestinfo-impl.adb"
#  from [cac49b4a2e4473fd221126bf44c67e0e8029cffa]
#    to [c3de8260da334b5da747b383621e9ce5c2894198]
#
# patch "src/corba/portableinterceptor/portableinterceptor-requestinfo-impl.adb"
#  from [48c4ae913c97a8cc8746d665bdbd325aa6449564]
#    to [2e0f63207cc029df0ab83756522ef633e44d3b97]
#
# patch "src/corba/portableserver-current.adb"
#  from [91160a73769d5b1532f8f49c5056cda45a986c3d]
#    to [669e5f4863f051651cdcc9866deea0a02887883e]
#
# patch "src/corba/portableserver-poa.adb"
#  from [1dbebd0259567e516a0ef0e7d9514c931abff12e]
#    to [b8f54372ff8c7c845d1e7f0cf63b5f474f8b0916]
#
# patch "src/corba/portableserver.adb"
#  from [d4a8dd7c9278a39b665b62ab5f09c9cd7de4616d]
#    to [edb5a02c82b0284a6305260bf624385996b7eb5b]
#
# patch "src/corba/rtcorba/rtcorba-current.adb"
#  from [f26a512485f78e29871b6201827eb8af747e46d6]
#    to [9a09e19e2c73b09a77cc3e8c68865339b540b9bb]
#
# patch "src/corba/rtcorba/rtcorba-current.ads"
#  from [181aca4bca3b31d0190a87cf168c874dd0705b24]
#    to [22a004fd9f1ec7f428689d1bd91ba5525133aaf1]
#
# patch "src/corba/rtcorba/rtcorba-rtorb.ads"
#  from [99025f81078249b4cd07bd9e969821cb3328c5d1]
#    to [ce280560710036613627002175db16d57edf4abc]
#
# patch "src/corba/rtcorba/rtportableserver-poa.adb"
#  from [22e7ab563596f6771c2726620f52c4f355bb0084]
#    to [8be1768c780a4f1e73aff3a1688173190dff7cfb]
#
# patch "src/corba/security/polyorb-corba_p-security_policy.adb"
#  from [d33e32f266bfa0569a8e078f059bb9add23d7c12]
#    to [420c58225df4944e0fa5fafb06958df1d53dcc4f]
#
# patch "src/corba/security/polyorb-corba_p-tss_state_machine.adb"
#  from [935417d2bbbedf813b37253f563ade29760ff8d1]
#    to [7f18155aa966fc3bc024feb5ff3a5b06413c900b]
#
# patch "src/dsa/polyorb-dsa_p-partitions.adb"
#  from [cf4a01c3a51b6a8160470aac2705af082d2d75f5]
#    to [4cc91b88d4cca15409dca42c30d6f3845c8911b3]
#
# patch "src/dsa/polyorb-dsa_p-storages-dfs.adb"
#  from [c1cd2fe74b765dd90eedf741273c7a060df89c7c]
#    to [db1d0fdd06faa2dcd91288720a5fa09de21a4b92]
#
# patch "src/dsa/polyorb-dsa_p-storages-dfs.ads"
#  from [4df1df06a360ffcb64d19d80d40200bcb2a48a2c]
#    to [b9dc98ad6fa8300ba8b7d7960b752d6749a8a5d3]
#
# patch "src/dsa/polyorb-dsa_p-storages.ads"
#  from [45141972daef2ba76708f78b0195a839e4f94ff3]
#    to [c20ca5a811ef06d1270ff7a8a549865ce9c99d39]
#
# patch "src/dsa/s-dsaser.adb"
#  from [53892596df0d20891d7656a9b82bbe69fa845c51]
#    to [93a9aa012448b6919cfdf3d6f0046987ef8b1587]
#
# patch "src/dsa/s-parint.adb"
#  from [d513233ce0727c06c687742df487e374fbb16886]
#    to [f1dca136fe29c6758609d43a79d8272bbcda8600]
#
# patch "src/dsa/s-parint.ads"
#  from [9890673a72e8d30ca1710f2ec86617802d5d28cb]
#    to [38082057900b75eeab5889a4800447b79939cd88]
#
# patch "src/dsa/s-shasto.adb"
#  from [9be2e415d5966f20042c42ff58c23d584bd4a505]
#    to [bc64f5f67e9c2175edfc915cf7590707a9adccf0]
#
# patch "src/giop/diop/polyorb-giop_p-transport_mechanisms-diop.adb"
#  from [bd45f1f3e6d7b2981c07ff095757c19ad19cba35]
#    to [f96de414dee35283810592f4356848b60c63f1b6]
#
# patch "src/giop/iiop/polyorb-giop_p-transport_mechanisms-iiop.adb"
#  from [ec433bce6dea695b3db475fa9fcd60dfab546f36]
#    to [ff93b81c382a7715fcec21d654939d40d9154251]
#
# patch "src/giop/iiop/security/tls/polyorb-giop_p-transport_mechanisms-tls.adb"
#  from [bfa051ef5a5286df8295ef0c0d71677e44aeb6ee]
#    to [3c3ce6909ec41c3bfb6ea24cbdc14b3fb346a977]
#
# patch "src/giop/iiop/ssliop/polyorb-giop_p-transport_mechanisms-ssliop.adb"
#  from [9081f70b8ec9b5b941220b7ddb59d550052170b1]
#    to [e2a54ca1995ec488a67bf4f524b6f9f10131710a]
#
# patch "src/giop/miop/polyorb-filters-miop-miop_out.adb"
#  from [a464e9614eaf8c576b23b0a77a80e2a2e3d0ef91]
#    to [de4e95f1a7efe28d5369382091b5e22834cbd046]
#
# patch "src/giop/miop/polyorb-filters-miop.adb"
#  from [00aee6619958456cbfda4955d1e789000272c0ff]
#    to [116deeebf873e24dab845492072dad253c10b345]
#
# patch "src/giop/miop/polyorb-giop_p-transport_mechanisms-uipmc.adb"
#  from [c6ee13976f5296b245fd63120184f6b1b57fbc04]
#    to [8d550f738ee677f7f5b42621d74ec3a72be04528]
#
# patch "src/giop/miop/polyorb-miop_p-groups.adb"
#  from [0c0f097d2c02a747d0e06f4c4244d74a4be3a12c]
#    to [f231d67368b8f59f7d4b3a7ae956f2cda71bb542]
#
# patch "src/giop/polyorb-giop_p-code_sets-converters.adb"
#  from [f3ed428a929080947334dc346075cd5dd2b183dd]
#    to [8ba032e2005080d3e24161b7a5ee69b1bdac75d6]
#
# patch "src/giop/polyorb-giop_p-tagged_components.adb"
#  from [6adb4a44a74679e013dc941a2114e477ee94bf22]
#    to [3adb0caa60937355c1c41d18ba6e6f54fb85573e]
#
# patch "src/giop/polyorb-protocols-giop-common.adb"
#  from [77d42bece36b2be62815f8c726e2e4428b9efa75]
#    to [bfeef6ffaa4c0a2d56f90905464932e6271c2363]
#
# patch "src/giop/polyorb-protocols-giop-giop_1_0.adb"
#  from [c94cd49e0d5b670d910db1b9e1a2ba2ba0f9e553]
#    to [39cf55d98a1c310398d4ed54bf5ad112f80ec386]
#
# patch "src/giop/polyorb-protocols-giop-giop_1_0.ads"
#  from [8f843e2e3182654fa12dfdbd7f27701f98adf546]
#    to [b3651c63e6b24157a115e008060fc740c7d25641]
#
# patch "src/giop/polyorb-protocols-giop-giop_1_1.adb"
#  from [117d4608ccc1b29331c89cc3fabd01279995fb31]
#    to [3103cb94e7346ca18ebe976010a5ef8a2a311556]
#
# patch "src/giop/polyorb-protocols-giop-giop_1_1.ads"
#  from [ab0d42bc43630139422b4adeedd4089729c10321]
#    to [a0b0ede73ca7271379f434364a93559c9db1bffd]
#
# patch "src/giop/polyorb-protocols-giop-giop_1_2.adb"
#  from [7952c768598cc37f53672453ed27302be15967c7]
#    to [23e08fb0a632d94ce6dcd6071b01ac12a453cb0c]
#
# patch "src/giop/polyorb-protocols-giop-giop_1_2.ads"
#  from [f9429c32ec4497de8f0b725297a1b3592ddc3189]
#    to [00ca83ae03bc8450592e7aafc8badb336cd8c766]
#
# patch "src/giop/polyorb-protocols-giop.adb"
#  from [63bea4f95a38fe9df1814373f570f74ae1601d32]
#    to [a60144d9bf88353f990aff59a00f0a6d8297b8a3]
#
# patch "src/moma/polyorb-moma_p-provider-topic_datas.adb"
#  from [f545a167daeca97c1757a3b04d82eae5a18b196e]
#    to [731ac702d14bd8008d21fe9853fa864307d53608]
#
# patch "src/polyorb-any.adb"
#  from [db5acf259c2ec53c0e84942354f5243c94fb0daa]
#    to [4d09ee435e32503e6f9ce2eb29f898b305d3552b]
#
# patch "src/polyorb-any.ads"
#  from [dc224c54d7dcf811f016335af896e7d2e7642c26]
#    to [d24b4749d2047c99e5abefb824d3be6dc713d1f7]
#
# patch "src/polyorb-asynch_ev-sockets.adb"
#  from [6d7ef022c6bb6b2db6ade0e4074a56e3ecb1f11d]
#    to [da9d36dcf79bbda85337c489434f6bf8043c946c]
#
# patch "src/polyorb-asynch_ev-sockets.ads"
#  from [f145eec3986b99b2e542bbdb840132a1bed5c34e]
#    to [db9d4b0130554e5ab153c935a17d7e9022b4b1b3]
#
# patch "src/polyorb-binding_objects.adb"
#  from [eba30a65cef3d288734a8d87b88e6e711731e0a1]
#    to [b307b51b67c5497619e2f0517b67687ca8d3b565]
#
# patch "src/polyorb-binding_objects.ads"
#  from [09596e10cb8ec629ed43c88a3e9642d285effad4]
#    to [0c45487ddb03011c54a10b69cc65ddc858cab5f8]
#
# patch "src/polyorb-buffers.adb"
#  from [37848e6f2a31b7862eedd1731894a83b5a155e76]
#    to [de3d04a9d894b30e2109ec2933be2114f0709c7b]
#
# patch "src/polyorb-buffers.ads"
#  from [11916cf4cd3bbf85ac3f1cec3e3258b3f55cc4e6]
#    to [1b8ebc7a25c8705634e689afd1b7c259a13e643b]
#
# patch "src/polyorb-exceptions.adb"
#  from [f8d2de11d4615d84e490265229949ca430326d08]
#    to [90bb51d2a7ccd0f01ef210908cb23ef82c4373f1]
#
# patch "src/polyorb-filters-slicers.adb"
#  from [52e433b1d7392ce6c4ce15c251a6b43d7aea8659]
#    to [8155f53087fa23e99ffec5dc26542c1826c58d72]
#
# patch "src/polyorb-if_descriptors.ads"
#  from [0cef5e8b1268b6c299d0ba1658baf3067ac8e5a2]
#    to [661166cb263715f320bc96025a8eee327938f480]
#
# patch "src/polyorb-jobs.adb"
#  from [f0697ad1b8affcbf53bef6b435a6955a84f3952a]
#    to [1dce24e40213573ef364c6467a2c67839b3e324b]
#
# patch "src/polyorb-minimal_servant.ads"
#  from [471788336df2a4fb10b2178852cb392718a154ef]
#    to [70ea2db2756739d89e673e6ec54b6c3bec4ed874]
#
# patch "src/polyorb-opaque-chunk_pools.adb"
#  from [e192a5d0143eaa35a83187111175b88350421734]
#    to [70261eaec2aee40c52b3c7e7634dba38401d035a]
#
# patch "src/polyorb-opaque-chunk_pools.ads"
#  from [19d09d4d795d8e83a12682a9aa30e32d62663d57]
#    to [a4f3ca205b2d723e8fc53876da9e538ef2d81dbb]
#
# patch "src/polyorb-orb.adb"
#  from [38549bf735dccbffb71e5c8d6a9a5da27f217dcc]
#    to [31cea568c888e0588e64562740702d4a72381d1a]
#
# patch "src/polyorb-orb.ads"
#  from [5a5f09d08b9fae81db8d56a85367fb1859f328db]
#    to [90b4dfe13639558e244d2467e77c19faa20376cf]
#
# patch "src/polyorb-poa_manager-basic_manager.adb"
#  from [940803f7bb53121ccbcb29fcdf823c3e6002dfed]
#    to [e56aff07f963a6e027a5af5a60da3ac83c5f1c6e]
#
# patch "src/polyorb-poa_manager-basic_manager.ads"
#  from [0b176448e4d191aba4e02ada3a87930c88ef20c5]
#    to [495d1b41846642501703b3499bdf8923f15c7169]
#
# patch "src/polyorb-poa_manager.ads"
#  from [ec3001c5983cae39e4a8a27947074ca89edc2487]
#    to [0edcbce66c9b8473930fb97977ceb221d5389d69]
#
# patch "src/polyorb-references-ior.adb"
#  from [b6f075b931047ade3517564aa0cc5e3a11dd5931]
#    to [afcb63f6a912e58bd8b3cc6df55a66cb9e7d41ce]
#
# patch "src/polyorb-references-uri.adb"
#  from [7dad7b907947ed7bc935ca68bb9f95df1f8d9a47]
#    to [fe956470c0137830c5614681388d2f088cdafec9]
#
# patch "src/polyorb-references.ads"
#  from [8a58554d26800bf6018f8b1344eda091ce400cb7]
#    to [a94899add6bdf8fd2d9b5baece4c4d9363ca1520]
#
# patch "src/polyorb-representations-cdr-common.adb"
#  from [48e55eecf86e8a6a03230e58bbcbeed493a550a0]
#    to [3eb9f48d652ae8a93685e1722def5242a74aa290]
#
# patch "src/polyorb-representations-cdr.adb"
#  from [7633553de55e337f04a5dcc0b32aa7ed80d4a61f]
#    to [7c492bb499c601870f0e050aa1551acc15df28ab]
#
# patch "src/polyorb-representations-test.adb"
#  from [28e5b72ba24ed33e43f94feff17c6833c26763e4]
#    to [ce7a8ed5546ad686587182e59da8daa938708614]
#
# patch "src/polyorb-sequences-helper.adb"
#  from [0c6c5ca8261a05797e4473929bb8b9798ca76248]
#    to [568e67f2d6a154b213be7141f8a59d04f5c79c2e]
#
# patch "src/polyorb-sequences-helper.ads"
#  from [81879001c540180d35eab89b0f9f6d14d79ec926]
#    to [c073ed608915f4376f399e8b3f43b3bb5a9af6d5]
#
# patch "src/polyorb-servants-group_servants.adb"
#  from [5264d5f908feab5a73078a495447b562d0ee2991]
#    to [d55fa9ec95d15c9f932a1a4155cf6c82ec690130]
#
# patch "src/polyorb-smart_pointers-initialization.adb"
#  from [d558c5f480a1242d4e18b47efe56d30afa37d08f]
#    to [4d77d7353e67ed63fcde10ef4daa36ce35c98721]
#
# patch "src/polyorb-smart_pointers.adb"
#  from [3708a49832a6b36abcebe143d72dc127b80bfc15]
#    to [5771db48ee89af79eda56325f590f17302e7ba72]
#
# patch "src/polyorb-smart_pointers.ads"
#  from [d8438c6adc9f3ea8a6420257ccf0b9785f35dd27]
#    to [ea54c240d3278d0be12d2936d3582b0fb3a3a200]
#
# patch "src/polyorb-task_info.adb"
#  from [40d2a3dafe9bf04f8e9983b4d15dcda48a96f615]
#    to [e6beed64fd8ee5c7a2e438ed52d4508e9f1d779f]
#
# patch "src/polyorb-task_info.ads"
#  from [dee96975701f64f4d10311d2aa03202083463067]
#    to [495f627cd43ac04822c4a2bf8164a6e53551aed7]
#
# patch "src/polyorb-tasking-idle_tasks_managers.adb"
#  from [8bec7f54f4ba680c1029647f7a5bff52eb16a18a]
#    to [5fe13723243c0c248132b75c15a8d62aaf09339e]
#
# patch "src/polyorb-tasking-idle_tasks_managers.ads"
#  from [8b897e243e52b9626988dbc58c1b4d16a7b4da8f]
#    to [db0cc938ccab4dda1c7526d113498ebd35179bb3]
#
# patch "src/polyorb-tasking-profiles-full_tasking-mutexes.ads"
#  from [50d8029102dcfd2f88268997a5962dc8699956a1]
#    to [da3ceb71531211adb68298f6546bc18116e1c545]
#
# patch "src/polyorb-tasking-profiles-full_tasking-threads.ads"
#  from [c88761c1a29ea4431ba4f6aad5a43fb8b0bd01af]
#    to [00f651c7d67518fcfce8829b4f05c1e011161560]
#
# patch "src/polyorb-tasking-profiles-ravenscar-threads.ads"
#  from [5fd4b44fa12e35c758ff28efab37f0054472ef90]
#    to [c1f37c9300457932fa7e618b8ca4a854ea779b2a]
#
# patch "src/polyorb-transport-connected.adb"
#  from [3625a040566158bcb053b7d0844ab228a4d8e9ef]
#    to [cf4467f233df06d8f65c885b5f5647fa41a49267]
#
# patch "src/polyorb-transport-datagram-sockets_out.adb"
#  from [0acaa038e1314b61e6625146dc12d276cf7188a9]
#    to [d511382239813aabc0069bd44aabfeb051e9e120]
#
# patch "src/polyorb-transport-datagram.adb"
#  from [92e3e05f69961d0e557fd1dddaa2750f50e4ad2f]
#    to [80f7c7a5307dfcf448ab9c92d3a21ad774739e09]
#
# patch "src/polyorb-utils-buffers.adb"
#  from [8e4f6bde700d063df06afa6a6787084cee31e3bc]
#    to [826754f2c8dbc423f07d699a11ac19f2ddb967c6]
#
# patch "src/polyorb-utils-buffers.ads"
#  from [b6d97a5c47d26f4402779fca18486d336149d8e6]
#    to [f063effab0ba0700f2654c1d5290e712535e20e3]
#
# patch "src/polyorb-utils-chained_lists.adb"
#  from [4288c17d13e173020ecab1f5cf84d6806021f5bc]
#    to [b65e335a75cb213285f7fb891b1f5384e2050c4a]
#
# patch "src/polyorb-utils-chained_lists.ads"
#  from [efce85573b6d5a9c12869744965bc776fcc5da9a]
#    to [93d0b2a36e20196781d22547eccd5b2642eeb3c7]
#
# patch "src/polyorb-utils-sockets.adb"
#  from [51c5833bafe933decc7612c0b1083d7d250cca87]
#    to [1e797715338eb90959a9f544cc3274b4b5a29f80]
#
# patch "src/polyorb-utils-strings-lists.adb"
#  from [bde08790b56512ed4d51264b0ac4a7ee768ea518]
#    to [7c0f7bb784ea2b89ded586c2006e0583df0f9da6]
#
# patch "src/polyorb.ads"
#  from [35ebab7a096996796256bd4015dff679fa37fd64]
#    to [5db307ed8a64effcfc38839d2b3ce1acbe61eca3]
#
# patch "src/security/polyorb-qos-clients_security.adb"
#  from [dc536343faa741e0586c0a549d6c8a5a36662d42]
#    to [a5b8097c048f53ec67d293affa646056e616e59e]
#
# patch "src/security/polyorb-qos-targets_security.adb"
#  from [dcd0bae565732fb5fcadc3f256ad7d20428a1505]
#    to [f706fecc1da5a21ac786730448a77dc61a75fa9a]
#
# patch "src/security/tls/polyorb-asynch_ev-sockets-tls.adb"
#  from [3272658453d24b5f2aaa70360da38fa939a164de]
#    to [1ca9e598c949f9de49b5ed232182d202326de8b3]
#
# patch "src/security/tls/polyorb-security-transport_mechanisms-tls.adb"
#  from [0d34f7286180c9cb1ede376858e9cf50d0f3fac9]
#    to [c0a4bd7044a9f6db6ea07d418f806726e22b37ed]
#
# patch "src/soap/polyorb-binding_data-soap.adb"
#  from [0f898e423a529f609f9be06a0435e8475498c831]
#    to [fea803d3c7eec1b07d1ed3bfea3882394ae263dc]
#
# patch "src/soap/polyorb-filters-http.adb"
#  from [0cc9b26b38dc58565f12de492cdeb2884b51afb7]
#    to [0be3434d8613f416df7351e4acb22e2c6a18ee58]
#
# patch "src/soap/polyorb-utils-text_buffers.adb"
#  from [da7062608c898021cd3b1cec585d364dd4431a70]
#    to [231e9ec0057873a4c275763840e2b7f4b5565938]
#
# patch "src/srp/polyorb-binding_data-srp.adb"
#  from [7dbbcf796fb1f1733c7a1591d5bfe88d84abffc6]
#    to [35304b2805ad939440e0c942c8e6675598bc7035]
#
# patch "src/srp/polyorb-representations-srp.adb"
#  from [ffb2ecc945201b06e0a1ff987baade4ddd3bd23c]
#    to [2ac74ac62ec25e69b6823872f1c712a975c4ff72]
#
# patch "src/ssl/polyorb-asynch_ev-sockets-ssl.adb"
#  from [2f34a5aea0b70844f3e9539d97b2bce1947f0c71]
#    to [22de5a147f68869f9d531922a3a445058f136ae7]
#
# patch "testsuite/core/chained_lists/test000.adb"
#  from [5ac857885260c83aaa4105b68c972cd4c7c5dfd7]
#    to [877b4ec21f7109cff7a170f7fe0d9a5b543d3155]
#
# patch "testsuite/idls/corba_idl/CORBA_InterfaceRepository.idl"
#  from [7af44c63b37010a38dd9a248c6734246ca654fbf]
#    to [01d870b1d05a322b0a8ab94a9726008e4072084a]
#
# patch "testsuite/idls/corba_idl/orb.idl"
#  from [88fbdb840f796d96745d27a5bc869257fcaa1d47]
#    to [253f4215a639183e70c6a532bdf63e4f42d8f178]
#
# patch "testsuite/tests/convert_scenario.py"
#  from [6518df378e84c64956b8f1dfe59679254718d1b1]
#    to [84d35640b21255c3f0e2bd576d4e0e56daa7f893]
#
# patch "testsuite/tests/test_utils.py"
#  from [28fe94df0a8b98bf54d9b486f7b33440ede09eae]
#    to [6a28a2a617967b24717bf1a8c48a6ee0aaa3bfb1]
#
# patch "testsuite/tests/testsuite.py"
#  from [81e774ffbe91f071668e7e9b881681db892e6d39]
#    to [d925546ca1a56366fa7c64f20ac302b5b45ef45d]
#
# patch "utils/prepare_distrib"
#  from [008da0ce8e1833c6c577d755c7076cba04145eab]
#    to [4fc0a4a15b5563293a0683969232dfc018649e3b]
#
============================================================
--- README.DSA	6e29a4d76d753d5388157d456c86d5917a04b01d
+++ README.DSA	6e29a4d76d753d5388157d456c86d5917a04b01d
@@ -0,0 +1,20 @@
+Using PolyORB as DSA PCS
+========================
+
+PolyORB provides an application personality that implements a Partition
+Communication Subsystem for the Distributed Systems Annex of the Ada
+language, in conjunction with the GNAT compiler. In order to use this
+personality, you need to use matching releases of the compiler and
+middleware.
+
+The following combinations of releases are known to be compatible:
+
+GNAT version  | PolyORB version
+--------------+-----------------
+GNAT Pro 6.0  | PolyORB 2.2
+GNAT Pro 6.1  | PolyORB 2.3
+GNAT GPL 2008 | PolyORB 2.4
+GNAT Pro 6.2  | PolyORB 2.5
+GNAT GPL 2009 | PoylORB GPL 2009
+GNAT Pro 6.3  | PolyORB 2.6      (planned)
+
============================================================
--- examples/dsa/README	796d115225797a4046b009c0126e899501a87b77
+++ examples/dsa/README	796d115225797a4046b009c0126e899501a87b77
@@ -0,0 +1,17 @@
+This directory contains the following examples for the Ada Distributed
+Systems Annex:
+
+- echo
+  Simple client/server ping
+
+- demo
+  Demo of passing complex data types between client and server
+
+- connections
+  Multiple servers and multiple clients, each server has a single
+  receiving task and blocks waiting for clients; clients use asynchronous
+  send operations
+
+- mailboxes
+  Same as "connections" but implemented in Ada 2005 using an RACW with
+  designating an interface implemented by the server task.
============================================================
--- examples/dsa/connections/client.adb	911255a625f7fc6967ebdf5956431c9900142808
+++ examples/dsa/connections/client.adb	911255a625f7fc6967ebdf5956431c9900142808
@@ -0,0 +1,36 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                               C L I E N T                                --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Ada.Command_Line; use Ada.Command_Line;
+with Hub;
+with Connections;
+procedure Client is
+   Target : Connections.Connection;
+begin
+   Target := Hub.Get_Listener (Integer'Value (Argument (1)));
+   Connections.Send (Target.all, Argument (2));
+end Client;
============================================================
--- examples/dsa/connections/connect.cfg	d1e30deee35b56f8975f2257b70ba0946fcd3ae3
+++ examples/dsa/connections/connect.cfg	d1e30deee35b56f8975f2257b70ba0946fcd3ae3
@@ -0,0 +1,17 @@
+configuration Connect is
+   pragma Starter (None);
+
+   Hub_Partition : Partition := (Hub);
+   procedure Hub_Main is in Hub_Partition;
+   for Hub_Partition'Termination use Deferred_Termination;
+
+   Server_Partition : Partition;
+   procedure Server;
+   for Server_Partition'Main use Server;
+   for Server_Partition'Termination use Deferred_Termination;
+
+   Client_Partition : Partition;
+   procedure Client;
+   for Client_Partition'Main use Client;
+   for Client_Partition'Termination use Local_Termination;
+end Connect;
============================================================
--- examples/dsa/connections/connections.ads	775ec503428acc9532c53de0e4401e98d49a3225
+++ examples/dsa/connections/connections.ads	775ec503428acc9532c53de0e4401e98d49a3225
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                          C O N N E C T I O N S                           --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package Connections is
+   pragma Remote_Types;
+
+   type Connection_Listener is abstract tagged limited private;
+   procedure Send (Target : Connection_Listener; Message : String) is abstract;
+
+   type Connection is access all Connection_Listener'Class;
+   pragma Asynchronous (Connection);
+
+private
+   type Connection_Listener is abstract tagged limited null record;
+end Connections;
============================================================
--- examples/dsa/connections/hub.adb	3f5f706c6cb63d443b9eb176faf95280964708d6
+++ examples/dsa/connections/hub.adb	3f5f706c6cb63d443b9eb176faf95280964708d6
@@ -0,0 +1,41 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                                  H U B                                   --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package body Hub is
+   All_Listeners : array (0 .. 7) of Connections.Connection;
+
+   procedure Register_Listener (Id : Integer; Ptr : Connections.Connection) is
+   begin
+      All_Listeners (Id) := Ptr;
+   end Register_Listener;
+
+   function Get_Listener (Id : Integer) return Connections.Connection is
+   begin
+      return All_Listeners (Id);
+   end Get_Listener;
+
+end Hub;
============================================================
--- examples/dsa/connections/hub.ads	9f18e8a06324919990bf538c7b8f1fbbde8dfa31
+++ examples/dsa/connections/hub.ads	9f18e8a06324919990bf538c7b8f1fbbde8dfa31
@@ -0,0 +1,33 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                                  H U B                                   --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Connections;
+package Hub is
+   pragma Remote_Call_Interface;
+   procedure Register_Listener (Id : Integer; Ptr : Connections.Connection);
+   function Get_Listener (Id : Integer) return Connections.Connection;
+end Hub;
============================================================
--- examples/dsa/connections/hub_main.adb	2c0618fb2dc2a6b36596a48748f4489cdd155742
+++ examples/dsa/connections/hub_main.adb	2c0618fb2dc2a6b36596a48748f4489cdd155742
@@ -0,0 +1,28 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                             H U B _ M A I N                              --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+procedure Hub_Main is begin null; end Hub_Main;
============================================================
--- examples/dsa/connections/listeners.adb	6ad568d0e3f5465188ce51b6745d4eba2ac60e37
+++ examples/dsa/connections/listeners.adb	6ad568d0e3f5465188ce51b6745d4eba2ac60e37
@@ -0,0 +1,50 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                            L I S T E N E R S                             --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Ada.Text_IO; use Ada.Text_IO;
+package body Listeners is
+
+   task body Listener_Task is
+      My_Id : Integer;
+   begin
+      accept Start (Id : Integer) do
+         My_Id := Id;
+      end Start;
+
+      loop
+         accept Process_Message (Message : String) do
+            Put_Line ("Got message: " & Message);
+         end Process_Message;
+      end loop;
+   end Listener_Task;
+
+   procedure Send (X : Active_Listener; Message : String) is
+   begin
+      X.T.Process_Message (Message);
+   end Send;
+
+end Listeners;
============================================================
--- examples/dsa/connections/listeners.ads	b72644e6bfe854a3177ab81201a76e49b1781839
+++ examples/dsa/connections/listeners.ads	b72644e6bfe854a3177ab81201a76e49b1781839
@@ -0,0 +1,43 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                            L I S T E N E R S                             --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Connections;
+package Listeners is
+
+   task type Listener_Task is
+      entry Start (Id : Integer);
+      entry Process_Message (Message : String);
+   end Listener_Task;
+
+   type Listener_Task_Acc is access Listener_Task;
+
+   type Active_Listener (T : access Listener_Task) is
+     new Connections.Connection_Listener with null record;
+   procedure Send (X : Active_Listener; Message : String);
+
+   type Active_Listener_Acc is access Active_Listener;
+end Listeners;
============================================================
--- examples/dsa/connections/server.adb	4db75de686addf2e2fce7f99efe27f694f2c71dd
+++ examples/dsa/connections/server.adb	4db75de686addf2e2fce7f99efe27f694f2c71dd
@@ -0,0 +1,41 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                               S E R V E R                                --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Ada.Command_Line; use Ada.Command_Line;
+with Connections;
+with Hub;
+with Listeners; use Listeners;
+
+procedure Server is
+   My_Id : constant Integer := Integer'Value (Argument (1));
+   Myself_T : constant Listener_Task_Acc := new Listener_Task;
+   Myself : constant Active_Listener_Acc := new Active_Listener (Myself_T);
+begin
+   Myself.T.Start (My_Id);
+   Hub.Register_Listener
+     (Id => My_Id, Ptr => Connections.Connection (Myself));
+end Server;
============================================================
--- examples/dsa/demo/noproc.adb	bff9459eb46ae6e22a6c759566cff76a84da8b45
+++ examples/dsa/demo/noproc.adb	bff9459eb46ae6e22a6c759566cff76a84da8b45
@@ -0,0 +1,28 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                               N O P R O C                                --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+procedure Noproc is begin null; end Noproc;
============================================================
--- examples/dsa/mailboxes/client.adb	04f7a4a79bd63f8b527df879cdc98fa0eb2e69eb
+++ examples/dsa/mailboxes/client.adb	04f7a4a79bd63f8b527df879cdc98fa0eb2e69eb
@@ -0,0 +1,36 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                               C L I E N T                                --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Ada.Command_Line; use Ada.Command_Line;
+with Hub;
+with Mailboxes;
+procedure Client is
+   Target : Mailboxes.Remote_Mailbox;
+begin
+   Target := Hub.Get_Mailbox (Integer'Value (Argument (1)));
+   Target.Send_Message (Argument (2));
+end Client;
============================================================
--- examples/dsa/mailboxes/hub.adb	0a83fbf08b81b00121d33e10937488af6a555105
+++ examples/dsa/mailboxes/hub.adb	0a83fbf08b81b00121d33e10937488af6a555105
@@ -0,0 +1,41 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                                  H U B                                   --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package body Hub is
+   All_Mailboxes : array (0 .. 7) of Mailboxes.Remote_Mailbox;
+
+   procedure Register_Mailbox (Id : Integer; Ptr : Mailboxes.Remote_Mailbox) is
+   begin
+      All_Mailboxes (Id) := Ptr;
+   end Register_Mailbox;
+
+   function Get_Mailbox (Id : Integer) return Mailboxes.Remote_Mailbox is
+   begin
+      return All_Mailboxes (Id);
+   end Get_Mailbox;
+
+end Hub;
============================================================
--- examples/dsa/mailboxes/hub.ads	ffce810b2d99452e7c1d96fb195421909616dade
+++ examples/dsa/mailboxes/hub.ads	ffce810b2d99452e7c1d96fb195421909616dade
@@ -0,0 +1,33 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                                  H U B                                   --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Mailboxes;
+package Hub is
+   pragma Remote_Call_Interface;
+   procedure Register_Mailbox (Id : Integer; Ptr : Mailboxes.Remote_Mailbox);
+   function Get_Mailbox (Id : Integer) return Mailboxes.Remote_Mailbox;
+end Hub;
============================================================
--- examples/dsa/mailboxes/hub_main.adb	2c0618fb2dc2a6b36596a48748f4489cdd155742
+++ examples/dsa/mailboxes/hub_main.adb	2c0618fb2dc2a6b36596a48748f4489cdd155742
@@ -0,0 +1,28 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                             H U B _ M A I N                              --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+procedure Hub_Main is begin null; end Hub_Main;
============================================================
--- examples/dsa/mailboxes/mail.cfg	fc56260163f31af745d8bcd20536032b1432918f
+++ examples/dsa/mailboxes/mail.cfg	fc56260163f31af745d8bcd20536032b1432918f
@@ -0,0 +1,17 @@
+configuration Mail is
+   pragma Starter (None);
+
+   Hub_Partition : Partition := (Hub);
+   procedure Hub_Main is in Hub_Partition;
+   for Hub_Partition'Termination use Deferred_Termination;
+
+   Server_Partition : Partition;
+   procedure Server;
+   for Server_Partition'Main use Server;
+   for Server_Partition'Termination use Deferred_Termination;
+
+   Client_Partition : Partition;
+   procedure Client;
+   for Client_Partition'Main use Client;
+   for Client_Partition'Termination use Local_Termination;
+end Mail;
============================================================
--- examples/dsa/mailboxes/mailboxes-active.adb	72f93254e8f3f4f605b927ce32bfa3959e48d734
+++ examples/dsa/mailboxes/mailboxes-active.adb	72f93254e8f3f4f605b927ce32bfa3959e48d734
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                     M A I L B O X E S . A C T I V E                      --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Ada.Text_IO; use Ada.Text_IO;
+
+package body Mailboxes.Active is
+   task body Active_Mailbox is
+      My_Id : Integer;
+   begin
+      accept Start (Id : Integer) do
+         My_Id := Id;
+      end Start;
+      Put_Line ("Active_Mailbox #" & My_Id'Img & " starting");
+
+      loop
+         accept Send_Message (Message : Message_Type) do
+            Put_Line ("... got message: " & Message);
+         end Send_Message;
+      end loop;
+   end Active_Mailbox;
+end Mailboxes.Active;
============================================================
--- examples/dsa/mailboxes/mailboxes-active.ads	bf1a5734d4fab0c92e360d39e9e38a8d04fa77c6
+++ examples/dsa/mailboxes/mailboxes-active.ads	bf1a5734d4fab0c92e360d39e9e38a8d04fa77c6
@@ -0,0 +1,37 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                     M A I L B O X E S . A C T I V E                      --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package Mailboxes.Active is
+   task type Active_Mailbox is new Mailbox with
+      entry Start (Id : Integer);
+      entry Send_Message (Message : Message_Type);
+   end Active_Mailbox;
+
+   type Active_Mailbox_Acc is access all Active_Mailbox;
+   --  Local access type
+
+end Mailboxes.Active;
============================================================
--- examples/dsa/mailboxes/mailboxes.ads	31a7d428af9323261233544e346f83636f5f0962
+++ examples/dsa/mailboxes/mailboxes.ads	31a7d428af9323261233544e346f83636f5f0962
@@ -0,0 +1,41 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                            M A I L B O X E S                             --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package Mailboxes is
+   pragma Remote_Types;
+
+   subtype Message_Type is String;
+
+   type Mailbox is limited interface;
+   procedure Send_Message (Recipient : access Mailbox; Message : Message_Type)
+     is abstract;
+
+   type Remote_Mailbox is access all Mailbox'Class;
+   pragma Asynchronous (Remote_Mailbox);
+   --  Remote access to mailbox
+
+end Mailboxes;
============================================================
--- examples/dsa/mailboxes/server.adb	5edd69503aaf4f5e9354404ec4cf1fb1f38189e3
+++ examples/dsa/mailboxes/server.adb	5edd69503aaf4f5e9354404ec4cf1fb1f38189e3
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                               S E R V E R                                --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+with Ada.Command_Line; use Ada.Command_Line;
+with Mailboxes.Active;
+with Hub;
+procedure Server is
+   My_Id : constant Integer := Integer'Value (Argument (1));
+   My_Mailbox : Mailboxes.Active.Active_Mailbox_Acc :=
+                  new Mailboxes.Active.Active_Mailbox;
+begin
+   My_Mailbox.Start (My_Id);
+   Hub.Register_Mailbox
+     (Id => My_Id, Ptr => Mailboxes.Remote_Mailbox (My_Mailbox));
+end Server;
============================================================
--- src/polyorb-binding_objects-lists.ads	86bb9768ebb01776af6bc37fd94da35104f3faf7
+++ src/polyorb-binding_objects-lists.ads	86bb9768ebb01776af6bc37fd94da35104f3faf7
@@ -0,0 +1,32 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--        P O L Y O R B . B I N D I N G _ O B J E C T S . L I S T S         --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package PolyORB.Binding_Objects.Lists is
+  new PolyORB.Utils.Ilists.Lists
+     (T             => Binding_Object'Class,
+      T_Acc         => Binding_Object_Access,
+      Doubly_Linked => True);
============================================================
--- src/polyorb-smart_pointers-controlled_entities.adb	dd5040a6c8705af779478374a8a69990c5a0d5db
+++ src/polyorb-smart_pointers-controlled_entities.adb	dd5040a6c8705af779478374a8a69990c5a0d5db
@@ -0,0 +1,58 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--               POLYORB.SMART_POINTERS.CONTROLLED_ENTITIES                 --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package body PolyORB.Smart_Pointers.Controlled_Entities is
+
+   --------------
+   -- Finalize --
+   --------------
+
+   procedure Finalize (X : in out Entity_Controller) is
+   begin
+      Finalize (X.E.all);
+   end Finalize;
+
+   ----------------
+   -- Initialize --
+   ----------------
+
+   procedure Initialize (X : in out Entity_Controller) is
+   begin
+      Initialize (X.E.all);
+   end Initialize;
+
+   -------------------
+   -- Is_Controlled --
+   -------------------
+
+   function Is_Controlled (X : Entity) return Boolean is
+      pragma Unreferenced (X);
+   begin
+      return True;
+   end Is_Controlled;
+
+end PolyORB.Smart_Pointers.Controlled_Entities;
============================================================
--- src/polyorb-smart_pointers-controlled_entities.ads	7d5bc6a3224152984c49c4c5683fc8bdec3e0cfe
+++ src/polyorb-smart_pointers-controlled_entities.ads	7d5bc6a3224152984c49c4c5683fc8bdec3e0cfe
@@ -0,0 +1,61 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--               POLYORB.SMART_POINTERS.CONTROLLED_ENTITIES                 --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+pragma Ada_2005;
+
+package PolyORB.Smart_Pointers.Controlled_Entities is
+
+   pragma Preelaborate;
+
+   ---------------------------------
+   -- Controlled task-safe entity --
+   ---------------------------------
+
+   type Entity is abstract new Non_Controlled_Entity with private;
+   procedure Initialize (X : in out Entity) is null;
+   function Is_Controlled (X : Entity) return Boolean;
+
+private
+
+   ---------------------------------
+   -- Task-safe controlled entity --
+   ---------------------------------
+
+   type Entity_Controller (E : access Entity'Class)
+      is new Ada.Finalization.Limited_Controlled with null record;
+
+   procedure Initialize (X : in out Entity_Controller);
+   procedure Finalize   (X : in out Entity_Controller);
+
+   type Entity is abstract new Non_Controlled_Entity with record
+      Controller : Entity_Controller (Entity'Access);
+      --  Controller component used to trigger a call to the Entity's
+      --  Finalize primitive operation when it is Finalized (note that
+      --  Entity itself is not a controlled type).
+   end record;
+
+end PolyORB.Smart_Pointers.Controlled_Entities;
============================================================
--- src/polyorb-utils-ilists.adb	543a3a13b36531e8ad8cb27765c8228b3dd52185
+++ src/polyorb-utils-ilists.adb	543a3a13b36531e8ad8cb27765c8228b3dd52185
@@ -0,0 +1,231 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                 P O L Y O R B . U T I L S . I L I S T S                  --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+package body PolyORB.Utils.Ilists is
+
+   package body Lists is
+
+      function "+" (X : access T) return T_Acc;
+      pragma Inline ("+");
+      --  Convert X to a general access type, bypassing accessibility checks
+
+      function Link (X : access T; Which : Link_Type) return T_Acc;
+      procedure Set_Link (X : access T; Which : Link_Type; To : T_Acc);
+      pragma Inline (Link);
+      pragma Inline (Set_Link);
+      --  Short-hand notation for read and write usage of the Link accessor
+
+      ----------
+      -- Link --
+      ----------
+
+      function Link (X : access T; Which : Link_Type) return T_Acc is
+      begin
+         return Link (X, Which).all;
+      end Link;
+
+      --------------
+      -- Set_Link --
+      --------------
+
+      procedure Set_Link (X : access T; Which : Link_Type; To : T_Acc) is
+      begin
+         Link (X, Which).all := To;
+      end Set_Link;
+
+      ---------
+      -- "+" --
+      ---------
+
+      function "+" (X : access T) return T_Acc is
+         pragma Suppress (Access_Check);
+      begin
+         return X.all'Unchecked_Access;
+      end "+";
+
+      ------------
+      -- Append --
+      ------------
+
+      procedure Append (L : in out List; X : access T) is
+      begin
+         if L.Last /= null then
+            if Doubly_Linked then
+               Set_Link (X, Prev, L.Last);
+            end if;
+            Set_Link (L.Last, Next, +X);
+         end if;
+         L.Last := +X;
+         if L.First = null then
+            L.First := +X;
+         end if;
+         L.Length := L.Length + 1;
+      end Append;
+
+      -----------
+      -- First --
+      -----------
+
+      function First (L : List) return Iterator is
+      begin
+         return Iterator (L.First);
+      end First;
+
+      --------------
+      -- Is_Empty --
+      --------------
+
+      function Is_Empty (L : List) return Boolean is
+      begin
+         return L.Length = 0;
+      end Is_Empty;
+
+      ----------
+      -- Last --
+      ----------
+
+      function Last (L : List) return Iterator is
+         pragma Unreferenced (L);
+      begin
+         return null;
+      end Last;
+
+      ----------
+      -- Last --
+      ----------
+
+      function Last (It : Iterator) return Boolean is
+      begin
+         return It = null;
+      end Last;
+
+      ------------
+      -- Length --
+      ------------
+
+      function Length (L : List) return Natural is
+      begin
+         return L.Length;
+      end Length;
+
+      ----------
+      -- Next --
+      ----------
+
+      procedure Next (It : in out Iterator) is
+      begin
+         It := Iterator (T_Acc'(Link (It, Next)));
+      end Next;
+
+      -------------
+      -- Prepend --
+      -------------
+
+      procedure Prepend (L : in out List; X : access T) is
+      begin
+         Set_Link (X, Next, L.First);
+         if Doubly_Linked and then L.First /= null then
+            Set_Link (L.First, Prev, +X);
+         end if;
+
+         L.First := +X;
+         if L.Last = null then
+            L.Last := +X;
+         end if;
+         L.Length := L.Length + 1;
+      end Prepend;
+
+      ------------
+      -- Remove --
+      ------------
+
+      procedure Remove (L : in out List; It : in out Iterator) is
+         Element : constant access T := It;
+      begin
+         Next (It);
+         Remove_Element (L, Element);
+      end Remove;
+
+      --------------------
+      -- Remove_Element --
+      --------------------
+
+      procedure Remove_Element (L : in out List; X : access T) is
+         Previous : T_Acc;
+      begin
+         if Doubly_Linked then
+            Previous := Link (X, Prev);
+         else
+            pragma Assert (X = L.First);
+            Previous := null;
+         end if;
+         Remove_Element (L, X => X, PX => Previous);
+      end Remove_Element;
+
+      --------------------
+      -- Remove_Element --
+      --------------------
+
+      procedure Remove_Element
+        (L  : in out List;
+         X  : access T;
+         PX : access T)
+      is
+      begin
+         if PX = null then
+            L.First := Link (X, Next);
+         else
+            Set_Link (PX, Next, Link (X, Next));
+         end if;
+
+         if L.Last = X then
+            L.Last := +PX;
+         end if;
+
+         if Doubly_Linked then
+            if Link (X, Next) /= T_Acc'(null) then
+               Set_Link (Link (X, Next), Prev, +PX);
+            end if;
+            Set_Link (X, Prev, null);
+         end if;
+
+         Set_Link (X, Next, null);
+         L.Length := L.Length - 1;
+      end Remove_Element;
+
+      -----------
+      -- Value --
+      -----------
+
+      function Value (It : Iterator) return T_Acc is
+      begin
+         return T_Acc (It);
+      end Value;
+
+   end Lists;
+
+end PolyORB.Utils.Ilists;
============================================================
--- src/polyorb-utils-ilists.ads	1ab855572ebcd02f9d6097a99c82ac99bad1cbf8
+++ src/polyorb-utils-ilists.ads	1ab855572ebcd02f9d6097a99c82ac99bad1cbf8
@@ -0,0 +1,118 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           POLYORB COMPONENTS                             --
+--                                                                          --
+--                 P O L Y O R B . U T I L S . I L I S T S                  --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--           Copyright (C) 2009, Free Software Foundation, Inc.             --
+--                                                                          --
+-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
+-- under terms of the  GNU General Public License as published by the  Free --
+-- Software Foundation;  either version 2,  or (at your option)  any  later --
+-- version. PolyORB is distributed  in the hope that it will be  useful,    --
+-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
+-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
+-- License  for more details.  You should have received  a copy of the GNU  --
+-- General Public License distributed with PolyORB; see file COPYING. If    --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
+--                                                                          --
+--                                                                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  In-place chained lists
+
+--  This unit provides a chained list data type operating on any limited type
+--  that exposes Next and (for the doubly linked case) Previous pointers.
+--  None of the provided list operations use any dynamic memory allocation.
+
+pragma Ada_2005;
+
+package PolyORB.Utils.Ilists is
+
+   pragma Preelaborate;
+
+   type Link_Type is (Prev, Next);
+
+   generic
+      type T (<>) is limited private;
+      type T_Acc is access all T;
+      with function Link
+        (X : access T; Which : Link_Type) return access T_Acc is <>;
+      --  Accessor for the list pointers. For a doubly linked list, Prev and
+      --  Next must be supported. For a simply linked list, only Next needs to
+      --  be supported.
+
+      Doubly_Linked : Boolean;
+      --  If True, the list is doubly linked
+
+   package Lists is
+      type List is private;
+      --  A list of objects of type T
+
+      type Iterator is private;
+      --  Iterator over List
+
+      procedure Append (L : in out List; X : access T);
+      --  Append X to L. Note that any given object cannot be appended to more
+      --  than one list (from the same instance of this unit) at a given time.
+
+      procedure Prepend (L : in out List; X : access T);
+      --  Prepend X to L. Note that any given object cannot be appended to more
+      --  than one list (from the same instance of this unit) at a given time.
+
+      procedure Remove (L : in out List; It : in out Iterator);
+      --  Remove the element denoted by L and advance It to the next element
+      --  in L.
+
+      procedure Remove_Element (L : in out List; X : access T);
+      --  Remove X from L (L needs to be doubly linked)
+
+      procedure Remove_Element (L : in out List; X : access T; PX : access T);
+      --  Remove X from L (L may be simply linked). PX is the previous element
+      --  in L.
+
+      function First (L : List) return Iterator;
+      --  Return an iterator denoting the first element of L
+
+      function Last (L : List) return Iterator;
+      --  Return an iterator denoting a position past the last element of L
+
+      procedure Next (It : in out Iterator);
+      --  Advance It to the next element in its list
+
+      function Last (It : Iterator) return Boolean;
+      --  True when It is past the last element in its list
+
+      function Value (It : Iterator) return T_Acc;
+      --  Return the element at It
+
+      function Length (L : List) return Natural;
+      --  Return the length of L
+
+      function Is_Empty (L : List) return Boolean;
+      --  True when L has no elements
+
+   private
+      pragma Inline (First);
+      pragma Inline (Next);
+      pragma Inline (Last);
+      pragma Inline (Value);
+      pragma Inline (Length);
+      pragma Inline (Is_Empty);
+
+      type Iterator is new T_Acc;
+
+      type List is record
+         First, Last : T_Acc;
+         Length      : Natural := 0;
+      end record;
+
+   end Lists;
+
+end PolyORB.Utils.Ilists;
============================================================
--- testsuite/corba/performance/java/Makefile	dfb0bb2fd6c08a04744e1343f34bf7d0efabd79e
+++ testsuite/corba/performance/java/Makefile	dfb0bb2fd6c08a04744e1343f34bf7d0efabd79e
@@ -0,0 +1,16 @@
+
+all:
+	idlj -fall benchs.idl
+	javac benchsServer.java benchsPackage/*.java
+#	orbd -ORBInitialPort 1050 -ORBInitialHost localhost
+	java benchsServer -ORBInitialPort 1050 -ORBInitialHost localhost
+
+clean:
+	rm -rf *.class \
+		benchsHelper.java \
+		benchs.java \
+		benchsPOA.java \
+		benchsHolder.java \
+		benchsOperations.java \
+		_benchsStub.java \
+		benchsPackage
============================================================
--- testsuite/corba/performance/java/benchs.idl	54e065e2fcb2b7adbe6545d60b876fcb76579e18
+++ testsuite/corba/performance/java/benchs.idl	54e065e2fcb2b7adbe6545d60b876fcb76579e18
@@ -0,0 +1,115 @@
+//--------------------------------------------------------------------------//
+//                                                                          //
+//                           POLYORB COMPONENTS                             //
+//                                                                          //
+//                               B E N C H S                                //
+//                                                                          //
+//                                  I D L                                   //
+//                                                                          //
+//           Copyright (C) 2009, Free Software Foundation, Inc.             //
+//                                                                          //
+// PolyORB is free software; you  can  redistribute  it and/or modify it    //
+// under terms of the  GNU General Public License as published by the  Free //
+// Software Foundation;  either version 2,  or (at your option)  any  later //
+// version. PolyORB is distributed  in the hope that it will be  useful,    //
+// but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- //
+// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public //
+// License  for more details.  You should have received  a copy of the GNU  //
+// General Public License distributed with PolyORB; see file COPYING. If    //
+// not, write to the Free Software Foundation, 51 Franklin Street, Fifth    //
+// Floor, Boston, MA 02111-1301, USA.                                       //
+//                                                                          //
+//                  PolyORB is maintained by AdaCore                        //
+//                     (email: sales@adacore.com)                           //
+//                                                                          //
+//--------------------------------------------------------------------------//
+// This IDL file is used to benchmarks CORBA application. Each
+// function is expected to return a value equal to its parameter. It
+// allows one to evaluate the impact of parameter
+// marshalling/unmarshalling on ORB performance.
+
+interface benchs {
+
+  // fonction without parameter
+  short noParameter ();
+
+  // procedure with variable name length
+  void azerty ();
+
+  // fonction with one parameter
+  // Simple types
+  boolean echoBoolean(in boolean arg) ;
+  short echoShort(in short arg) ;
+  long echoLong(in long arg) ;
+
+  float echoFloat(in float arg) ;
+  double echoDouble(in double arg) ;
+  char echoChar(in char arg) ;
+  wchar echoWChar(in wchar arg) ;
+  string echoString (in string arg) ;
+  wstring echoWstring (in wstring arg) ;
+
+  // Enum
+  enum Color { Red, Green, Blue };
+  Color echoColor (in Color arg);
+
+  // Array of enum
+  typedef Color Rainbow[7];
+  Rainbow echoRainbow (in Rainbow arg);
+
+
+  // Unions
+  union myUnion switch (long) {
+  case 1: long    Counter;
+  case 2: boolean Flag;
+  case 3: Color   Hue;
+  default: long Unknown;
+  };
+
+  myUnion echoUnion (in myUnion arg);
+
+  union myUnionEnumSwitch switch (Color) {
+  case Red:   long   foo;
+  case Green: short  bar;
+  case Blue:  string baz;
+  };
+  myUnionEnumSwitch echoUnionEnumSwitch (in myUnionEnumSwitch arg);
+
+  // Structs
+  struct simple_struct {
+    long a;
+    string s;
+  };
+  simple_struct echoStruct (in simple_struct arg);
+
+  struct array_struct {
+    long a[10];
+    unsigned short b;
+  };
+  array_struct echoArrayStruct (in array_struct arg);
+
+  // Big arrays
+  // ----------
+
+  typedef long sixteenKb[64][64];
+  sixteenKb echoSixteenKb (in sixteenKb arg);
+
+//  struct composite_struct {
+//    fixed<12,3> fixedMember;
+//    sequence<sequence<octet> > seqseqMember;
+//    long double matrixMember[3][4];
+//  };
+
+  struct nested_struct {
+    simple_struct ns;
+  };
+  nested_struct echoNestedStruct (in nested_struct arg);
+
+
+   // Sequences
+  typedef sequence<short> U_sequence;
+  U_sequence echoUsequence (in U_sequence arg);
+
+  // stop the server
+  void StopServer ();
+};
============================================================
--- testsuite/corba/performance/java/benchsServer.java	133acd9eb48e2ca9f7823e6d5c8ff8c8af0fafeb
+++ testsuite/corba/performance/java/benchsServer.java	133acd9eb48e2ca9f7823e6d5c8ff8c8af0fafeb
@@ -0,0 +1,147 @@
+//--------------------------------------------------------------------------//
+//                                                                          //
+//                           POLYORB COMPONENTS                             //
+//                                                                          //
+//                         b e n c h s S e r v e r                          //
+//                                                                          //
+//                                 J A V A                                  //
+//                                                                          //
+//           Copyright (C) 2009, Free Software Foundation, Inc.             //
+//                                                                          //
+// PolyORB is free software; you  can  redistribute  it and/or modify it    //
+// under terms of the  GNU General Public License as published by the  Free //
+// Software Foundation;  either version 2,  or (at your option)  any  later //
+// version. PolyORB is distributed  in the hope that it will be  useful,    //
+// but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- //
+// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public //
+// License  for more details.  You should have received  a copy of the GNU  //
+// General Public License distributed with PolyORB; see file COPYING. If    //
+// not, write to the Free Software Foundation, 51 Franklin Street, Fifth    //
+// Floor, Boston, MA 02111-1301, USA.                                       //
+//                                                                          //
+//                                                                          //
+//                  PolyORB is maintained by AdaCore                        //
+//                     (email: sales@adacore.com)                           //
+//                                                                          //
+//--------------------------------------------------------------------------//
+import org.omg.CORBA.*;
+import org.omg.PortableServer.*;
+
+class benchsImpl extends benchsPOA {
+  private ORB orb;
+  private short data = 123;
+
+  public void setORB (ORB orb_val) {
+    orb = orb_val;
+  }
+
+  public short noParameter () {
+    return data;
+  }
+
+  public void azerty () {
+  }
+
+  public boolean echoBoolean (boolean arg) {
+    return arg;
+  }
+
+  public short echoShort (short arg) {
+    return arg;
+  }
+
+  public int echoLong (int arg) {
+    return arg;
+  }
+
+  public float echoFloat (float arg) {
+    return arg;
+  }
+
+  public double echoDouble (double arg) {
+    return arg;
+  }
+
+  public char echoChar (char arg) {
+    return arg;
+  }
+
+  public char echoWChar (char arg) {
+    return arg;
+  }
+
+  public String echoString (String arg) {
+    return arg;
+  }
+
+  public String echoWstring (String arg) {
+    return arg;
+  }
+
+  public benchsPackage.Color echoColor (benchsPackage.Color arg) {
+    return arg;
+  }
+
+  public benchsPackage.Color[] echoRainbow (benchsPackage.Color[] arg) {
+    return arg;
+  }
+
+  public benchsPackage.myUnion echoUnion (benchsPackage.myUnion arg) {
+    return arg;
+  }
+
+  public benchsPackage.myUnionEnumSwitch echoUnionEnumSwitch (benchsPackage.myUnionEnumSwitch arg) {
+    return arg;
+  }
+
+  public benchsPackage.simple_struct echoStruct (benchsPackage.simple_struct arg) {
+    return arg;
+  }
+
+  public benchsPackage.array_struct echoArrayStruct (benchsPackage.array_struct arg) {
+    return arg;
+  }
+
+  public int[][] echoSixteenKb (int[][] arg) {
+    return arg;
+  }
+
+  public benchsPackage.nested_struct echoNestedStruct (benchsPackage.nested_struct arg) {
+    return arg;
+  }
+
+  public short[] echoUsequence (short[] arg) {
+    return arg;
+  }
+
+  public void StopServer () {
+    orb.shutdown(false);
+  }
+}
+
+public class benchsServer {
+
+  public static void main (String args[]) {
+    try {
+      ORB orb = ORB.init (args, null);
+      POA poa = POAHelper.narrow (orb.resolve_initial_references ("RootPOA"));
+      poa.the_POAManager ().activate ();
+
+      benchsImpl impl = new benchsImpl ();
+      impl.setORB (orb);
+      benchs ref = benchsHelper.narrow (poa.servant_to_reference (impl));
+
+      System.out.println (orb.object_to_string (ref));
+      System.out.println ("benchServer ready and waiting...");
+
+      orb.run ();
+
+    } catch (Exception e) {
+      System.err.println ("ERROR: " + e);
+      e.printStackTrace (System.out);
+    }
+
+    System.out.println ("benchServer Exiting...");
+  }
+
+}
============================================================
--- testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_0/test.py	02b4bc3f8ff05ad994890748c600e1c894841eb7
+++ testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_0/test.py	02b4bc3f8ff05ad994890748c600e1c894841eb7
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/all_exceptions/client', r'',
+                     r'corba/all_exceptions/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_1/test.py	3bceede77661af46ccccc1f3d84a9b62f4b7e6bd
+++ testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_1/test.py	3bceede77661af46ccccc1f3d84a9b62f4b7e6bd
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/all_exceptions/client', r'scenarios/polyorb_conf/giop_1_0.conf',
+                     r'corba/all_exceptions/server', r'scenarios/polyorb_conf/giop_1_0.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_2/test.py	065d4ded6344ad6e938171fcaea627c0629d8b9f
+++ testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_2/test.py	065d4ded6344ad6e938171fcaea627c0629d8b9f
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/all_exceptions/client', r'scenarios/polyorb_conf/giop_1_1.conf',
+                     r'corba/all_exceptions/server', r'scenarios/polyorb_conf/giop_1_1.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_3/test.py	1edc10f2a3e43cd24af64e3f1a1e04cff5e7b5a6
+++ testsuite/tests/corba/all_exceptions/CORBA_ALL_EXCEPTIONS_3/test.py	1edc10f2a3e43cd24af64e3f1a1e04cff5e7b5a6
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/all_exceptions/client', r'scenarios/polyorb_conf/giop_1_2.conf',
+                     r'corba/all_exceptions/server', r'scenarios/polyorb_conf/giop_1_2.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/benchs/CORBA_BENCHS_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/benchs/CORBA_BENCHS_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/benchs/CORBA_BENCHS_0/test.py	7208b2de5b0b61063f72adb210b762648e7e3b02
+++ testsuite/tests/corba/benchs/CORBA_BENCHS_0/test.py	7208b2de5b0b61063f72adb210b762648e7e3b02
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/benchs/test000/client', r'',
+                     r'corba/benchs/test000/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/code_sets/CODE_SETS_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/code_sets/CODE_SETS_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/code_sets/CODE_SETS_0/test.py	025bd2d387115a002d157efe46c2285c4f59622d
+++ testsuite/tests/corba/code_sets/CODE_SETS_0/test.py	025bd2d387115a002d157efe46c2285c4f59622d
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/code_sets/test000/client', r'',
+                     r'corba/code_sets/test000/server', r'scenarios/polyorb_conf/code_sets_000_server.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/code_sets/CODE_SETS_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/code_sets/CODE_SETS_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/code_sets/CODE_SETS_1/test.py	48ce89ba8afb85a55f9ec222b0c4243422d54f29
+++ testsuite/tests/corba/code_sets/CODE_SETS_1/test.py	48ce89ba8afb85a55f9ec222b0c4243422d54f29
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/code_sets/test000/client', r'scenarios/polyorb_conf/code_sets_000_client.conf',
+                     r'corba/code_sets/test000/server', r'scenarios/polyorb_conf/code_sets_000_server.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/domainmanager/DOMAINMANAGER_0/test.py	33b6110d5102fa0a0c251600e0a1ceca16709ab4
+++ testsuite/tests/corba/domainmanager/DOMAINMANAGER_0/test.py	33b6110d5102fa0a0c251600e0a1ceca16709ab4
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/domainmanager/test000/client', r'',
+                     r'corba/domainmanager/test000/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_0/test.py	ac082d9b2e3beadbb9ae7e6f93b2cdd87f6a3048
+++ testsuite/tests/corba/harness/CORBA_HARNESS_0/test.py	ac082d9b2e3beadbb9ae7e6f93b2cdd87f6a3048
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_no_tasking', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_1/test.py	45e8fd2ef6da1fffb74feaac5b6a7b019d4d9384
+++ testsuite/tests/corba/harness/CORBA_HARNESS_1/test.py	45e8fd2ef6da1fffb74feaac5b6a7b019d4d9384
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_thread_pool', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_2/test.py	d7fef518a6aa9dab4f94cc7bb63c03a945a644f9
+++ testsuite/tests/corba/harness/CORBA_HARNESS_2/test.py	d7fef518a6aa9dab4f94cc7bb63c03a945a644f9
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_thread_per_request', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_3/test.py	162fb2e48de6005e7dc1692948f4464bb6601027
+++ testsuite/tests/corba/harness/CORBA_HARNESS_3/test.py	162fb2e48de6005e7dc1692948f4464bb6601027
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_thread_per_session', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_4/test.py	a0d1cc6638f3f15f3a1de9d8ee99d7352071545f
+++ testsuite/tests/corba/harness/CORBA_HARNESS_4/test.py	a0d1cc6638f3f15f3a1de9d8ee99d7352071545f
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_no_tasking2', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_5/test.py	9b084452f13adfcab9160fdc11356bea3834cf53
+++ testsuite/tests/corba/harness/CORBA_HARNESS_5/test.py	9b084452f13adfcab9160fdc11356bea3834cf53
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_thread_pool_lf', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_6/test.py	6d311c82f6c37d8680beac386fee4746da4be8c3
+++ testsuite/tests/corba/harness/CORBA_HARNESS_6/test.py	6d311c82f6c37d8680beac386fee4746da4be8c3
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/harness/client', r'',
+                     r'corba/harness/server_thread_pool_hahs', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/harness/CORBA_HARNESS_7/test.py	0eb455a2b48d040941a3820fb8f66f3c2314d5ff
+++ testsuite/tests/corba/harness/CORBA_HARNESS_7/test.py	0eb455a2b48d040941a3820fb8f66f3c2314d5ff
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/harness/local', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/interop/CORBA_INTEROP_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_0/test.py	1ff2261b75a3124a5d0efadac0ff1cf607a1c396
+++ testsuite/tests/corba/interop/CORBA_INTEROP_0/test.py	1ff2261b75a3124a5d0efadac0ff1cf607a1c396
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/interop/cpp/MICO/all_types_dynclient', r'',
+                     r'corba/interop/cpp/MICO/all_types_dynserver', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/interop/CORBA_INTEROP_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_1/test.py	93b1e3d4c0a81a060f93d4f9e19eb4600e5c5e34
+++ testsuite/tests/corba/interop/CORBA_INTEROP_1/test.py	93b1e3d4c0a81a060f93d4f9e19eb4600e5c5e34
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/interop/cpp/omniORB/all_types_dynclient', r'',
+                     r'corba/interop/cpp/omniORB/all_types_dynserver', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/interop/CORBA_INTEROP_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_2/test.py	647e6bc5a42f1654fba03d56f22d9a92b18a4051
+++ testsuite/tests/corba/interop/CORBA_INTEROP_2/test.py	647e6bc5a42f1654fba03d56f22d9a92b18a4051
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/interop/cpp/TAO/all_types_dynclient', r'',
+                     r'corba/interop/cpp/TAO/all_types_dynserver', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_3/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/interop/CORBA_INTEROP_3/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_3/test.py	ef0c7484ed912eb831a122002a23f0be06ab9cef
+++ testsuite/tests/corba/interop/CORBA_INTEROP_3/test.py	ef0c7484ed912eb831a122002a23f0be06ab9cef
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/interop/cpp/omniORB/all_types_client', r'',
+                     r'../examples/corba/all_types/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_4/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/interop/CORBA_INTEROP_4/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_4/test.py	98c03befc07827a744b6d69296a9d05c7ab1741d
+++ testsuite/tests/corba/interop/CORBA_INTEROP_4/test.py	98c03befc07827a744b6d69296a9d05c7ab1741d
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/interop/cpp/omniORB/all_functions_client', r'',
+                     r'../examples/corba/all_functions/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_5/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/interop/CORBA_INTEROP_5/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/interop/CORBA_INTEROP_5/test.py	3f3ff74c817f400f9a8083a11d340b782dcec782
+++ testsuite/tests/corba/interop/CORBA_INTEROP_5/test.py	3f3ff74c817f400f9a8083a11d340b782dcec782
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/interop/cpp/TAO/all_types_dynclient', r'',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/broken_codesets.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/local/LOCAL_0/test.py	23fb2fcd10ed6daff01e5bc8280ab30b44b6ebbf
+++ testsuite/tests/corba/local/LOCAL_0/test.py	23fb2fcd10ed6daff01e5bc8280ab30b44b6ebbf
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/local/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_0/test.py	267a18f97db706e90b00f104de0770079cef4661
+++ testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_0/test.py	267a18f97db706e90b00f104de0770079cef4661
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/location_forwarding/test000/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_1/test.py	e4e84559e4f8c29b4f5db8682c7fefdffc0a7159
+++ testsuite/tests/corba/location_forwarding/LOCATION_FORWARDING_1/test.py	e4e84559e4f8c29b4f5db8682c7fefdffc0a7159
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/location_forwarding/test001/test001_client', r'',
+                     r'corba/location_forwarding/test001/test001_server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/object/OBJECT_0/test.py	361d469e9e034efcc3c14a052f9ebe31b508ffd0
+++ testsuite/tests/corba/object/OBJECT_0/test.py	361d469e9e034efcc3c14a052f9ebe31b508ffd0
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/object/test000/test000_client', r'',
+                     r'corba/object/test000/test000_server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/orb_init/ORB_INIT_0/test.py	f3d5ad870f5de47d812a79c85117767832a6d834
+++ testsuite/tests/corba/orb_init/ORB_INIT_0/test.py	f3d5ad870f5de47d812a79c85117767832a6d834
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/orb_init/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/performance/CORBA_PERFORMANCE_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/performance/CORBA_PERFORMANCE_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/performance/CORBA_PERFORMANCE_0/test.py	09e29d2242ba9e03077f05d4461f95249b4d8f6e
+++ testsuite/tests/corba/performance/CORBA_PERFORMANCE_0/test.py	09e29d2242ba9e03077f05d4461f95249b4d8f6e
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/performance/client', r'scenarios/polyorb_conf/performance.conf',
+                     r'corba/performance/server_no_tasking', r'scenarios/polyorb_conf/performance.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_0/test.py	fbca7a5b66b64e64596baea36361661f0afc07c1
+++ testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_0/test.py	fbca7a5b66b64e64596baea36361661f0afc07c1
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableinterceptor/test000/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1/test.py	8686af4940669e87d4ad8aa15ef7cc7145c7b7f5
+++ testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_1/test.py	8686af4940669e87d4ad8aa15ef7cc7145c7b7f5
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableinterceptor/test001/test001', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_2/test.py	b2aaa0f42bcd44a218f56df92e9c721e7cfeec68
+++ testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_2/test.py	b2aaa0f42bcd44a218f56df92e9c721e7cfeec68
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableinterceptor/test002/test002', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_3/test.py	56bfdcfb8894c6729ef232a3a3fe8d2a75c70ec8
+++ testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_3/test.py	56bfdcfb8894c6729ef232a3a3fe8d2a75c70ec8
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableinterceptor/test003/test003', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_4/test.py	b69c8f29369f3c1447e7a7ef590acd36224d8e09
+++ testsuite/tests/corba/portableinterceptor/CORBA_PORTABLEINTERCEPTOR_4/test.py	b69c8f29369f3c1447e7a7ef590acd36224d8e09
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/portableinterceptor/test004/client', r'',
+                     r'corba/portableinterceptor/test004/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableserver/PORTABLESERVER_0/test.py	a19b32844451698820c18c5e22facb34b7fe1420
+++ testsuite/tests/corba/portableserver/PORTABLESERVER_0/test.py	a19b32844451698820c18c5e22facb34b7fe1420
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableserver/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableserver/PORTABLESERVER_1/test.py	fcf0ef0d3eebb594da0d66f397da5cfff83b5162
+++ testsuite/tests/corba/portableserver/PORTABLESERVER_1/test.py	fcf0ef0d3eebb594da0d66f397da5cfff83b5162
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableserver/test001', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/portableserver/PORTABLESERVER_2/test.py	1463baa82fdae53584f2b0542a8d6e1225311912
+++ testsuite/tests/corba/portableserver/PORTABLESERVER_2/test.py	1463baa82fdae53584f2b0542a8d6e1225311912
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/portableserver/test002', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/rtcorba-rtcurrent/RTCURRENT_0/test.py	e1b3988f7b688e5bd64bbd698378e7ff53d826a4
+++ testsuite/tests/corba/rtcorba-rtcurrent/RTCURRENT_0/test.py	e1b3988f7b688e5bd64bbd698378e7ff53d826a4
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/rtcorba/rtcurrent/rtcurrent', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/rtcorba-rtorb/RTORB_0/test.py	8eac96978d21730754fac0b81fd8e5d5201b1ed3
+++ testsuite/tests/corba/rtcorba-rtorb/RTORB_0/test.py	8eac96978d21730754fac0b81fd8e5d5201b1ed3
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/rtcorba/rtorb/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/rtcorba-rtpoa/RTPOA_0/test.py	0b7f1a571559b94858f12fdf444958b979f72945
+++ testsuite/tests/corba/rtcorba-rtpoa/RTPOA_0/test.py	0b7f1a571559b94858f12fdf444958b979f72945
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/rtcorba/rtpoa/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/shutdown/SHUTDOWN_0/test.py	a5309db45b9efd84ff4a52b93959028a774ba13b
+++ testsuite/tests/corba/shutdown/SHUTDOWN_0/test.py	a5309db45b9efd84ff4a52b93959028a774ba13b
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/shutdown/test000_client', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/corba/shutdown/SHUTDOWN_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/corba/shutdown/SHUTDOWN_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/corba/shutdown/SHUTDOWN_1/test.py	a1c6290dbeab094863bfac52bd61ffa1d54bd05f
+++ testsuite/tests/corba/shutdown/SHUTDOWN_1/test.py	a1c6290dbeab094863bfac52bd61ffa1d54bd05f
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/shutdown/test001_client', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/chained_lists/CHAINED_LIST_0/test.py	649c3dada77dcf40bf27c6663cc2c3e76c70b6db
+++ testsuite/tests/core/chained_lists/CHAINED_LIST_0/test.py	649c3dada77dcf40bf27c6663cc2c3e76c70b6db
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/chained_lists/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/dynamic_dict/DYNAMIC_DICT_0/test.py	916779b2b27c85d980968dffab92d6f528bee857
+++ testsuite/tests/core/dynamic_dict/DYNAMIC_DICT_0/test.py	916779b2b27c85d980968dffab92d6f528bee857
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/dynamic_dict/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/fixed_point/FIXED_0/test.py	b0785c9190ae16a049453015eaf5b901712ab91e
+++ testsuite/tests/core/fixed_point/FIXED_0/test.py	b0785c9190ae16a049453015eaf5b901712ab91e
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/fixed_point/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/initialization/INIT_0/test.py	923e889c69b26a531b8e9123503e58e0bf1d4a19
+++ testsuite/tests/core/initialization/INIT_0/test.py	923e889c69b26a531b8e9123503e58e0bf1d4a19
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/initialization/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/initialization/INIT_1/test.py	dc8b188cd3945cb2a77c30cf500186cf60a1dc95
+++ testsuite/tests/core/initialization/INIT_1/test.py	dc8b188cd3945cb2a77c30cf500186cf60a1dc95
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/initialization/test001', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/initialization/INIT_2/test.py	7d92364e62d62c90e5aaddaa0ba2fb60f314c08f
+++ testsuite/tests/core/initialization/INIT_2/test.py	7d92364e62d62c90e5aaddaa0ba2fb60f314c08f
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/initialization/test002', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/initialization/INIT_3/test.py	992d550f74b270fa8eb154bd99d2515caab22d9f
+++ testsuite/tests/core/initialization/INIT_3/test.py	992d550f74b270fa8eb154bd99d2515caab22d9f
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/initialization/test003', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/initialization/INIT_4/test.py	3f07df197fe5ec9c55341a1ca4a43951161e17d7
+++ testsuite/tests/core/initialization/INIT_4/test.py	3f07df197fe5ec9c55341a1ca4a43951161e17d7
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/initialization/test004', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/obj_adapters/OA_0/test.py	14752ff3e239330f2cfdff8da046bb0c6f2c6dc9
+++ testsuite/tests/core/obj_adapters/OA_0/test.py	14752ff3e239330f2cfdff8da046bb0c6f2c6dc9
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/obj_adapters/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/obj_adapters/OA_1/test.py	b2f36cc5db8347a10aa11b793608d6db3ea9e72f
+++ testsuite/tests/core/obj_adapters/OA_1/test.py	b2f36cc5db8347a10aa11b793608d6db3ea9e72f
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/obj_adapters/test001', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/poa/POA_0/test.py	d8cd328c2a2a9416181c6efbc5741f1cae72f112
+++ testsuite/tests/core/poa/POA_0/test.py	d8cd328c2a2a9416181c6efbc5741f1cae72f112
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/poa/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/random/RANDOM_0/test.py	a34a169faeda7147f3c2e21bdbc905d16f9569ed
+++ testsuite/tests/core/random/RANDOM_0/test.py	a34a169faeda7147f3c2e21bdbc905d16f9569ed
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/random/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/sync_policies/CORE_SYNC_POLICIES_0/test.py	9a030c9a917bdb6cdc0966f7fae40136b190aa4e
+++ testsuite/tests/core/sync_policies/CORE_SYNC_POLICIES_0/test.py	9a030c9a917bdb6cdc0966f7fae40136b190aa4e
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'core/sync_policies/client', r'',
+                     r'core/sync_policies/server_no_tasking', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/tasking/TASK_0/test.py	029f54bdc4221981b90ac68d2d3063a545e8b586
+++ testsuite/tests/core/tasking/TASK_0/test.py	029f54bdc4221981b90ac68d2d3063a545e8b586
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/tasking/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/tasking/TASK_1/test.py	9a2db0c9ab147bfd2e9d13b8e5adb2d42cc2d8d5
+++ testsuite/tests/core/tasking/TASK_1/test.py	9a2db0c9ab147bfd2e9d13b8e5adb2d42cc2d8d5
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/tasking/test001', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/tasking/TASK_2/test.py	3ebacceb7afe6b9d3d3c60d5f852fc2fc4ce90af
+++ testsuite/tests/core/tasking/TASK_2/test.py	3ebacceb7afe6b9d3d3c60d5f852fc2fc4ce90af
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/tasking/test002', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/tasking/TASK_3/test.py	a9f48a6e20189d77d144275b9345a41b565a1e72
+++ testsuite/tests/core/tasking/TASK_3/test.py	a9f48a6e20189d77d144275b9345a41b565a1e72
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/tasking/test003', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/core/uri_encoding/URI_ENCODING_0/test.py	787062f6b16174e18f03bff998d88b0a8a6cbe69
+++ testsuite/tests/core/uri_encoding/URI_ENCODING_0/test.py	787062f6b16174e18f03bff998d88b0a8a6cbe69
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'core/uri_encoding/test000', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/cos/ir/IR_0/test.py	e5aa5a44895f831859c578b7b26fd4ea79203c35
+++ testsuite/tests/cos/ir/IR_0/test.py	e5aa5a44895f831859c578b7b26fd4ea79203c35
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/cos/ir/client', r'',
+                     r'corba/cos/ir/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/cos/naming/NAMING_0/test.py	a20fc47ed0503e15f3d2ec7882caa78f6e7a19d8
+++ testsuite/tests/cos/naming/NAMING_0/test.py	a20fc47ed0503e15f3d2ec7882caa78f6e7a19d8
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'corba/cos/naming/test_naming_corba', r'',
+                     r'../tools/po_cos_naming/po_cos_naming', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/cos/time/TIME_0/test.py	b88c064c898d7d75c5bc32d750b48a4d12d4ed50
+++ testsuite/tests/cos/time/TIME_0/test.py	b88c064c898d7d75c5bc32d750b48a4d12d4ed50
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'corba/cos/time/test_time', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_0/test.py	68aa225c597ee1ea1e57bf8327d51a4c0e6d649c
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_0/test.py	68aa225c597ee1ea1e57bf8327d51a4c0e6d649c
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/client', r'',
+                     r'../examples/corba/all_functions/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1/test.py	a9e16bdeda47e08878aa5a5a8b21b1c30b3881fd
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_1/test.py	a9e16bdeda47e08878aa5a5a8b21b1c30b3881fd
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/client', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/all_functions/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2/test.py	095ea4fd0e64c6d28d9a8f438d6adaf8f664d29c
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_2/test.py	095ea4fd0e64c6d28d9a8f438d6adaf8f664d29c
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/dynclient', r'',
+                     r'../examples/corba/all_functions/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3/test.py	6aaa8104fc496100e12d452b9c32cc48bb2c6589
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_3/test.py	6aaa8104fc496100e12d452b9c32cc48bb2c6589
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/dynclient', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/all_functions/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_4/test.py	81d7aa7dba5d85b38893ac9b57fc8d16d20dd365
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_4/test.py	81d7aa7dba5d85b38893ac9b57fc8d16d20dd365
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/client', r'scenarios/polyorb_conf/giop_1_0.conf',
+                     r'../examples/corba/all_functions/server', r'scenarios/polyorb_conf/giop_1_0.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_5/test.py	87e0e7439a7d748e177102e2cf098f2f17ba6581
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_5/test.py	87e0e7439a7d748e177102e2cf098f2f17ba6581
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/client', r'scenarios/polyorb_conf/giop_1_1.conf',
+                     r'../examples/corba/all_functions/server', r'scenarios/polyorb_conf/giop_1_1.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_6/test.py	17ecf31c0883d79dc14bc798df49da7e68970074
+++ testsuite/tests/examples/corba-all_functions/ALL_FUNCTIONS_6/test.py	17ecf31c0883d79dc14bc798df49da7e68970074
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_functions/client', r'scenarios/polyorb_conf/giop_1_2.conf',
+                     r'../examples/corba/all_functions/server', r'scenarios/polyorb_conf/giop_1_2.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_0/test.py	e4265b5ba5f5b7501c27a1f126e664bf41f82fc1
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_0/test.py	e4265b5ba5f5b7501c27a1f126e664bf41f82fc1
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/client', r'',
+                     r'../examples/corba/all_types/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_1/test.py	5787206f07f7dfe5e8ee1db67766458cce462035
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_1/test.py	5787206f07f7dfe5e8ee1db67766458cce462035
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/client', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_2/test.py	deff83559a903317c7eefa2a473395cc876349ba
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_2/test.py	deff83559a903317c7eefa2a473395cc876349ba
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/dynclient', r'',
+                     r'../examples/corba/all_types/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_3/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_3/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_3/test.py	dc2d40418cf86d7478a2c1e46c91ed02bf6d6657
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_3/test.py	dc2d40418cf86d7478a2c1e46c91ed02bf6d6657
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/dynclient', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_4/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_4/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_4/test.py	5f13fb1756c71da7191b9f0db57c313f60df2a23
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_4/test.py	5f13fb1756c71da7191b9f0db57c313f60df2a23
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/client', r'scenarios/polyorb_conf/ssliop.conf',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/ssliop.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_5/test.py	bde530741e5188a744cf07e049874f77ad76054a
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_5/test.py	bde530741e5188a744cf07e049874f77ad76054a
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/client', r'scenarios/polyorb_conf/giop_1_0.conf',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/giop_1_0.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_6/test.py	b6fe510f02e466e6ec6439b9b649cd6c056dba83
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_6/test.py	b6fe510f02e466e6ec6439b9b649cd6c056dba83
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/client', r'scenarios/polyorb_conf/giop_1_1.conf',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/giop_1_1.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-all_types/ALL_TYPES_7/test.py	af7461b837c089c4d285991f0849de52a1c3bee6
+++ testsuite/tests/examples/corba-all_types/ALL_TYPES_7/test.py	af7461b837c089c4d285991f0849de52a1c3bee6
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/all_types/client', r'scenarios/polyorb_conf/giop_1_2.conf',
+                     r'../examples/corba/all_types/server', r'scenarios/polyorb_conf/giop_1_2.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_0/test.py	a137b15e04e8921d2454d76e615fcd342aebe29d
+++ testsuite/tests/examples/corba-echo/ECHO_0/test.py	a137b15e04e8921d2454d76e615fcd342aebe29d
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/client', r'',
+                     r'../examples/corba/echo/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_1/test.py	a98c4323ca0913c26ca1c017cd7b21d7485c662b
+++ testsuite/tests/examples/corba-echo/ECHO_1/test.py	a98c4323ca0913c26ca1c017cd7b21d7485c662b
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/client', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/echo/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_2/test.py	ac078c610334cc58bd98d1d380fceb0e1f5e0f3f
+++ testsuite/tests/examples/corba-echo/ECHO_2/test.py	ac078c610334cc58bd98d1d380fceb0e1f5e0f3f
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/dynclient', r'',
+                     r'../examples/corba/echo/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_3/test.py	573d5e8b192de06b6ef3fb0b314b3945fb515c43
+++ testsuite/tests/examples/corba-echo/ECHO_3/test.py	573d5e8b192de06b6ef3fb0b314b3945fb515c43
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/dynclient', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/echo/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_4/test.py	c9e52764bc62e3d5365584e9b4b54b4bca540b0b
+++ testsuite/tests/examples/corba-echo/ECHO_4/test.py	c9e52764bc62e3d5365584e9b4b54b4bca540b0b
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/dynclient', r'',
+                     r'../examples/corba/echo/dynserver', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_5/test.py	b002b1a4d6669b66adc84404f2880d4aef6167fc
+++ testsuite/tests/examples/corba-echo/ECHO_5/test.py	b002b1a4d6669b66adc84404f2880d4aef6167fc
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/client', r'scenarios/polyorb_conf/giop_1_0.conf',
+                     r'../examples/corba/echo/server', r'scenarios/polyorb_conf/giop_1_0.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_6/test.py	c19dad02feb280d47ec405e2d9c394465fd998ce
+++ testsuite/tests/examples/corba-echo/ECHO_6/test.py	c19dad02feb280d47ec405e2d9c394465fd998ce
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/client', r'scenarios/polyorb_conf/giop_1_1.conf',
+                     r'../examples/corba/echo/server', r'scenarios/polyorb_conf/giop_1_1.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-echo/ECHO_7/test.py	af110eecdf05cecd91d7ab2580f5f16c17965686
+++ testsuite/tests/examples/corba-echo/ECHO_7/test.py	af110eecdf05cecd91d7ab2580f5f16c17965686
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/client', r'scenarios/polyorb_conf/giop_1_2.conf',
+                     r'../examples/corba/echo/server', r'scenarios/polyorb_conf/giop_1_2.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-random/CORBA_RANDOM_0/test.py	6dce46ed02bed61b77ac825525b7a53a0be34b66
+++ testsuite/tests/examples/corba-random/CORBA_RANDOM_0/test.py	6dce46ed02bed61b77ac825525b7a53a0be34b66
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/random/client', r'',
+                     r'../examples/corba/random/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-random/CORBA_RANDOM_1/test.py	b61a010850494f7edbb30b8d3ea229be1bc0b305
+++ testsuite/tests/examples/corba-random/CORBA_RANDOM_1/test.py	b61a010850494f7edbb30b8d3ea229be1bc0b305
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/random/client', r'scenarios/polyorb_conf/soap.conf',
+                     r'../examples/corba/random/server', r'scenarios/polyorb_conf/soap.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-rtcorba-client_propagated/RTCORBA_CLIENT_PROPAGATED_0/test.py	f83ee0cf1f7c7b6dcea97bfe4558f4aa94983ac4
+++ testsuite/tests/examples/corba-rtcorba-client_propagated/RTCORBA_CLIENT_PROPAGATED_0/test.py	f83ee0cf1f7c7b6dcea97bfe4558f4aa94983ac4
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/rtcorba/client_propagated/client', r'',
+                     r'../examples/corba/rtcorba/client_propagated/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0/test.py	2b28e439b56093378a809e48d1c96c0e828325b1
+++ testsuite/tests/examples/corba-rtcorba-dhb/RTCORBA_DHB_0/test.py	2b28e439b56093378a809e48d1c96c0e828325b1
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/rtcorba/dhb/rtcorba_iiop_client', r'',
+                     r'../examples/corba/rtcorba/dhb/rtcorba_iiop_server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0/test.py	35bc2e824be67e6584afee208d5ad2f245f3e181
+++ testsuite/tests/examples/corba-rtcorba-rtcosscheduling/RTCORBA_RTCOSSCHEDULING_0/test.py	35bc2e824be67e6584afee208d5ad2f245f3e181
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/rtcorba/rtcosscheduling/client', r'',
+                     r'../examples/corba/rtcorba/rtcosscheduling/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_0/test.py	b05bf0f80cd66aa50a08953a81be621d8589ac22
+++ testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_0/test.py	b05bf0f80cd66aa50a08953a81be621d8589ac22
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/echo/client', r'',
+                     r'../examples/corba/rtcorba/server_declared/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_1/test.py	ec64e5c98ed3e89b2be01617d30dd7f81c6bdf8d
+++ testsuite/tests/examples/corba-rtcorba-server_declared/RTCORBA_SERVER_DECLARED_1/test.py	ec64e5c98ed3e89b2be01617d30dd7f81c6bdf8d
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/rtcorba/server_declared/client', r'',
+                     r'../examples/corba/rtcorba/server_declared/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0/test.py	fbeefc45c9538c10f319a6990606ab395fdafe7b
+++ testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_0/test.py	fbeefc45c9538c10f319a6990606ab395fdafe7b
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/corba/secure_echo/gssup_example', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1/test.py	4b03d1a1d9410f0714b5c536059d5757dc1c40af
+++ testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_1/test.py	4b03d1a1d9410f0714b5c536059d5757dc1c40af
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/corba/secure_echo/tls_example', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2/test.py	f111fa79ac937964a0ddf3fe2f5121dde8612b1c
+++ testsuite/tests/examples/corba-secure_echo/CORBA_SECURE_ECHO_2/test.py	f111fa79ac937964a0ddf3fe2f5121dde8612b1c
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/corba/secure_echo/tls_gssup_example', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/corba-send/CORBA_MIOP_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/corba-send/CORBA_MIOP_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/corba-send/CORBA_MIOP_0/test.py	1fa34c814de58ac2b0702a4317bdc812a11f0b79
+++ testsuite/tests/examples/corba-send/CORBA_MIOP_0/test.py	1fa34c814de58ac2b0702a4317bdc812a11f0b79
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/corba/send/send', r'scenarios/polyorb_conf/miop.conf',
+                     r'../examples/corba/send/listener', r'scenarios/polyorb_conf/miop.conf'):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/moma/MOMA_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/moma/MOMA_0/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/moma/MOMA_0/test.py	3339674efe649e7a96c1cb0958e833f56fea17ff
+++ testsuite/tests/examples/moma/MOMA_0/test.py	3339674efe649e7a96c1cb0958e833f56fea17ff
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/moma/client', r'',
+                     r'../examples/moma/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/moma/MOMA_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
+++ testsuite/tests/examples/moma/MOMA_1/test.opt	256d3f81acf90fc4f2e607c420a7eb496f6b0758
@@ -0,0 +1 @@
+ALL XFAIL
============================================================
--- testsuite/tests/examples/moma/MOMA_1/test.py	9beac423042e6a59ce34544fbc4a6d12f58db5dd
+++ testsuite/tests/examples/moma/MOMA_1/test.py	9beac423042e6a59ce34544fbc4a6d12f58db5dd
@@ -0,0 +1,8 @@
+
+from test_utils import *
+import sys
+
+if not client_server(r'../examples/moma/client_call_back', r'',
+                     r'../examples/moma/server', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/polyorb/POLYORB_CORE_0/test.py	010053b9ca51afba7b1a56b706e8e4536eaf1ef7
+++ testsuite/tests/examples/polyorb/POLYORB_CORE_0/test.py	010053b9ca51afba7b1a56b706e8e4536eaf1ef7
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/polyorb/polyorb-test-no_tasking', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/polyorb/POLYORB_CORE_1/test.py	b05b3d2e46d13c4d8af74c6957997e82cfc1a0fd
+++ testsuite/tests/examples/polyorb/POLYORB_CORE_1/test.py	b05b3d2e46d13c4d8af74c6957997e82cfc1a0fd
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/polyorb/polyorb-test-no_tasking_poa', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/polyorb/POLYORB_CORE_2/test.py	44ae14db934212dbaca6300b106ff391b3eaca0c
+++ testsuite/tests/examples/polyorb/POLYORB_CORE_2/test.py	44ae14db934212dbaca6300b106ff391b3eaca0c
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/polyorb/polyorb-test-thread_pool', r''):
+    sys.exit(1)
+
============================================================
--- testsuite/tests/examples/polyorb/POLYORB_CORE_3/test.py	ea3a2fc70be49b54254fe2d5e2cf4dfbd33ebe9b
+++ testsuite/tests/examples/polyorb/POLYORB_CORE_3/test.py	ea3a2fc70be49b54254fe2d5e2cf4dfbd33ebe9b
@@ -0,0 +1,7 @@
+
+from test_utils import *
+import sys
+
+if not local(r'../examples/polyorb/polyorb-test-thread_pool_poa', r''):
+    sys.exit(1)
+
============================================================
--- MANIFEST	beaa6ff2ced91a674fbd62d84038eecee7ce4c8d
+++ MANIFEST	3650d7c4d95f47132a24bd91ab8215d95931b59c
@@ -6,6 +6,7 @@ README
 Makefile.in
 NEWS
 README
+README.DSA
 VERSION
 acinclude.m4
 aclocal.m4
@@ -589,13 +590,38 @@ examples/corba/send/test-printer-impl.ad
 examples/corba/send/test-controller-impl.ads
 examples/corba/send/test-printer-impl.adb
 examples/corba/send/test-printer-impl.ads
-examples/dsa/Makefile.local
-examples/dsa/echo/README
+examples/dsa/README
+examples/dsa/connections/client.adb
+examples/dsa/connections/connect.cfg
+examples/dsa/connections/connections.ads
+examples/dsa/connections/hub.adb
+examples/dsa/connections/hub.ads
+examples/dsa/connections/hub_main.adb
+examples/dsa/connections/listeners.adb
+examples/dsa/connections/listeners.ads
+examples/dsa/connections/server.adb
+examples/dsa/demo/client_main.adb
+examples/dsa/demo/matrices.adb
+examples/dsa/demo/matrices.ads
+examples/dsa/demo/noproc.adb
+examples/dsa/demo/rci.adb
+examples/dsa/demo/rci.ads
+examples/dsa/demo/rt.ads
+examples/dsa/demo/sp.ads
+examples/dsa/demo/testbed.cfg
 examples/dsa/echo/client.adb
 examples/dsa/echo/echo.cfg
 examples/dsa/echo/server.adb
 examples/dsa/echo/server.ads
-examples/dsa/local.gpr
+examples/dsa/mailboxes/client.adb
+examples/dsa/mailboxes/hub.adb
+examples/dsa/mailboxes/hub.ads
+examples/dsa/mailboxes/hub_main.adb
+examples/dsa/mailboxes/mail.cfg
+examples/dsa/mailboxes/mailboxes-active.adb
+examples/dsa/mailboxes/mailboxes-active.ads
+examples/dsa/mailboxes/mailboxes.ads
+examples/dsa/mailboxes/server.adb
 examples/moma/Makefile.local
 examples/moma/README
 examples/moma/client.adb
@@ -1324,6 +1350,7 @@ src/polyorb-binding_object_qos.ads
 src/polyorb-binding_data_qos.ads
 src/polyorb-binding_object_qos.adb
 src/polyorb-binding_object_qos.ads
+src/polyorb-binding_objects-lists.ads
 src/polyorb-binding_objects.adb
 src/polyorb-binding_objects.ads
 src/polyorb-buffers.adb
@@ -1589,6 +1616,8 @@ src/polyorb-setup.ads
 src/polyorb-setup-tasking-ravenscar.ads
 src/polyorb-setup-tasking.ads
 src/polyorb-setup.ads
+src/polyorb-smart_pointers-controlled_entities.adb
+src/polyorb-smart_pointers-controlled_entities.ads
 src/polyorb-smart_pointers-initialization.adb
 src/polyorb-smart_pointers-initialization.ads
 src/polyorb-smart_pointers.adb
@@ -1686,6 +1715,8 @@ src/polyorb-utils-htables.ads
 src/polyorb-utils-htables-perfect.adb
 src/polyorb-utils-htables-perfect.ads
 src/polyorb-utils-htables.ads
+src/polyorb-utils-ilists.adb
+src/polyorb-utils-ilists.ads
 src/polyorb-utils-random.adb
 src/polyorb-utils-random.ads
 src/polyorb-utils-report.adb
============================================================
--- compilers/gnatdist/xe_back-garlic.adb	c52091abc55e375b7c67530abb05cdb2029600eb
+++ compilers/gnatdist/xe_back-garlic.adb	db020e216021be3720439b03c028a04d168d8f57
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -529,10 +529,11 @@ package body XE_Back.GARLIC is

    procedure Generate_Executable_File (P : Partition_Id) is
       Current       : Partition_Type renames Partitions.Table (P);
+      Executable    : File_Name_Type renames Current.Executable_File;
       Partition_Dir : Directory_Name_Type renames Current.Partition_Dir;
       I_Part_Dir    : String_Access;
       Comp_Args     : String_List (1 .. 7);
-      Make_Args     : String_List (1 .. 9);
+      Make_Args     : String_List (1 .. 11);
       Sfile         : File_Name_Type;
       Prj_Fname     : File_Name_Type;

@@ -603,6 +604,10 @@ package body XE_Back.GARLIC is
       Make_Args (8) := new String'(Get_Name_String (Prj_Fname));
       Make_Args (9) := Comp_Args (7);

+      Make_Args (10) := Output_Flag;
+      Make_Args (11) :=
+        new String'(Get_Name_String (Strip_Directory (Executable)));
+
       Build (Sfile, Make_Args, Fatal => True);

       Free (Comp_Args (6));
@@ -610,6 +615,7 @@ package body XE_Back.GARLIC is

       Free (Make_Args (2));
       Free (Make_Args (8));
+      Free (Make_Args (11));
    end Generate_Executable_File;

    ----------------------------------
@@ -1364,8 +1370,7 @@ package body XE_Back.GARLIC is
       pragma Unreferenced (Self);
    begin
       if not Is_Directory (DSA_Inc_Dir) then
-         Message ("GARLIC library not found");
-         raise Fatal_Error;
+         raise Fatal_Error with "GARLIC library not found";
       end if;

       Scan_Dist_Arg ("-aI" & DSA_Inc_Dir);
============================================================
--- compilers/gnatdist/xe_back-polyorb.adb	81f191f0ef2a4fbf491be8be55bdd9d2328b36bd
+++ compilers/gnatdist/xe_back-polyorb.adb	82ab92ff04440b8503b750c15cda38655afa6788
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -132,7 +132,8 @@ package body XE_Back.PolyORB is
       PE_Rsh_Command,
       PE_Rsh_Options,
       PE_Termination_Initiator,
-      PE_Termination_Policy);
+      PE_Termination_Policy,
+      PE_Partition_Name);

    PE : array (PE_Id) of Unit_Name_Type;

@@ -141,6 +142,7 @@ package body XE_Back.PolyORB is
       PE_Rsh_Options           => PS_DSA,
       PE_Termination_Initiator => PS_DSA,
       PE_Termination_Policy    => PS_DSA,
+      PE_Partition_Name        => PS_DSA,
       PE_Start_Threads         => PS_Tasking,
       PE_Max_Spare_Threads     => PS_Tasking,
       PE_Max_Threads           => PS_Tasking,
@@ -414,24 +416,20 @@ package body XE_Back.PolyORB is
    ------------------------------

    procedure Generate_Executable_File (P : Partition_Id) is
-      Current    : Partition_Type renames Partitions.Table (P);
-      Executable : File_Name_Type;
-      Part_Dir   : Directory_Name_Type;
-      I_Part_Dir : String_Access;
-      Comp_Args  : String_List (1 .. 9);
-      Make_Args  : String_List (1 .. 8);
-      Sfile      : File_Name_Type;
-      Prj_Fname  : File_Name_Type;
-      Length     : Natural;
+      Current       : Partition_Type renames Partitions.Table (P);
+      Executable    : File_Name_Type renames Current.Executable_File;
+      Partition_Dir : Directory_Name_Type renames Current.Partition_Dir;
+      I_Part_Dir    : String_Access;
+      Comp_Args     : String_List (1 .. 9);
+      Make_Args     : String_List (1 .. 10);
+      Last          : Positive;
+      Sfile         : File_Name_Type;
+      Prj_Fname     : File_Name_Type;
+      Length        : Natural;

    begin
-      Executable := Current.Executable_File;
-      Part_Dir   := Current.Partition_Dir;
-
-      Name_Len := 2;
-      Name_Buffer (1) := '-';
-      Name_Buffer (2) := 'I';
-      Get_Name_String_And_Append (Part_Dir);
+      Set_Str_To_Name_Buffer ("-I");
+      Get_Name_String_And_Append (Partition_Dir);
       I_Part_Dir := new String'(Name_Buffer (1 .. Name_Len));

       --  Give the priority to partition and stub directory against
@@ -447,11 +445,11 @@ package body XE_Back.PolyORB is

       if Project_File_Name = null then
          Comp_Args (5) := Object_Dir_Flag;
-         Comp_Args (6) := new String'(Get_Name_String (Part_Dir));
+         Comp_Args (6) := new String'(Get_Name_String (Partition_Dir));

       else
          Comp_Args (5) := Project_File_Flag;
-         Prj_Fname     := Dir (Part_Dir, Part_Prj_File_Name);
+         Prj_Fname     := Dir (Partition_Dir, Part_Prj_File_Name);
          Comp_Args (6) := new String'(Get_Name_String (Prj_Fname));
       end if;

@@ -475,23 +473,22 @@ package body XE_Back.PolyORB is

       --  Compile elaboration file

-      Sfile := Dir (Part_Dir, Elaboration_File & ADB_Suffix_Id);
+      Sfile := Dir (Partition_Dir, Elaboration_File & ADB_Suffix_Id);
       Compile (Sfile, Comp_Args (1 .. Length));

       --  Compile storage support configuration file

-      Sfile := Dir (Part_Dir, Storage_Config_File & ADB_Suffix_Id);
+      Sfile := Dir (Partition_Dir, Storage_Config_File & ADB_Suffix_Id);
       Compile (Sfile, Comp_Args (1 .. Length));

       --  Compile main file

-      Sfile := Dir (Part_Dir, Partition_Main_File & ADB_Suffix_Id);
+      Sfile := Dir (Partition_Dir, Partition_Main_File & ADB_Suffix_Id);
       Compile (Sfile, Comp_Args (1 .. Length));

       Free (Comp_Args (6));

-      --  Now we just want to bind and link as the ALI files are now
-      --  consistent.
+      --  Now we just want to bind and link as the ALI files are now consistent

       Make_Args (1) := E_Current_Dir;
       Make_Args (2) := I_Part_Dir;
@@ -499,21 +496,27 @@ package body XE_Back.PolyORB is
       Make_Args (4) := I_Current_Dir;
       Make_Args (5) := Bind_Only_Flag;
       Make_Args (6) := Link_Only_Flag;
+      Make_Args (7) := Output_Flag;
+      Make_Args (8) :=
+        new String'(Get_Name_String (Strip_Directory (Executable)));

       if Project_File_Name = null then
-         Make_Args (7) := Output_Flag;
-         Make_Args (8) := new String'(Get_Name_String (Executable));
+         Last := 8;

       else
-         Make_Args (7) := Project_File_Flag;
-         Prj_Fname := Dir (Part_Dir, Part_Prj_File_Name);
-         Make_Args (8) := new String'(Get_Name_String (Prj_Fname));
+         Make_Args (9) := Project_File_Flag;
+         Prj_Fname := Dir (Partition_Dir, Part_Prj_File_Name);
+         Make_Args (10) := new String'(Get_Name_String (Prj_Fname));
+         Last := 10;
       end if;

-      Build (Sfile, Make_Args, Fatal => True);
+      Build (Sfile, Make_Args (1 .. Last), Fatal => True);

       Free (Make_Args (2));
       Free (Make_Args (8));
+      if Make_Args (10) /= null then
+         Free (Make_Args (10));
+      end if;
    end Generate_Executable_File;

    --------------------------------
@@ -523,7 +526,10 @@ package body XE_Back.PolyORB is
    procedure Generate_Parameters_Source (P : Partition_Id) is
       Current      : Partition_Type renames Partitions.Table (P);
    begin
+      --  Set partition name

+      Set_Conf (PE_Partition_Name, Current.Name);
+
       --  Add the termination policy to the configuration table, if no
       --  termination policy is set, the default is Global_Termination.

@@ -914,18 +920,29 @@ package body XE_Back.PolyORB is
       Write_Line (" is");
       Write_Line ("   for Externally_Built use ""true"";");
       Write_Line ("   for Source_Dirs use (""" & DSA_Inc_Dir & """);");
-      Write_Line ("   for Locally_Removed_Files use");

-      --  Overridden
+      --  The files to be removed are the only source files for the extending
+      --  project (all other sources are made visible as inherited), so we
+      --  need to first list those files as sources, then as removed.

-      Write_Line ("     (""polyorb-partition_elaboration.adb"",");
-      Write_Line ("      ""polyorb-dsa_p-storages-config.adb"",");
+      for J in 1 .. 2 loop
+         if J = 1 then
+            Write_Line ("   for Source_Files use");
+         else
+            Write_Line ("   for Locally_Removed_Files use");
+         end if;

-      --  Rebuilt as stubs
+         --  Overridden

-      Write_Line ("      ""polyorb-dsa_p-partitions.ads"",");
-      Write_Line ("      ""polyorb-dsa_p-partitions.adb"");");
+         Write_Line ("     (""polyorb-partition_elaboration.adb"",");
+         Write_Line ("      ""polyorb-dsa_p-storages-config.adb"",");

+         --  Rebuilt as stubs
+
+         Write_Line ("      ""polyorb-dsa_p-partitions.ads"",");
+         Write_Line ("      ""polyorb-dsa_p-partitions.adb"");");
+      end loop;
+
       Write_Str  ("end ");
       Write_Name (Secondary_PCS_Project);
       Write_Line (";");
@@ -1141,6 +1158,19 @@ package body XE_Back.PolyORB is
                Message ("no need to expand", Current.Name);
             end if;
          end if;
+
+         if Display_Compilation_Progress then
+            Write_Str ("completed ");
+            Write_Int (Int (J) - Int (Partition_Id'First) - 1);
+            Write_Str (" out of ");
+            Write_Int (Int (Partitions.Last) - Int (Partition_Id'First) - 1);
+            Write_Str (" (");
+            Write_Int
+              (((Int (J) - Int (Partition_Id'First) - 1) * 100)
+                  / Int (Partitions.Last - Partitions.First));
+            Write_Str ("%)...");
+            Write_Eol;
+         end if;
       end loop;

       Generate_Starter_File (Backend_Access (Self));
@@ -1157,6 +1187,10 @@ package body XE_Back.PolyORB is
                 Val     => Val);
    end Set_Conf;

+   --------------
+   -- Set_Conf --
+   --------------
+
    procedure Set_Conf (Section : Name_Id; Key : Name_Id; Val : Name_Id) is
    begin
       Last := Last + 1;
@@ -1209,9 +1243,8 @@ package body XE_Back.PolyORB is
             end;
          exception
             when others =>
-               Message
-                 ("PolyORB installation is invalid (polyorb-config failure)");
-               raise Fatal_Error;
+               raise Fatal_Error with "PolyORB installation is invalid "
+                                    & "(polyorb-config failure)";
          end;
       end if;
    end Set_PCS_Dist_Flags;
============================================================
--- compilers/gnatdist/xe_back.adb	a4bff0627c887d0f1a1170a3be80ca49235a375c
+++ compilers/gnatdist/xe_back.adb	e6031c8a2f86c92bd55a6bca1a1f8154574777e8
@@ -198,7 +198,17 @@ package body XE_Back is

                Generate_Stub (J);
             end if;
+         end if;

+         if Display_Compilation_Progress then
+            Write_Str ("completed ");
+            Write_Int (Int (J));
+            Write_Str (" out of ");
+            Write_Int (Int (ALIs.Last));
+            Write_Str (" (");
+            Write_Int (Int ((J * 100) / (ALIs.Last - ALIs.First + 1)));
+            Write_Str ("%)...");
+            Write_Eol;
          end if;
       end loop;
    end Generate_All_Stubs_And_Skels;
@@ -302,6 +312,12 @@ package body XE_Back is
       Create_File (Prj_File, Prj_Fname);
       Set_Output (Prj_File);

+      --  Note that the main subprogram for each partition is always called
+      --  partition.adb; the executable name is set using gnatmake command line
+      --  switch "-o". We do not set it through the project to ensure that
+      --  any settings inherited from the user's Builder package (in particular
+      --  global configuration pragmas) are preserved.
+
       Write_Str  ("project Partition extends all """);
       Write_Str  (Project_File_Name.all);
       Write_Line (""" is");
@@ -320,18 +336,12 @@ package body XE_Back is
             if Exec_Dir'Length = 0
               or else not Is_Absolute_Path (Exec_Dir)
             then
-               --  Reach up to main directory from
-               --  dsa/partitions/<cfg>/<partition>
+               --  Reach up to main dir from  dsa/partitions/<cfg>/<partition>
                Write_Str ("../../../../");
             end if;
             Write_Str (Exec_Dir);
          end;
          Write_Line (""";");
-         Write_Line ("   package Builder is");
-         Write_Str  ("      for Executable (""partition.adb"") use """);
-         Write_Name (Partitions.Table (P).Name);
-         Write_Line (""";");
-         Write_Line ("   end Builder;");

       else
          Write_Line ("   --  Pseudo-partition project for RCI calling stubs");
============================================================
--- compilers/gnatdist/xe_flags.ads	ef95ccb18f67845ad7caf4c185cfe0a1db336003
+++ compilers/gnatdist/xe_flags.ads	5d2516a7566b6a461e9e4b8ec52e8057ed123b6d
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -39,6 +39,7 @@ package XE_Flags is
    Verbose_Mode         : Boolean := False;
    Debug_Mode           : Boolean := False;
    Check_Readonly_Files : Boolean := False;
+   Keep_Going           : Boolean := False;

    Keep_Tmp_Files       : Boolean := False;
    --  Do not remove temporary files
@@ -53,11 +54,13 @@ package XE_Flags is
    --  exception on Windows where the MinGW environment does not support
    --  spawning arbitrary shell scripts).

+   Display_Compilation_Progress : Boolean := False;
+
    Readonly_Flag       : constant String_Access := new String'("-a");
    Bind_Only_Flag      : constant String_Access := new String'("-b");
    Compile_Only_Flag   : constant String_Access := new String'("-c");
    Object_Dir_Flag     : constant String_Access := new String'("-D");
-   Dependencies_Flag   : constant String_Access := new String'("-d");
+   Progress_Flag       : constant String_Access := new String'("-d");
    Keep_Going_Flag     : constant String_Access := new String'("-k");
    Link_Only_Flag      : constant String_Access := new String'("-l");
    Output_Flag         : constant String_Access := new String'("-o");
============================================================
--- compilers/gnatdist/xe_list.adb	017c13ddc3a72affbbea32baf8ba5060ea5d35bb
+++ compilers/gnatdist/xe_list.adb	841330bc0c7fb68fda1c2da7c4d9dbaf4fa29f73
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -40,12 +40,17 @@ package body XE_List is

 package body XE_List is

-   ------------------------
-   --  Source File Stack --
-   ------------------------
+   -----------------------
+   -- Source File Stack --
+   -----------------------

+   type Sources_Entry is record
+      Sfile : File_Name_Type;
+      Afile : File_Name_Type;
+   end record;
+
    package Sources is new GNAT.Table
-     (Table_Component_Type => File_Name_Type,
+     (Table_Component_Type => Sources_Entry,
       Table_Index_Type     => Natural,
       Table_Low_Bound      => 1,
       Table_Initial        => 20,
@@ -127,17 +132,19 @@ package body XE_List is
       procedure Get_Line;
       --  Read one line from current buffer and evaluate fields

-      function  Field (N : Natural) return String;
-      --  Return Nth field. N has to be in the range of 0 and
-      --  Number_Of_Fields. When N is zero, return the full line.
+      function Field (N : Integer) return String;
+      --  Return Nth field. N has to be in the range of 0 and Number_Of_Fields.
+      --  When N is zero, return the full line. When N < 0, the contents of
+      --  the line starting at the beginning of the |N|th field and until end
+      --  of line is returned.

-      function  Number_Of_Fields return Natural;
+      function Number_Of_Fields return Natural;
       --  Return number of fields in the current line

-      function  End_Of_File return Boolean;
+      function End_Of_File return Boolean;
       --  Return True when there is nothing else to read

-      function  Token (N : Positive) return Token_Type;
+      function Token (N : Positive) return Token_Type;
       --  Return the token corresponding to field N. When there is no
       --  such corresponding token return No_Such_Token. Note that N
       --  cannot be zero.
@@ -216,15 +223,23 @@ package body XE_List is
       -- Field --
       -----------

-      function  Field (N : Natural) return String is
+      function Field (N : Integer) return String is
+         Last : Natural;
       begin
          if N = 0 then
             return Chars (1 .. N_Chars);
          end if;
+
          if N > N_Fields then
             return "";
          end if;
-         return Chars (Fields (N).First .. Fields (N).Last);
+
+         if N < 0 then
+            Last := N_Chars;
+         else
+            Last := Fields (N).Last;
+         end if;
+         return Chars (Fields (abs N).First .. Last);
       end Field;

       --------------
@@ -555,10 +570,10 @@ package body XE_List is
       My_With     : With_Id        := No_With_Id;
       My_Sdep     : Sdep_Id        := No_Sdep_Id;
       Afile       : File_Name_Type;
-      Sfile       : File_Name_Type;

       function File_Name (N : Natural) return File_Name_Type;
-      --  Get the Nth field and return it as a file name type
+      --  Get the line contents starting with the Nth field and up to end of
+      --  line, and return it as a file name type.

       ---------------
       -- File_Name --
@@ -566,7 +581,10 @@ package body XE_List is

       function File_Name (N : Natural) return File_Name_Type is
       begin
-         return Id (Format_Pathname (Parser.Field (N), UNIX));
+         --  File names may contain whitespace, so consider not just the Nth
+         --  field but also everything up to end of line.
+
+         return Id (Format_Pathname (Parser.Field (-N), UNIX));
       end File_Name;

    begin
@@ -686,9 +704,9 @@ package body XE_List is
                   ALIs.Table (My_ALI).Sfile := File_Name (3);

                else
-                  Sfile := File_Name (3);
-                  Afile := To_Afile (Sfile);
-                  Set_ALI_Id (Afile, No_ALI_Id);
+                  --  Unexpected Sfile token
+
+                  raise Program_Error;
                end if;

             when T_Name =>
@@ -833,7 +851,6 @@ package body XE_List is

       Make_Args : constant Argument_List :=
         (Compile_Only_Flag,
-         Keep_Going_Flag,
          Project_File_Flag,
          Project_File_Name);

@@ -844,15 +861,16 @@ package body XE_List is
       ALI        : ALI_Id;
       Partition  : Partition_Id;
       Output     : File_Name_Type;
+
    begin
       --  Only use the project flags if a project has been set

       if Project_File_Name /= null then
          List_Args_Length := 3;
-         Make_Args_Length := 4;
+         Make_Args_Length := 3;
       else
          List_Args_Length := 1;
-         Make_Args_Length := 2;
+         Make_Args_Length := 1;
       end if;

       declare
@@ -876,19 +894,19 @@ package body XE_List is
          Set_Standard_Output;

          --  Build the monolithic application with a fake main subprogram
-         --  Partition. Note that we must pass the bare file name (without
+         --  Monolithic_App. Note that we must pass the bare file name (without
          --  directory information) to gnat make, Monolithic_Src_Base_Name,
          --  not Monolithic_Src_Name.

          Sfile := Monolithic_Src_Base_Name;
-         Afile := To_Afile (Sfile);
-         Build (Sfile, Make_Flags, Fatal => False);
+         Build
+           (Sfile, Make_Flags, not Keep_Going, Display_Compilation_Progress);

          --  Load the info from its ALI file

-         List ((1 => Afile), List_Flags, Output);
+         List ((1 => Monolithic_ALI_Name), List_Flags, Output);
          Load_ALIs (Output);
-         ALI := Get_ALI_Id (Afile);
+         ALI := Get_ALI_Id (Monolithic_ALI_Name);

          --  Do not delete the source file for the fake main subprogram,
          --  it is needed by List later on.
@@ -896,7 +914,7 @@ package body XE_List is
          Remove_Temp_File (Part_Main_ALI_Name);
          Remove_Temp_File (Part_Main_Obj_Name);

-         --  The compilation of partition.adb failed. There is no way to
+         --  The compilation of monolithic_app.adb failed. There is no way to
          --  rescue this situation.

          if ALI = No_ALI_Id then
@@ -916,7 +934,10 @@ package body XE_List is

                if Present (Sfile) then
                   Set_Name_Table_Byte (Sfile, 1);
-                  Sources.Append (Sfile);
+                  Sources.Append
+                    (Sources_Entry'
+                     (Sfile => Sfile,
+                      Afile => Withs.Table (K).Afile));
                end if;
             end loop;
          end loop;
@@ -928,13 +949,13 @@ package body XE_List is
                Sfiles : File_Name_List (1 .. Last);

             begin
-               --  Load in Args the sources which corresponding ALI file
-               --  is not yet available.
+               --  Load in Args the sources whose corresponding ALI file is not
+               --  yet available.

                Last := 0;
                for J in Sources.First .. Sources.Last loop
-                  Sfile := Sources.Table (J);
-                  Afile := To_Afile (Sfile);
+                  Sfile := Sources.Table (J).Sfile;
+                  Afile := Sources.Table (J).Afile;

                   --  We never tried to download this ALI file. Its info
                   --  is not a valid ALI id (not even No_ALI_Id).
@@ -975,18 +996,22 @@ package body XE_List is

                      ALI := Get_ALI_Id (Afile);
                      if ALI = No_ALI_Id then
-                        raise Compilation_Error;
+                        Get_Name_String (Sfile);
+                        raise Fatal_Error with "failed to load ALI for "
+                          & Name_Buffer (1 .. Name_Len);
                      end if;

-                     --  Check that the unit was really assigned to a
-                     --  partition we are not going to build.
+                     --  Check that the unit was really assigned to a partition
+                     --  we are not going to build.

                      Partition := Get_Partition_Id (ALIs.Table (ALI).Uname);
                      if not Units.Table (ALIs.Table (ALI).Last_Unit).RCI
                        or else Partition = No_Partition_Id
                        or else Partitions.Table (Partition).To_Build
                      then
-                        raise Compilation_Error;
+                        Get_Name_String (ALIs.Table (ALI).Uname);
+                        raise Fatal_Error with "invalid partition for "
+                          & Name_Buffer (1 .. Name_Len);
                      end if;
                   end if;

@@ -1014,7 +1039,10 @@ package body XE_List is
                           and then Get_Name_Table_Byte (Sfile) = 0
                         then
                            Set_Name_Table_Byte (Sfile, 1);
-                           Sources.Append (Sfile);
+                           Sources.Append
+                             (Sources_Entry'
+                              (Sfile => Sfile,
+                               Afile => Withs.Table (K).Afile));
                         end if;
                      end loop;
                   end loop;
============================================================
--- compilers/gnatdist/xe_main.adb	98a6d62cc9dc99e21bfad88c15d4112f1ed31d11
+++ compilers/gnatdist/xe_main.adb	6e4a4ef4eb560b3825f7ec1e5421604e4e424ae1
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -25,6 +25,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------

+with Ada.Exceptions;  use Ada.Exceptions;
+
 with XE;              use XE;
 with XE_Back;         use XE_Back;
 with XE_Back.GARLIC;  use XE_Back.GARLIC;
@@ -51,6 +53,8 @@ procedure XE_Main is
    --  If command line processing raises Usage_Error, we want to defer
    --  propagation until after calling Show_Dist_Args if in debug mode.

+   function NS (N : Name_Id) return String renames XE_Names.Get_Name_String;
+
 begin
    XE_Names.Initialize;
    begin
@@ -96,8 +100,8 @@ begin
       Configuration_File_Name := Name_Find;

       if not Is_Regular_File (Configuration_File_Name) then
-         Message ("file", Quote (Configuration_File_Name), "not found");
-         raise Fatal_Error;
+         raise Fatal_Error
+           with "file " & NS (Quote (Configuration_File_Name)) & " not found";
       end if;
    end if;

@@ -111,9 +115,9 @@ begin
    Get_Name_String (Strip_Directory (Configuration_File_Name));
    Name_Len := Name_Len - Cfg_Suffix'Length;
    if Configuration /= Name_Find then
-      Message ("configuration file name should be",
-               Quote (Configuration & Cfg_Suffix_Id));
-      raise Fatal_Error;
+      raise Fatal_Error
+        with "configuration file name should be "
+          & NS (Quote (Configuration & Cfg_Suffix_Id));
    end if;

    --  Look for a partition list on the command line. Only those partitions are
@@ -132,8 +136,8 @@ begin
       while More_Source_Files loop
          Partition := Get_Partition_Id (Next_Main_Source);
          if Partition = No_Partition_Id then
-            Message ("unknown partition", Quote (Next_Main_Source));
-            raise Fatal_Error;
+            raise Fatal_Error
+              with "unknown partition " & NS (Quote (Next_Main_Source));
          end if;
          Partitions.Table (Partition).To_Build := True;
       end loop;
@@ -164,23 +168,31 @@ exception
    when Scanning_Error =>
       Message ("*** scanning failed");
       Exit_Program (E_Fatal);
+
    when Parsing_Error =>
       Message ("*** parsing failed");
       Exit_Program (E_Fatal);
+
    when Partitioning_Error =>
       Message ("*** partitioning failed");
       Exit_Program (E_Fatal);
+
    when Usage_Error =>
       Message ("*** wrong argument(s)");
       Exit_Program (E_Fatal);
+
    when Not_Yet_Implemented =>
       Message ("*** unimplemented feature");
       Exit_Program (E_Fatal);
-   when Fatal_Error =>
+
+   when E : Fatal_Error =>
+      Message (Ada.Exceptions.Exception_Message (E));
       Message ("*** can't continue");
       Exit_Program (E_Fatal);
+
    when Compilation_Error =>
       Exit_Program (E_Fatal);
+
    when others =>
       Remove_All_Temp_Files;
       raise;
============================================================
--- compilers/gnatdist/xe_parse.adb	c524a0386ba7ea97be371dfc2010cd6d79080d4d
+++ compilers/gnatdist/xe_parse.adb	cda336845cecc5a4ed0a0fe60c085a7cbe615668
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -34,10 +34,9 @@ package body XE_Parse is

    Indent : constant String := "   ";

-   --  Set Fatal_Error to False to allow overloading. In this case, if
-   --  a litteral does not match the expected type, no error message
-   --  is printed, an exception is raised and handled in order to try
-   --  another matching.
+   --  Set Fatal_Error to False to allow overloading. In this case, if a
+   --  a literal does not match the expected type, no error message is printed,
+   --  an exception is raised and handled in order to try another matching.

    Fatal_Error    : Boolean := True;

============================================================
--- compilers/gnatdist/xe_scan.adb	d15f25466eb90e1b83b877d9ff986e6084df4a8e
+++ compilers/gnatdist/xe_scan.adb	1f8f5e6a54215dcf0f91f1084d6d61bf1d1fa670
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -135,8 +135,7 @@ package body XE_Scan is
       Read_File (File, First, Last, Buffer);

       if Buffer = null then
-         Message ("cannot open file", File);
-         raise Fatal_Error;
+         raise Fatal_Error with "cannot open file " & Get_Name_String (File);
       end if;

       Scan_Ptr       := First;
============================================================
--- compilers/gnatdist/xe_sem.adb	d19fd0a8dfd7f5114830f15f8eb4d23e47badfaa
+++ compilers/gnatdist/xe_sem.adb	1ff47ac35f71dbe29d2cc9460e7a824395579bda
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -83,13 +83,13 @@ package body XE_Sem is
    procedure Detect_Incorrect_Main_Subprogram
      (Partition : Partition_Id;
       Success   : in out Boolean);
-   --  Detect that the configured unit used as main subprogram is
-   --  really a main subprogram from the Ada point of view.
+   --  Check that the configured unit used as main subprogram is really a main
+   --  subprogram from the Ada point of view.

-   procedure Detect_Mal_Formed_Location
+   procedure Detect_Malformed_Location
      (Location : Location_Id;
       Success  : in out Boolean);
-   --  Detecte that the major location is not missing.
+   --  Check that the major location is not missing

    procedure Detect_Multiply_Assigned_Conf_Unit
      (Conf_Unit : Conf_Unit_Id;
@@ -186,32 +186,30 @@ package body XE_Sem is
       -- Use of Name Table Info --
       ----------------------------

-      --  All unit names and file names are entered into the Names
-      --  table. The Info and Byte fields of these entries are used as
-      --  follows:
+      --  All unit names and file names are entered into the Names table.
+      --  The Info and Byte fields of these entries are used as follows:
       --
       --    Unit name           Info field has Unit_Id
       --    Conf. unit name     Info field has ALI_Id
-      --                        Byte fiels has Partition_Id (*)
+      --                        Byte field has Partition_Id (*)
       --    ALI file name       Info field has ALI_Id
       --    Source file name    Info field has Unit_Id
       --
       --  (*) A (normal, RT) unit may be assigned to several partitions.

-      --  We want to detect whether these configured units are real
-      --  ada units. Set the configured unit name to No_ALI_Id. When
-      --  we load an ali file, its unit name is set to its ali id. If
-      --  a configured unit name has no ali id, it is not an Ada unit.
-      --  Assign byte field of configured unit name to No_Partition_Id
-      --  in order to detect units that are multiply assigned.
+      --  We want to detect whether these configured units are real Ada units.
+      --  Set the configured unit name to No_ALI_Id. When we load an ALI file,
+      --  its unit name is set to its ALI Id. If a configured unit name has no
+      --  ALI Id, it is not an Ada unit.
+      --  The byte field of configured unit names is used to detect multiple
+      --  assignment of a unit.

       for J in Conf_Units.First .. Conf_Units.Last loop
          Set_ALI_Id       (Conf_Units.Table (J).Name, No_ALI_Id);
          Set_Partition_Id (Conf_Units.Table (J).Name, No_Partition_Id);
       end loop;

-      --  Set name table info of conf. unit name (%s or %b removed) to
-      --  ALI id. Set use of tasking to unknown.
+      --  Set name table info of conf. unit name (%s or %b removed) to ALI Id.

       for J in ALIs.First .. ALIs.Last loop
          Set_ALI_Id (ALIs.Table (J).Uname, J);
@@ -278,7 +276,7 @@ package body XE_Sem is
       end if;

       for J in Locations.First .. Locations.Last loop
-         Detect_Mal_Formed_Location (J, OK);
+         Detect_Malformed_Location (J, OK);
       end loop;

       if not OK then
@@ -348,9 +346,8 @@ package body XE_Sem is
          Message ("find needed storage supports");
       end if;

-      --  As the analysis of needed storage supports should
-      --  update partition tasking, it must be performed
-      --  before the termination analysis.
+      --  As the analysis of needed storage supports should update partition
+      --  tasking, it must be performed before the termination analysis.

       for J in Partitions.First + 1 .. Partitions.Last loop
          if Partitions.Table (J).To_Build then
@@ -384,6 +381,7 @@ package body XE_Sem is
       Success   : in out Boolean)
    is
       procedure Detect_Storage_Constraint_Violation (SLID : Location_Id);
+      --  Needs comment???

       Current : Partition_Type renames Partitions.Table (Partition);

@@ -409,8 +407,8 @@ package body XE_Sem is
             return;
          end if;

-         --  Some storage supports cannot be used on partition wich
-         --  localy terminate
+         --  Some storage supports cannot be used on partition with local
+         --  termination.

          if Current.Termination = Local_Termination
            and then not Storage_Properties.Allow_Local_Term
@@ -439,8 +437,10 @@ package body XE_Sem is
       Part      : Partition_Id;
       Location  : Location_Id;

+   --  Start of processing for Analyze_Required_Storage_Supports
+
    begin
-      --  Lookup storage supports needed for shared passive stub
+      --  Look up storage supports needed for shared passive stub
       --  packages configured on other partitions.

       for S in Current.First_Stub .. Current.Last_Stub loop
@@ -464,8 +464,8 @@ package body XE_Sem is
          end if;
       end loop;

-      --  Lookup storage supports needed for shared passive packages
-      --  configured on this partition.
+      --  Look up storage support needed for shared passive packages configured
+      --  on this partition.

       Conf_Unit := Current.First_Unit;
       while Conf_Unit /= No_Conf_Unit_Id loop
@@ -762,7 +762,7 @@ package body XE_Sem is
       Success   : in out Boolean)
    is
       N : constant Unit_Name_Type :=
-        Partitions.Table (Partition).Main_Subprogram;
+            Partitions.Table (Partition).Main_Subprogram;
       A : ALI_Id;

    begin
@@ -771,21 +771,20 @@ package body XE_Sem is
       end if;

       A := Get_ALI_Id (N);
-      if A = No_ALI_Id
-        or else ALIs.Table (A).Main_Program = None
-      then
+      if A = No_ALI_Id or else ALIs.Table (A).Main_Program = None then
          Message ("", Quote (N), "is not a main program");
          Success := False;
       end if;
    end Detect_Incorrect_Main_Subprogram;

-   --------------------------------
-   -- Detect_Mal_Formed_Location --
-   --------------------------------
+   -------------------------------
+   -- Detect_Malformed_Location --
+   -------------------------------

-   procedure Detect_Mal_Formed_Location
+   procedure Detect_Malformed_Location
      (Location : Location_Id;
-      Success  : in out Boolean) is
+      Success  : in out Boolean)
+   is
    begin
       Get_Name_String (Locations.Table (Location).Major);
       if Name_Len = 0 then
@@ -796,7 +795,7 @@ package body XE_Sem is
          Message ("missing location name in", Quote (Name_Find));
          Success := False;
       end if;
-   end Detect_Mal_Formed_Location;
+   end Detect_Malformed_Location;

    ----------------------------------------
    -- Detect_Multiply_Assigned_Conf_Unit --
@@ -859,8 +858,8 @@ package body XE_Sem is
       A : constant ALI_Id         := Get_ALI_Id (N);

    begin
-      --  There is no ali file associated to this configured unit.
-      --  The configured unit is not an Ada unit.
+      --  If no ALI Id is associated with the unit name of the configured unit,
+      --  then it is not an Ada unit.

       if A = No_ALI_Id then
          Message ("configured unit", Quote (N), "is not an Ada unit");
============================================================
--- compilers/gnatdist/xe_usage.adb	53f18cb0bf11cea126795b3b38b3b9363f1e9def
+++ compilers/gnatdist/xe_usage.adb	0b2e65afe4db4c55f045d21d58fff6cb65ff7cac
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -59,6 +59,8 @@ begin
    Write_Eol;
    Write_Str ("  -f        Force recompilations");
    Write_Eol;
+   Write_Str ("  -k        Keep going after compilation errors");
+   Write_Eol;
    Write_Str ("  -q        Be quiet, do not display partitioning operations");
    Write_Eol;
    Write_Str ("  -v        Motivate all executed commands");
============================================================
--- compilers/gnatdist/xe_utils.adb	74d04cc35273e32850a84734cfe4f5cf2c2af286
+++ compilers/gnatdist/xe_utils.adb	eb71f5970e1ed38bd2fcd9d6806cf696ce77ddf0
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -71,8 +71,7 @@ package body XE_Utils is

    function Locate
      (Exec_Name  : String;
-      Show_Error : Boolean := True)
-     return String_Access;
+      Show_Error : Boolean := True) return String_Access;
    --  look for Exec_Name on the path. If Exec_Name is found then the full
    --  pathname for Exec_Name is returned. If Exec_Name is not found and
    --  Show_Error is set to False then null is returned. If Exec_Name is not
@@ -130,8 +129,8 @@ package body XE_Utils is

    function "&"
      (L : File_Name_Type;
-      R : String)
-      return File_Name_Type is
+      R : String) return File_Name_Type
+   is
    begin
       Name_Len := 0;
       if Present (L) then
@@ -200,10 +199,11 @@ package body XE_Utils is
    procedure Build
      (Library    : File_Name_Type;
       Arguments  : Argument_List;
-      Fatal      : Boolean := True)
+      Fatal      : Boolean := True;
+      Progress   : Boolean := False)
    is
       Length            : constant Positive :=
-                            Arguments'Length + 4
+                            Arguments'Length + 5
                             + Make_Switches.Last
                             - Make_Switches.First;
       Flags             : Argument_List (1 .. Length);
@@ -232,6 +232,13 @@ package body XE_Utils is
          Flags (N_Flags) := Verbose_Flag;
       end if;

+      if Progress then
+         --  Pass -d to gnatmake
+
+         N_Flags := N_Flags + 1;
+         Flags (N_Flags) := Progress_Flag;
+      end if;
+
       --  Library file name (free'd at exit of Compile, must record position
       --  in Flags array).

@@ -746,8 +753,7 @@ package body XE_Utils is
       begin
          Loc := GNAT.OS_Lib.Locate_Exec_On_Path (Exe);
          if Loc = null and then Show_Error then
-            Message (Exe, No_Name, "is not in your path");
-            raise Fatal_Error;
+            raise Fatal_Error with Exe & " is not in your path";
          end if;
       end;
       return Loc;
@@ -866,10 +872,13 @@ package body XE_Utils is
          return;
       end if;

-      if Program_Args = Binder or else Program_Args = Linker then
-         Add_Make_Switch (Argv);
-         return;
-      end if;
+      case Program_Args is
+         when Compiler | Binder | Linker =>
+            Add_Make_Switch (Argv);
+            return;
+         when others =>
+            null;
+      end case;

       if Project_File_Name_Expected then
          Project_File_Name          := new String'(Normalize_Pathname (Argv));
@@ -952,10 +961,15 @@ package body XE_Utils is
             --  -d: debugging traces

             if Argv'Length = 2 then
-               Debug_Mode := True;
+               Display_Compilation_Progress := True;

             else
                case Argv (Argv'First + 2) is
+                  --  -dd: debug mode
+
+                  when 'd' =>
+                     Debug_Mode := True;
+
                   --  -df: output base names only in error messages (to ensure
                   --       constant output for testsuites).

@@ -985,6 +999,10 @@ package body XE_Utils is
                   Add_List_Switch (Argv);
                   Add_Make_Switch (Argv);

+               when 'k' =>
+                  Keep_Going := True;
+                  Add_Make_Switch (Argv);
+
                when 't' =>
                   Keep_Tmp_Files := True;
                   Add_Make_Switch ("-dn");
============================================================
--- compilers/gnatdist/xe_utils.ads	35372da9b4206b30281b9b0e63d65e9cf3280a0d
+++ compilers/gnatdist/xe_utils.ads	d7c7889181a94f3184855858974cfa8a269b83d0
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 1995-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 1995-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -164,6 +164,11 @@ package XE_Utils is
    Usage_Error         : exception;   --  Command line error
    Not_Yet_Implemented : exception;

+   --  Note: Compilation_Error may be raised only when a previous build command
+   --  has already emitted an error message. Gnatdist itself will silently
+   --  exist (with an error status) in that case, and won't produce any
+   --  further error message.
+
    type Exit_Code_Type is
      (E_Success,    -- No warnings or errors
       E_Fatal);     -- Fatal (serious) error
@@ -188,7 +193,8 @@ package XE_Utils is
    procedure Build
      (Library    : File_Name_Type;
       Arguments  : Argument_List;
-      Fatal      : Boolean := True);
+      Fatal      : Boolean := True;
+      Progress   : Boolean := False);
    --  Execute gnat make and add gnatdist link flags

    procedure Compile
============================================================
--- configure.ac	6b898edb0ce723094ea72b5f5e2027497f2f56d8
+++ configure.ac	db7c56dfe04a1db7c9ad3c83baccd9fe817705dc
@@ -1,6 +1,6 @@
-# $Id: configure.ac 132303 2008-11-13 01:53:23Z duff $
+# $Id: configure.ac 144247 2009-05-19 10:14:02Z quinot $

-define(POLYORB_RELEASE, [2.6.0w])
+define(POLYORB_RELEASE, ifelse(OVERRIDE_RELEASE,,[2.6.0w],OVERRIDE_RELEASE))

 AC_PREREQ(2.57)
 AC_INIT(PolyORB, pkg_version(POLYORB_RELEASE), polyorb-bugs@lists.adacore.com)
============================================================
--- examples/dsa/client_main.adb	b8c2054360f9753bd23be71f44c6072fb0271cc9
+++ examples/dsa/demo/client_main.adb	dd86f2e031eb54e6cbe48456f3e0ea2a9e69a92e
@@ -2,11 +2,11 @@
 --                                                                          --
 --                           POLYORB COMPONENTS                             --
 --                                                                          --
---                         C L I E N T _ M A I N                            --
+--                          C L I E N T _ M A I N                           --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2005 Free Software Foundation, Inc.           --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

@@ -138,6 +138,16 @@ begin
    end;

    declare
+      L : RT.Limited_Data;
+   begin
+      RT.Show ("L1", L);
+      RCI.Add (123000, To => L);
+      RT.Show ("L2", L);
+      RCI.Add (456, To => L);
+      RT.Show ("L3", L);
+   end;
+
+   declare
       C : constant Integer := RCI.Get_Cookie;
    begin
       Put_Line ("Cookie value:" & Integer'Image (C));
@@ -154,7 +164,7 @@ begin
       Put_Line ("no exception.");
    exception
       when E : others =>
-         Put_Line ("raised " & Ada.Exceptions.Exception_Name (E));
+         Put_Line ("raised " & Ada.Exceptions.Exception_Information (E));
    end;

    begin
@@ -163,7 +173,7 @@ begin
       Put_Line ("no exception.");
    exception
       when E : others =>
-         Put_Line ("raised " & Ada.Exceptions.Exception_Name (E));
+         Put_Line ("raised " & Ada.Exceptions.Exception_Information (E));
    end;

    begin
@@ -172,6 +182,6 @@ begin
       Put_Line ("no exception.");
    exception
       when E : others =>
-         Put_Line ("raised " & Ada.Exceptions.Exception_Name (E));
+         Put_Line ("raised " & Ada.Exceptions.Exception_Information (E));
    end;
 end Client_Main;
============================================================
--- examples/dsa/matrices.adb	d574ef0dfc5c978195d5f03bbe74d1f6b05a7614
+++ examples/dsa/demo/matrices.adb	f48c3f98e76acd4a252d1f1c499e0e1134573fc8
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---            Copyright (C) 2003 Free Software Foundation, Inc.             --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

============================================================
--- examples/dsa/matrices.ads	f22f5a6a4297e30490b530bc92cfde1f3fe62b6d
+++ examples/dsa/demo/matrices.ads	8a898017395be8ed8ade5036ae0fef21023d8612
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2003 Free Software Foundation, Inc.             --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

============================================================
--- examples/dsa/rci.adb	2e54ffb7af99957599974f89b75e8ef59b56e7e2
+++ examples/dsa/demo/rci.adb	5e6ace67f1c653baa1fa81b338f29c4abe7d7710
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

@@ -177,4 +177,12 @@ package body RCI is
       raise Invisible;
    end Raise_Invisible;

+   procedure Add (X : Integer; To : in out RT.Limited_Data) is
+      To_Val : Integer;
+      for To_Val'Address use To'Address;
+      pragma Import (Ada, To_Val);
+   begin
+      To_Val := To_Val + X;
+   end Add;
+
 end RCI;
============================================================
--- examples/dsa/rci.ads	3d7b4453d313093bbca5feda10c0b975ecfe8ca7
+++ examples/dsa/demo/rci.ads	ac1276b4404248d13977d8cb491d25437dfd156d
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

@@ -77,6 +77,8 @@ package RCI is

    function echoC_4_5 (X : C_4_5) return C_4_5;

+   procedure Add (X : Integer; To : in out RT.Limited_Data);
+
    --  type Parameterless_RAS is access procedure;

    function Get_Cookie return Integer;
============================================================
--- examples/dsa/rt.ads	3637c580d90926ee48cb4d6c50fbe1aa6a19d78c
+++ examples/dsa/demo/rt.ads	3f1d3f8e168c26ef182a8b63f29f8c56531ad984
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2002 Free Software Foundation, Inc.             --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,15 +16,17 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

+with Ada.Streams; use Ada.Streams;
+
 package RT is
    pragma Remote_Types;

@@ -35,8 +37,23 @@ package RT is
    function Tekitoa (Self : Obj) return String is abstract;
    type RACW is access all Obj'Class;

-private
+   type Limited_Data is limited private;
+   procedure Read (S : access Root_Stream_Type'Class; V : out Limited_Data);
+   procedure Write (S : access Root_Stream_Type'Class; V : Limited_Data);
+   for Limited_Data'Read use Read;
+   for Limited_Data'Write use Write;

+   procedure Show (Name : String; X : Limited_Data);
+
+private
    type Obj is abstract tagged limited null record;

+   type Limited_Data is limited record
+      Value : Integer := 0;
+   end record;
+
+   for Limited_Data'Size use Integer'Size;
+   for Limited_Data use record
+      Value at 0 range 0 .. Integer'Size - 1;
+   end record;
 end RT;
============================================================
--- examples/dsa/sp.ads	a5916a1359563d3e53088ee27238db2b2f992257
+++ examples/dsa/demo/sp.ads	08bb96dcd4ee958f7173690c4fb31bcc1cef816c
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2002 Free Software Foundation, Inc.             --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

============================================================
--- examples/dsa/testbed.cfg	5bf6d9ea28999dea9fc88efb16ffc5fe5d2ac693
+++ examples/dsa/demo/testbed.cfg	d1cf575e218fa8ee88cb527a20b316151b920261
@@ -1,14 +1,13 @@
 --  Configuration file for use of DSA example with gnatdist

---  $Id: testbed.cfg 37084 2005-10-04 15:55:30Z quinot $
+--  $Id: testbed.cfg 142910 2009-04-16 14:40:01Z quinot $

 configuration Testbed is
    pragma Starter (None);
    ServerP : Partition := (Rci);
    ClientP : Partition := (SP);
-   for ClientP'Termination use Local_Termination;

    procedure Noproc is in ServerP;
-   procedure Client;
-   for ClientP'Main use Client;
+   procedure Client_Main;
+   for ClientP'Main use Client_Main;
 end Testbed;
============================================================
--- features-26	5e90266bc20d4c6bcdc0235f37465302fe1b007a
+++ features-26	41735ecbb7684cf95cc43957d8ba60913db6ca58
@@ -1,8 +1,8 @@
-========================================================
-PolyORB 2.6 NEW FEATURES LIST Current as of Feb 12, 2009
-========================================================
+=============================
+PolyORB 2.6 NEW FEATURES LIST
+=============================

-Copyright (c) 2008, AdaCore
+Copyright (C) 2009, AdaCore

 This file contains a complete list of new features in version 2.5 of PolyORB.
 See also file NEWS for various information about this release.
@@ -12,6 +12,20 @@ subsequent releases.
 subsequent to this date will contain the indicated feature, as will any
 subsequent releases.

+NF-26-I511-037 Identify originating partition in exceptions (2009-05-12)
+
+   When using the Ada DSA applicative personality, partition id information
+   is now appended to exception messages to help identifying which partition
+   raised the exception, and how it was propagated across partitions.
+
+NF-26-I320-027 Performance of neutral and protocol layers (2009-04-14)
+
+   The performance of the neutral and protocol layers has been improved
+   significantly by guarding some costly and seldom useful debugging traces
+   with appropriate configuration knobs, and by rewriting the management
+   routines for some internal data structures to avoid repeated memory
+   allocations and deallocations.
+
 NF-26-H731-006 Improved handling of unbounded string arguments (2009-02-12)

    When using the Ada DSA applicative personality, remote calls involving
============================================================
--- idls/CORBA_IDL/CORBA_InterfaceRepository.idl	7acb6f362398fce414e92996b12c22c477bc28e4
+++ idls/CORBA_IDL/CORBA_InterfaceRepository.idl	844fb3725d892426da3cc46df707e314132fa80d
@@ -4,7 +4,7 @@
 #ifdef _PRE_3_0_COMPILER_
 #pragma prefix "omg.org"
 #else
-typeprefix CORBA "omg.org"
+typeprefix CORBA "omg.org";
 #endif

     typedef string ScopedName;
============================================================
--- idls/CORBA_IDL/orb.idl	639f980419dec09a2f920474c0689d810dca5037
+++ idls/CORBA_IDL/orb.idl	9779ae7f13e7a021799b4358f670384be4f42db9
@@ -40,7 +40,7 @@ module CORBA {
 #ifdef _PRE_3_0_COMPILER_
 #pragma prefix "omg.org"
 #else
-typeprefix CORBA "omg.org"
+typeprefix CORBA "omg.org";
 #endif
 //PolyORB:WAidlac:end

============================================================
--- src/corba/corba-impl.ads	aa835283edc63b97e1deb24eef71aae532258efa
+++ src/corba/corba-impl.ads	718a38a5b5443f36dc1e1d78d91d4d887d93f70d
@@ -6,12 +6,12 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- This specification is derived from the CORBA Specification, and adapted  --
 -- for use with PolyORB. The copyright notice above, and the license        --
--- provisions that follow apply solely to the contents neither explicitly   --
--- nor implicitly specified by the CORBA Specification defined by the OMG.  --
+-- provisions that follow apply solely to the contents neither explicitely  --
+-- nor implicitely specified by the CORBA Specification defined by the OMG. --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -33,19 +33,20 @@ with PolyORB.Smart_Pointers;
 with PolyORB.Components;
 with PolyORB.Servants;
 with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;

 package CORBA.Impl is

    pragma Elaborate_Body;

-   type Object is abstract new PolyORB.Smart_Pointers.Entity
-     with private;
+   package PSPCE renames PolyORB.Smart_Pointers.Controlled_Entities;
+
+   type Object is abstract new PSPCE.Entity with private;
+
    subtype Object_Ptr is PolyORB.Smart_Pointers.Entity_Ptr;
    --  Object_Ptr is the return type of CORBA.AbstractBase.Object_Of.
-   --  It may either designate an actual local object
-   --  (a CORBA.Impl.Object'Class), or a surrogate thereof
-   --  (a PolyORB.Smart_Pointers.Entity'Class not derived from
-   --  CORBA.Impl.Object).
+   --  It may either designate an actual local object (CORBA.Impl.Object'Class)
+   --  or a surrogate thereof.

    function Execute_Servant
      (Self : not null access Object;
@@ -78,7 +79,7 @@ private
       Msg  : PolyORB.Components.Message'Class)
      return PolyORB.Components.Message'Class;

-   type Object is abstract new PolyORB.Smart_Pointers.Entity with record
+   type Object is abstract new PSPCE.Entity with record
       Neutral_View : aliased Implementation (Object'Access);
       --  The PolyORB (personality-neutral) view of this servant.
       --  See also PolyORB.Minimal_Servant.
============================================================
--- src/corba/corba-object-helper.adb	c57cd12d420117a4f3e18e7c9ce72b1f03978a36
+++ src/corba/corba-object-helper.adb	9ac407e68d900308b7d42902f4f66a276c98edfc
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -37,11 +37,9 @@ package body CORBA.Object.Helper is
    --------------

    function From_Any (Item : Any) return CORBA.Object.Ref is
-      Result : CORBA.Object.Ref;
    begin
-      CORBA.Object.Internals.Convert_To_CORBA_Ref
-        (PolyORB.Any.ObjRef.From_Any (PolyORB.Any.Any (Item)), Result);
-      return Result;
+      return CORBA.Object.Internals.To_CORBA_Ref
+        (PolyORB.Any.ObjRef.From_Any (PolyORB.Any.Any (Item)));
    end From_Any;

    ------------
============================================================
--- src/corba/corba-object.adb	67106837169e07ab8ab2cc086006b834080cf1a5
+++ src/corba/corba-object.adb	7e882b38a09a51f3a067eae19583de4e36d43d13
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -44,16 +44,11 @@ package body CORBA.Object is

    use PolyORB.Smart_Pointers;

-   type Internal_Object is new PolyORB.Smart_Pointers.Entity with record
-      The_Object : PolyORB.Objects.Object_Id_Access;
-   end record;
-   type Internal_Object_Access is access all Internal_Object;
-
    --  Client stub for remote calls implementing predefined CORBA::Object
-   --  operations
+   --  operations.

-   RPC_Result_Name   : constant PolyORB.Types.Identifier
-                         := To_PolyORB_String ("Result");
+   RPC_Result_Name : constant PolyORB.Types.Identifier :=
+                       To_PolyORB_String ("Result");

    RPC_Is_A_Op_Name  : constant Standard.String := "_is_a";
    RPC_Is_A_Arg_Name : constant PolyORB.Types.Identifier :=
@@ -81,8 +76,7 @@ package body CORBA.Object is

    function Hash
      (Self    : Ref;
-      Maximum : CORBA.Unsigned_Long)
-      return CORBA.Unsigned_Long
+      Maximum : CORBA.Unsigned_Long) return CORBA.Unsigned_Long
    is
       use PolyORB.Utils.HFunctions.Mul;

@@ -97,10 +91,7 @@ package body CORBA.Object is
    -- Get_Interface --
    -------------------

-   function Get_Interface
-     (Self : Ref)
-     return CORBA.Object.Ref'Class
-   is
+   function Get_Interface (Self : Ref) return CORBA.Object.Ref'Class is
       Request          : PolyORB.Requests.Request_Access;
       Arg_List         : PolyORB.Any.NVList.Ref;
       Result           : PolyORB.Any.NamedValue;
@@ -453,18 +444,6 @@ package body CORBA.Object is

    package body Internals is

-      -----------------------
-      -- To_PolyORB_Object --
-      -----------------------
-
-      function To_PolyORB_Object
-        (R : Ref)
-        return PolyORB.Objects.Object_Id
-      is
-      begin
-         return Internal_Object_Access (Entity_Of (R)).The_Object.all;
-      end To_PolyORB_Object;
-
       --------------------
       -- To_PolyORB_Ref --
       --------------------
@@ -481,24 +460,10 @@ package body CORBA.Object is
       function To_CORBA_Ref (R : PolyORB.References.Ref) return Ref is
          Result : Ref;
       begin
-         Convert_To_CORBA_Ref (R, Result);
+         Set (Result, PolyORB.References.Entity_Of (R));
          return Result;
       end To_CORBA_Ref;

-      --------------------------
-      -- Convert_To_CORBA_Ref --
-      --------------------------
-
-      procedure Convert_To_CORBA_Ref
-        (Neutral_Ref : PolyORB.References.Ref;
-         CORBA_Ref   : in out CORBA.Object.Ref'Class)
-      is
-         E : constant PolyORB.Smart_Pointers.Entity_Ptr
-           := PolyORB.References.Entity_Of (Neutral_Ref);
-      begin
-         Set (CORBA_Ref, E);
-      end Convert_To_CORBA_Ref;
-
    end Internals;

    ---------------
============================================================
--- src/corba/corba-object.ads	5ae29a3f4c2a911a546de7440540128ff679fbd7
+++ src/corba/corba-object.ads	ea5942a564aa71d3704415705019ed49022fde03
@@ -6,12 +6,12 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- This specification is derived from the CORBA Specification, and adapted  --
 -- for use with PolyORB. The copyright notice above, and the license        --
--- provisions that follow apply solely to the contents neither explicitly   --
--- nor implicitly specified by the CORBA Specification defined by the OMG.  --
+-- provisions that follow apply solely to the contents neither explicitely  --
+-- nor implicitely specified by the CORBA Specification defined by the OMG. --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -30,7 +30,6 @@
 --                                                                          --
 ------------------------------------------------------------------------------

-with PolyORB.Objects;
 with PolyORB.References;

 with CORBA.AbstractBase;
@@ -44,13 +43,10 @@ package CORBA.Object is

    type Ref is new CORBA.AbstractBase.Ref with private;

-   function Get_Interface
-     (Self : Ref)
-     return CORBA.Object.Ref'Class;
+   function Get_Interface (Self : Ref) return CORBA.Object.Ref'Class;

    function Is_Nil  (Self : Ref) return CORBA.Boolean;
-   function Is_Null (Self : Ref) return CORBA.Boolean
-     renames Is_Nil;
+   function Is_Null (Self : Ref) return CORBA.Boolean renames Is_Nil;

    procedure Duplicate (Self : in out Ref);

@@ -58,8 +54,7 @@ package CORBA.Object is

    function Is_A
      (Self            : Ref;
-      Logical_Type_Id : Standard.String)
-     return CORBA.Boolean;
+      Logical_Type_Id : Standard.String) return CORBA.Boolean;

    function Non_Existent (Self : Ref) return CORBA.Boolean;

@@ -100,8 +95,7 @@ package CORBA.Object is

    function Hash
      (Self    : Ref;
-      Maximum : CORBA.Unsigned_Long)
-     return CORBA.Unsigned_Long;
+      Maximum : CORBA.Unsigned_Long) return CORBA.Unsigned_Long;

    --  Implementation Note: The following policy management related
    --  Object operations were moved into child package
@@ -139,27 +133,15 @@ package CORBA.Object is
    function TC_Object return CORBA.TypeCode.Object;

    function  Object_To_String
-     (Obj : CORBA.Object.Ref'Class)
-     return CORBA.String;
+     (Obj : CORBA.Object.Ref'Class) return CORBA.String;

    package Internals is

       --  Implementation Note: This package defines internal subprograms
       --  specific to PolyORB. You must not use them.

-      function To_PolyORB_Object
-        (R : Ref)
-        return PolyORB.Objects.Object_Id;
-      --  XXX What is this supposed to do?
-      --   It is not possible in general to associate a PolyORB Object_Id
-      --   with a CORBA.Object.Ref. This can be done only when R designates
-      --   an object located on this middleware instance.
-
       function To_PolyORB_Ref (R : Ref) return PolyORB.References.Ref;
       function To_CORBA_Ref (R : PolyORB.References.Ref) return Ref;
-      procedure Convert_To_CORBA_Ref
-        (Neutral_Ref : PolyORB.References.Ref;
-         CORBA_Ref   : in out CORBA.Object.Ref'Class);
       --  Conversion functions between CORBA and neutral references.

    end Internals;
============================================================
--- src/corba/corba-orb.adb	a74270a24b312144fa0b01230403f4c6fe6ff328
+++ src/corba/corba-orb.adb	e7ec35ffe299d70cb6c2fad615ddbee7bc569d2f
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -44,7 +44,6 @@ with PolyORB.ORB;

 with PolyORB.Log;
 with PolyORB.ORB;
-with PolyORB.Objects;
 with PolyORB.Parameters;
 with PolyORB.References.IOR;
 with PolyORB.Setup;
@@ -622,32 +621,6 @@ package body CORBA.ORB is
       end if;
    end Initialize;

-   ----------------------
-   -- Create_Reference --
-   ----------------------
-
-   function Create_Reference
-     (Object : CORBA.Object.Ref;
-      Typ    : Standard.String)
-     return PolyORB.References.Ref is
-   begin
-      if The_ORB = null then
-         Raise_Internal (CORBA.Default_Sys_Member);
-      end if;
-
-      declare
-         Result : PolyORB.References.Ref;
-
-         Oid : constant PolyORB.Objects.Object_Id_Access :=
-           new PolyORB.Objects.Object_Id'
-           (CORBA.Object.Internals.To_PolyORB_Object (Object));
-      begin
-         PolyORB.ORB.Create_Reference (The_ORB, Oid, Typ, Result);
-
-         return Result;
-      end;
-   end Create_Reference;
-
    -------------------
    -- Create_Policy --
    -------------------
============================================================
--- src/corba/corba-orb.ads	aa906897ac4eb3ded98bbb78fda830d0e1891545
+++ src/corba/corba-orb.ads	880b3419411d9d3682a7795c5f8d2777b1e3324d
@@ -6,12 +6,12 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- This specification is derived from the CORBA Specification, and adapted  --
 -- for use with PolyORB. The copyright notice above, and the license        --
--- provisions that follow apply solely to the contents neither explicitly   --
--- nor implicitly specified by the CORBA Specification defined by the OMG.  --
+-- provisions that follow apply solely to the contents neither explicitely  --
+-- nor implicitely specified by the CORBA Specification defined by the OMG. --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -39,8 +39,6 @@ with CORBA.Sequences.Unbounded;
 with CORBA.Policy;
 with CORBA.Sequences.Unbounded;

-with PolyORB.References;
-
 package CORBA.ORB is

    pragma Elaborate_Body;
@@ -225,13 +223,6 @@ package CORBA.ORB is
    --  Implementation Note: this procedure is deprecated, use
    --  CORBA.ORB.Init instead

-   function Create_Reference
-     (Object : CORBA.Object.Ref;
-      Typ    : Standard.String)
-     return PolyORB.References.Ref;
-   --  Create an object reference that designates object Oid
-   --  of type Typ within this ORB.
-
    -------------------------------------
    -- CORBA.ORB Exceptions Management --
    -------------------------------------
============================================================
--- src/corba/polyorb-corba_p-interceptors_hooks.ads	98eaddd0e37a6905523f11a7e60b895564db8cfb
+++ src/corba/polyorb-corba_p-interceptors_hooks.ads	aed849baa66bd04eae5b88c9cbce4483adf3a260
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2004-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -31,16 +31,18 @@ with PolyORB.Requests;
 with PolyORB.Errors;
 with PolyORB.POA;
 with PolyORB.Requests;
-with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;

 package PolyORB.CORBA_P.Interceptors_Hooks is

+   package PSPCE renames PolyORB.Smart_Pointers.Controlled_Entities;
+
    type Client_Invoke_Handler is access procedure
      (Self  : PolyORB.Requests.Request_Access;
       Flags : PolyORB.Requests.Flags);

    type Server_Invoke_Handler is access procedure
-     (Self    : access PolyORB.Smart_Pointers.Entity'Class;
+     (Self    : access PSPCE.Entity'Class;
       --  Actually must be PortableServer.DynamicImplementation'Class.
       Request : PolyORB.Requests.Request_Access;
       Profile : PolyORB.Binding_Data.Profile_Access);
============================================================
--- src/corba/polyorb-corba_p-local.ads	ebcf72aace438dfd761f113048b97257ab52b7fa
+++ src/corba/polyorb-corba_p-local.ads	a2dda3cf96c7a578dbc26a8aefe9cba6f4be403c
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2004-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -28,11 +28,13 @@ with PolyORB.Smart_Pointers;
 with CORBA.Object;

 with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;

 package PolyORB.CORBA_P.Local is

    type Local_Object_Base is
-      abstract new PolyORB.Smart_Pointers.Entity with null record;
+      abstract new PolyORB.Smart_Pointers.Controlled_Entities.Entity
+      with null record;

    type Local_Object_Base_Ref is access all Local_Object_Base'Class;

============================================================
--- src/corba/polyorb-corba_p-policy.ads	ec6aa6561b854cc389e1fc3a118298abfd52d1a9
+++ src/corba/polyorb-corba_p-policy.ads	91a076df115ca593c8c518d25c4003d11ca73d56
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2003 Free Software Foundation, Inc.             --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,23 +16,25 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

 with CORBA;

-with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;

 package PolyORB.CORBA_P.Policy is

-   type Policy_Object_Type is new PolyORB.Smart_Pointers.Entity with private;
+   package PSPCE renames PolyORB.Smart_Pointers.Controlled_Entities;

+   type Policy_Object_Type is new PSPCE.Entity with private;
+
    type Policy_Object_Ptr is access all Policy_Object_Type'Class;

    function Get_Policy_Type
@@ -53,7 +55,7 @@ private

 private

-   type Policy_Object_Type is new PolyORB.Smart_Pointers.Entity with record
+   type Policy_Object_Type is new PSPCE.Entity with record
       Policy : CORBA.PolicyType;
       Value  : CORBA.Any;
    end record;
============================================================
--- src/corba/portableinterceptor/polyorb-corba_p-interceptors.adb	33539a6fd20c74ca0a00d77d2abdedbe279fb449
+++ src/corba/portableinterceptor/polyorb-corba_p-interceptors.adb	fe5649fdf103fa33e133623f45760cdbadc7bacc
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2004-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -42,7 +42,7 @@ with PolyORB.Request_QoS;
 with PolyORB.References;
 with PolyORB.Requests;
 with PolyORB.Request_QoS;
-with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;
 with PolyORB.Tasking.Mutexes;
 with PolyORB.Tasking.Threads.Annotations;
 with PolyORB.Utils.Chained_Lists;
@@ -68,6 +68,8 @@ package body PolyORB.CORBA_P.Interceptor
    use PolyORB.Tasking.Threads.Annotations;
    use type PolyORB.Any.TypeCode.Local_Ref;

+   package PSPCE renames PolyORB.Smart_Pointers.Controlled_Entities;
+
    --  Client Interceptors

    function "="
@@ -123,7 +125,7 @@ package body PolyORB.CORBA_P.Interceptor
    All_Server_Interceptors : ServerRequestInterceptor_Lists.List;

    procedure Server_Invoke
-     (Servant : access PolyORB.Smart_Pointers.Entity'Class;
+     (Servant : access PSPCE.Entity'Class;
       Request : PolyORB.Requests.Request_Access;
       Profile : PolyORB.Binding_Data.Profile_Access);

@@ -516,13 +518,12 @@ package body PolyORB.CORBA_P.Interceptor

       Req_Id  : constant CORBA.Unsigned_Long := Allocate_Request_Id;

-      Target  : CORBA.Object.Ref;
+      Target  : constant CORBA.Object.Ref :=
+                  CORBA.Object.Internals.To_CORBA_Ref (Request.Target);
       TSC     : Slots_Note;
       Index   : Natural;

    begin
-      CORBA.Object.Internals.Convert_To_CORBA_Ref (Request.Target, Target);
-
       --  Getting thread scope slots information (allocating thread scope
       --  slots if it is not allocated), and make "logical copy" and place it
       --  in the request.
@@ -964,7 +965,7 @@ package body PolyORB.CORBA_P.Interceptor
    -------------------

    procedure Server_Invoke
-     (Servant : access PolyORB.Smart_Pointers.Entity'Class;
+     (Servant : access PSPCE.Entity'Class;
       Request : PolyORB.Requests.Request_Access;
       Profile : PolyORB.Binding_Data.Profile_Access)
    is
============================================================
--- src/corba/portableinterceptor/portableinterceptor-clientrequestinfo-impl.adb	cac49b4a2e4473fd221126bf44c67e0e8029cffa
+++ src/corba/portableinterceptor/portableinterceptor-clientrequestinfo-impl.adb	c3de8260da334b5da747b383621e9ce5c2894198
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2004-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -339,16 +339,10 @@ package body PortableInterceptor.ClientR
    --------------------------

    function Get_Effective_Target
-     (Self : access Object)
-      return CORBA.Object.Ref
+     (Self : access Object) return CORBA.Object.Ref
    is
-      Result : CORBA.Object.Ref;
-
    begin
-      CORBA.Object.Internals.Convert_To_CORBA_Ref
-        (Self.Request.Target, Result);
-
-      return Result;
+      return CORBA.Object.Internals.To_CORBA_Ref (Self.Request.Target);
    end Get_Effective_Target;

    --------------------
============================================================
--- src/corba/portableinterceptor/portableinterceptor-requestinfo-impl.adb	48c4ae913c97a8cc8746d665bdbd325aa6449564
+++ src/corba/portableinterceptor/portableinterceptor-requestinfo-impl.adb	2e0f63207cc029df0ab83756522ef633e44d3b97
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2004-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -128,15 +128,10 @@ package body PortableInterceptor.Request
                      PolyORB.Errors.Helper.From_Any
                        (Self.Request.Exception_Info);
          Ref     : PolyORB.References.Ref;
-         Result  : CORBA.Object.Ref;
       begin
          PolyORB.References.Set
-           (Ref,
-            PolyORB.Smart_Pointers.Entity_Of (Members.Forward_Reference));
-
-         CORBA.Object.Internals.Convert_To_CORBA_Ref (Ref, Result);
-
-         return Result;
+           (Ref, PolyORB.Smart_Pointers.Entity_Of (Members.Forward_Reference));
+         return CORBA.Object.Internals.To_CORBA_Ref (Ref);
       end;
    end Get_Forward_Reference;

============================================================
--- src/corba/portableserver-current.adb	91160a73769d5b1532f8f49c5056cda45a986c3d
+++ src/corba/portableserver-current.adb	669e5f4863f051651cdcc9866deea0a02887883e
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -211,12 +211,8 @@ package body PortableServer.Current is

    function Get_Reference (Self : Local_Ref) return CORBA.Object.Ref is
       pragma Unreferenced (Self);
-
       use type PolyORB.Requests.Request_Access;
-
       Note   : PortableServer_Current_Note;
-      Result : CORBA.Object.Ref;
-
    begin
       Get_Note (Get_Current_Thread_Notepad.all, Note,
                 Null_PortableServer_Current_Note);
@@ -225,10 +221,7 @@ package body PortableServer.Current is
          Raise_NoContext ((CORBA.IDL_Exception_Members with null record));
       end if;

-      CORBA.Object.Internals.Convert_To_CORBA_Ref
-        (Note.Request.Target, Result);
-
-      return Result;
+      return CORBA.Object.Internals.To_CORBA_Ref (Note.Request.Target);
    end Get_Reference;

    -----------------
============================================================
--- src/corba/portableserver-poa.adb	1dbebd0259567e516a0ef0e7d9514c931abff12e
+++ src/corba/portableserver-poa.adb	b8f54372ff8c7c845d1e7f0cf63b5f474f8b0916
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -371,19 +371,16 @@ package body PortableServer.POA is
          Oid : aliased PolyORB.POA_Types.Object_Id :=
            PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);

-         P_Result : PolyORB.References.Ref;
-         C_Result : CORBA.Object.Ref;
+         Result : PolyORB.References.Ref;
       begin
          PolyORB.ORB.Create_Reference
            (PolyORB.Setup.The_ORB,
             Oid'Access,
             CORBA.To_Standard_String (Intf),
-            P_Result);
+            Result);
          --  Obtain object reference.

-         CORBA.Object.Internals.Convert_To_CORBA_Ref
-           (P_Result, C_Result);
-         return C_Result;
+         return CORBA.Object.Internals.To_CORBA_Ref (Result);
       end;
    end Create_Reference;

@@ -418,20 +415,16 @@ package body PortableServer.POA is
          A_Oid : aliased PolyORB.POA_Types.Object_Id :=
            PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);

-         P_Result : PolyORB.References.Ref;
-         C_Result : CORBA.Object.Ref;
+         Result : PolyORB.References.Ref;
       begin
          PolyORB.ORB.Create_Reference
            (PolyORB.Setup.The_ORB,
             A_Oid'Access,
             CORBA.To_Standard_String (Intf),
-            P_Result);
+            Result);
          --  Obtain object reference.

-         CORBA.Object.Internals.Convert_To_CORBA_Ref
-           (P_Result, C_Result);
-
-         return C_Result;
+         return CORBA.Object.Internals.To_CORBA_Ref (Result);
       end;
    end Create_Reference_With_Id;

@@ -1475,8 +1468,7 @@ package body PortableServer.POA is

       TID : constant Standard.String :=
               PortableServer.Internals.Get_Type_Id (P_Servant);
-      P_Result : PolyORB.References.Ref;
-      C_Result : CORBA.Object.Ref;
+      Result : PolyORB.References.Ref;

       Error : PolyORB.Errors.Error_Container;
    begin
@@ -1492,7 +1484,7 @@ package body PortableServer.POA is
       end if;

       PolyORB.ORB.Create_Reference
-        (PolyORB.Setup.The_ORB, Oid, TID, P_Result);
+        (PolyORB.Setup.The_ORB, Oid, TID, Result);
       --  Obtain object reference.

       PolyORB.POA_Types.Free (Oid);
@@ -1502,10 +1494,7 @@ package body PortableServer.POA is

       Associate_To_Domain_Managers (P_Servant);

-      CORBA.Object.Internals.Convert_To_CORBA_Ref
-        (P_Result, C_Result);
-
-      return C_Result;
+      return CORBA.Object.Internals.To_CORBA_Ref (Result);
    end Servant_To_Reference;

    -----------------
============================================================
--- src/corba/portableserver.adb	d4a8dd7c9278a39b665b62ab5f09c9cd7de4616d
+++ src/corba/portableserver.adb	edb5a02c82b0284a6305260bf624385996b7eb5b
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -37,7 +37,6 @@ with PolyORB.Servants.Iface;
 with PolyORB.Initialization;
 with PolyORB.Log;
 with PolyORB.Servants.Iface;
-with PolyORB.Smart_Pointers;
 with PolyORB.Tasking.Threads.Annotations;
 with PolyORB.Utils.Chained_Lists;
 with PolyORB.Utils.Strings;
@@ -52,6 +51,7 @@ package body PortableServer is
    function C (Level : Log_Level := Debug) return Boolean
      renames L.Enabled;

+   use PolyORB.CORBA_P.Interceptors_Hooks;
    use PolyORB.Utils.Strings;

    ---------------------------------------
@@ -77,29 +77,29 @@ package body PortableServer is
       Skeleton : Internals.Request_Dispatcher;
    end record;

-   Null_Dispatcher_Note : constant Dispatcher_Note
-     := (PolyORB.Annotations.Note with Skeleton => null);
+   Null_Dispatcher_Note : constant Dispatcher_Note :=
+                            (PolyORB.Annotations.Note with Skeleton => null);

    procedure Default_Invoke
-     (Servant : access PolyORB.Smart_Pointers.Entity'Class;
+     (Servant : access PSPCE.Entity'Class;
       Request : PolyORB.Requests.Request_Access;
       Profile : PolyORB.Binding_Data.Profile_Access);
-   --  This is the default server side invocation handler.
+   --  This is the default server side invocation handler

    --------------------
    -- Default_Invoke --
    --------------------

    procedure Default_Invoke
-     (Servant : access PolyORB.Smart_Pointers.Entity'Class;
+     (Servant : access PSPCE.Entity'Class;
       Request : PolyORB.Requests.Request_Access;
       Profile : PolyORB.Binding_Data.Profile_Access)
    is
       pragma Unreferenced (Profile);
    begin
-      Invoke (DynamicImplementation'Class (Servant.all)'Access,
-              Request);
       --  Redispatch
+
+      Invoke (DynamicImplementation'Class (Servant.all)'Access, Request);
    end Default_Invoke;

    ---------------------
============================================================
--- src/corba/rtcorba/rtcorba-current.adb	f26a512485f78e29871b6201827eb8af747e46d6
+++ src/corba/rtcorba/rtcorba-current.adb	9a09e19e2c73b09a77cc3e8c68865339b540b9bb
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -54,13 +54,10 @@ package body RTCORBA.Current is

    function Create return CORBA.Object.Ref is
       Result : Local_Ref;
-
-      Current : constant PolyORB.Smart_Pointers.Entity_Ptr
-        := new Current_Object;
-
+      Current : constant PolyORB.Smart_Pointers.Entity_Ptr :=
+                  new Current_Object;
    begin
       Set (Result, Current);
-
       return CORBA.Object.Ref (Result);
    end Create;

============================================================
--- src/corba/rtcorba/rtcorba-current.ads	181aca4bca3b31d0190a87cf168c874dd0705b24
+++ src/corba/rtcorba/rtcorba-current.ads	22a004fd9f1ec7f428689d1bd91ba5525133aaf1
@@ -6,12 +6,12 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- This specification is derived from the CORBA Specification, and adapted  --
 -- for use with PolyORB. The copyright notice above, and the license        --
--- provisions that follow apply solely to the contents neither explicitly   --
--- nor implicitly specified by the CORBA Specification defined by the OMG.  --
+-- provisions that follow apply solely to the contents neither explicitely  --
+-- nor implicitely specified by the CORBA Specification defined by the OMG. --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -38,11 +38,12 @@ package RTCORBA.Current is
    type Local_Ref is new CORBA.Current.Local_Ref with private;

    function Get_The_Priority (Self : Local_Ref) return RTCORBA.Priority;
-   procedure Set_The_Priority (Self : Local_Ref; To   : RTCORBA.Priority);
+   procedure Set_The_Priority (Self : Local_Ref; To : RTCORBA.Priority);

 private

    type Local_Ref is new CORBA.Current.Local_Ref with null record;
-   type Current_Object is new PolyORB.Smart_Pointers.Entity with null record;
+   type Current_Object is new PolyORB.Smart_Pointers.Non_Controlled_Entity
+     with null record;

 end RTCORBA.Current;
============================================================
--- src/corba/rtcorba/rtcorba-rtorb.ads	99025f81078249b4cd07bd9e969821cb3328c5d1
+++ src/corba/rtcorba/rtcorba-rtorb.ads	ce280560710036613627002175db16d57edf4abc
@@ -6,12 +6,12 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- This specification is derived from the CORBA Specification, and adapted  --
 -- for use with PolyORB. The copyright notice above, and the license        --
--- provisions that follow apply solely to the contents neither explicitly   --
--- nor implicitly specified by the CORBA Specification defined by the OMG.  --
+-- provisions that follow apply solely to the contents neither explicitely  --
+-- nor implicitely specified by the CORBA Specification defined by the OMG. --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -40,10 +40,12 @@ with PolyORB.Std;

 with PolyORB.Std;

-with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;

 package RTCORBA.RTORB is

+   package PSPCE renames PolyORB.Smart_Pointers.Controlled_Entities;
+
    type Local_Ref is new CORBA.Object.Ref with private;

    function Create_Mutex
@@ -149,7 +151,6 @@ private
 private

    type Local_Ref is new CORBA.Object.Ref with null record;
+   type RTORB_Object is new PSPCE.Entity with null record;

-   type RTORB_Object is new PolyORB.Smart_Pointers.Entity with null record;
-
 end RTCORBA.RTORB;
============================================================
--- src/corba/rtcorba/rtportableserver-poa.adb	22e7ab563596f6771c2726620f52c4f355bb0084
+++ src/corba/rtcorba/rtportableserver-poa.adb	8be1768c780a4f1e73aff3a1688173190dff7cfb
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2004-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -115,21 +115,19 @@ package body RTPortableServer.POA is
       end if;

       declare
-         Oid : aliased PolyORB.POA_Types.Object_Id
-           := PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);
-
-         P_Result : PolyORB.References.Ref;
-         C_Result : CORBA.Object.Ref;
+         Oid : aliased PolyORB.POA_Types.Object_Id :=
+                 PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);
+         Result : PolyORB.References.Ref;
       begin
+         --  Obtain object reference
+
          PolyORB.ORB.Create_Reference
            (PolyORB.Setup.The_ORB,
             Oid'Access,
             CORBA.To_Standard_String (Intf),
-            P_Result);
-         --  Obtain object reference
+            Result);

-         CORBA.Object.Internals.Convert_To_CORBA_Ref (P_Result, C_Result);
-         return C_Result;
+         return CORBA.Object.Internals.To_CORBA_Ref (Result);
       end;
    end Create_Reference_With_Priority;

@@ -149,8 +147,8 @@ package body RTPortableServer.POA is

       Error : PolyORB.Errors.Error_Container;

-      RT_POA : constant PolyORB.RT_POA.RT_Obj_Adapter_Access
-        := To_RT_POA (Self);
+      RT_POA : constant PolyORB.RT_POA.RT_Obj_Adapter_Access :=
+                 To_RT_POA (Self);

       U_Oid : PolyORB.POA_Types.Unmarshalled_Oid;

@@ -174,22 +172,19 @@ package body RTPortableServer.POA is
       end if;

       declare
-         A_Oid : aliased PolyORB.POA_Types.Object_Id
-           := PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);
-
-         P_Result : PolyORB.References.Ref;
-         C_Result : CORBA.Object.Ref;
+         A_Oid : aliased PolyORB.POA_Types.Object_Id :=
+                   PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);
+         Result : PolyORB.References.Ref;
       begin
+         --  Obtain object reference
+
          PolyORB.ORB.Create_Reference
            (PolyORB.Setup.The_ORB,
             A_Oid'Access,
             CORBA.To_Standard_String (Intf),
-            P_Result);
-         --  Obtain object reference
+            Result);

-         CORBA.Object.Internals.Convert_To_CORBA_Ref (P_Result, C_Result);
-
-         return C_Result;
+         return CORBA.Object.Internals.To_CORBA_Ref (Result);
       end;
    end Create_Reference_With_Id_And_Priority;

@@ -228,9 +223,8 @@ package body RTPortableServer.POA is
       end if;

       declare
-         Oid : constant PolyORB.POA_Types.Object_Id
-           := PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);
-
+         Oid : constant PolyORB.POA_Types.Object_Id :=
+                 PolyORB.POA_Types.U_Oid_To_Oid (U_Oid);
       begin
          return PortableServer.Internals.To_PortableServer_ObjectId (Oid);
       end;
@@ -256,8 +250,8 @@ package body RTPortableServer.POA is

       U_Oid : PolyORB.POA_Types.Unmarshalled_Oid;

-      A_Oid : aliased PolyORB.POA_Types.Object_Id
-        := PortableServer.Internals.To_PolyORB_Object_Id (Oid);
+      A_Oid : aliased PolyORB.POA_Types.Object_Id :=
+                PortableServer.Internals.To_PolyORB_Object_Id (Oid);

    begin
       PolyORB.RT_POA.Activate_Object_With_Id_And_Priority
============================================================
--- src/corba/security/polyorb-corba_p-security_policy.adb	d33e32f266bfa0569a8e078f059bb9add23d7c12
+++ src/corba/security/polyorb-corba_p-security_policy.adb	420c58225df4944e0fa5fafb06958df1d53dcc4f
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -60,18 +60,14 @@ package body PolyORB.CORBA_P.Security_Po
    is
       use PolyORB.Security.Types;

-      Target   : CORBA.Object.Ref;
-      Creds    : Credentials_List_Access                    := null;
+      Target   : constant CORBA.Object.Ref :=
+                   CORBA.Object.Internals.To_CORBA_Ref (Object);
+      Creds    : Credentials_List_Access := null;
       Requires : PolyORB.Security.Types.Association_Options := 0;

    begin
-      --  Convert PolyORB's reference into CORBA reference for retrieve
-      --  effective policies
+      --  Analize overridden policy

-      CORBA.Object.Internals.Convert_To_CORBA_Ref (Object, Target);
-
-      --  Analize overrided policy
-
       for J in Registry'Range loop
          if Registry (J).Registered then
             declare
============================================================
--- src/corba/security/polyorb-corba_p-tss_state_machine.adb	935417d2bbbedf813b37253f563ade29760ff8d1
+++ src/corba/security/polyorb-corba_p-tss_state_machine.adb	7f18155aa966fc3bc024feb5ff3a5b06413c900b
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -53,7 +53,6 @@ with PolyORB.Security.Types;
 with PolyORB.Security.Security_Manager;
 with PolyORB.Security.Transport_Mechanisms;
 with PolyORB.Security.Types;
-with PolyORB.Smart_Pointers;
 with PolyORB.Tasking.Threads.Annotations;
 with PolyORB.Types;
 with PolyORB.Utils.Strings;
@@ -77,7 +76,7 @@ package body PolyORB.CORBA_P.TSS_State_M
       Error : in out PolyORB.Errors.Error_Container);

    procedure Server_Invoke
-     (Self    : access PolyORB.Smart_Pointers.Entity'Class;
+     (Self    : access PSPCE.Entity'Class;
       Request :        PolyORB.Requests.Request_Access;
       Profile :        PolyORB.Binding_Data.Profile_Access);

@@ -295,7 +294,7 @@ package body PolyORB.CORBA_P.TSS_State_M
    -------------------

    procedure Server_Invoke
-     (Self    : access PolyORB.Smart_Pointers.Entity'Class;
+     (Self    : access PSPCE.Entity'Class;
       Request :        PolyORB.Requests.Request_Access;
       Profile :        PolyORB.Binding_Data.Profile_Access)
    is
============================================================
--- src/dsa/polyorb-dsa_p-partitions.adb	cf4a01c3a51b6a8160470aac2705af082d2d75f5
+++ src/dsa/polyorb-dsa_p-partitions.adb	4cc91b88d4cca15409dca42c30d6f3845c8911b3
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -43,8 +43,12 @@ package body PolyORB.DSA_P.Partitions is
      renames L.Enabled;

    Partitions_Mutex : Mutex_Access;
-   Next_Partition_ID : Integer := 0;

+   Next_Partition_ID : Integer := 1;
+   --  ID to be assigned to the next requesting partition. Note that we start
+   --  at 1 because the value 0 is reserved to denote the unset (initial) state
+   --  of System.Standard_Library.Local_Parition_ID.
+
    function Elaborate return Boolean;
    --  Initialize the Partitions_Mutex and set the local partition ID.
    --  See comment at end of this unit for explanation of why a function
@@ -54,14 +58,14 @@ package body PolyORB.DSA_P.Partitions is
    -- Allocate_Partition_ID --
    ---------------------------

-   function Allocate_Partition_ID (Name : String) return Integer
-   is
+   function Allocate_Partition_ID (Name : String) return Integer is
       Current_Partition_ID : Integer;
    begin
       Enter (Partitions_Mutex);
       Current_Partition_ID := Next_Partition_ID;
       Next_Partition_ID := Next_Partition_ID + 1;
       Leave (Partitions_Mutex);
+
       pragma Debug
         (C, O ("Assigned partition id"
               & Integer'Image (Current_Partition_ID)
@@ -82,7 +86,9 @@ package body PolyORB.DSA_P.Partitions is
       --  possible race condition.

       Set_Local_Partition_ID
-        (System.RPC.Partition_ID (Allocate_Partition_ID ("main partition")));
+        (System.RPC.Partition_ID
+         (Allocate_Partition_ID (Get_Local_Partition_Name
+                                 & " (main partition)")));
       return True;
    end Elaborate;

============================================================
--- src/dsa/polyorb-dsa_p-storages-dfs.adb	c1cd2fe74b765dd90eedf741273c7a060df89c7c
+++ src/dsa/polyorb-dsa_p-storages-dfs.adb	db1d0fdd06faa2dcd91288720a5fa09de21a4b92
@@ -2,11 +2,11 @@
 --                                                                          --
 --                           POLYORB COMPONENTS                             --
 --                                                                          --
---             P O L Y O R B . D S A _ P . S T O R A G E S . D F S          --
+--           P O L Y O R B . D S A _ P . S T O R A G E S . D F S            --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2008, Free Software Foundation, Inc.               --
+--         Copyright (C) 2008-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -393,7 +393,7 @@ package body PolyORB.DSA_P.Storages.DFS

       declare
          Stream : constant Stream_Element_Array :=
-           To_Stream_Element_Array (Buffer);
+                    To_Stream_Element_Array (Buffer.all);
       begin
          SIO.Write (Self.File, Stream);
       end;
============================================================
--- src/dsa/polyorb-dsa_p-storages-dfs.ads	4df1df06a360ffcb64d19d80d40200bcb2a48a2c
+++ src/dsa/polyorb-dsa_p-storages-dfs.ads	b9dc98ad6fa8300ba8b7d7960b752d6749a8a5d3
@@ -2,11 +2,11 @@
 --                                                                          --
 --                           POLYORB COMPONENTS                             --
 --                                                                          --
---             P O L Y O R B . D S A _ P . S T O R A G E S . D F S          --
+--           P O L Y O R B . D S A _ P . S T O R A G E S . D F S            --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2008, Free Software Foundation, Inc.               --
+--         Copyright (C) 2008-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -32,7 +32,10 @@ with GNAT.OS_Lib;

 with GNAT.OS_Lib;

+pragma Warnings (Off);
+--  System.Global_Locks is an internal GNAT unit
 with System.Global_Locks;
+pragma Warnings (On);

 with PolyORB.Tasking.Mutexes;
 with PolyORB.Any;
============================================================
--- src/dsa/polyorb-dsa_p-storages.ads	45141972daef2ba76708f78b0195a839e4f94ff3
+++ src/dsa/polyorb-dsa_p-storages.ads	c20ca5a811ef06d1270ff7a8a549865ce9c99d39
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2008, Free Software Foundation, Inc.               --
+--       Copyright (C) 2008-2009, Free Software Foundation, Inc.            --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -27,7 +27,10 @@ pragma Ada_2005;

 pragma Ada_2005;

+pragma Warnings (Off);
+--  System.DSA_Types is an internal GNAT unit
 with System.DSA_Types;
+pragma Warnings (On);

 package PolyORB.DSA_P.Storages is

============================================================
--- src/dsa/s-dsaser.adb	53892596df0d20891d7656a9b82bbe69fa845c51
+++ src/dsa/s-dsaser.adb	93a9aa012448b6919cfdf3d6f0046987ef8b1587
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2006-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2006-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -47,9 +47,8 @@ begin
    use System.Partition_Interface;

 begin
+   --  Check that the PCS is initialized

-   --  Check that PCS is initialized
-
    pragma Assert (PolyORB.Initialization.Is_Initialized);

    --  Initialize the termination manager
@@ -60,9 +59,13 @@ begin

    PolyORB.DSA_P.Storages.Config.Initialize_Storages;

-   --  Allocate to this partition a local partition ID
+   --  Allocate to this partition a local partition ID, unless one has
+   --  already been allocated (case of the PID server partition).

-   Set_Local_Partition_ID (RPC.Partition_ID (Allocate_Partition_ID ("")));
+   if not Local_PID_Allocated then
+      Set_Local_Partition_ID
+        (RPC.Partition_ID (Allocate_Partition_ID (Get_Local_Partition_Name)));
+   end if;

    pragma Debug (C, O ("DSA_Services Initialized"));
 end System.DSA_Services;
============================================================
--- src/dsa/s-parint.adb	d513233ce0727c06c687742df487e374fbb16886
+++ src/dsa/s-parint.adb	f1dca136fe29c6758609d43a79d8272bbcda8600
@@ -29,6 +29,7 @@ with System.Address_To_Access_Conversion
 with Ada.Unchecked_Conversion;

 with System.Address_To_Access_Conversions;
+with System.Standard_Library;

 with GNAT.HTable;

@@ -38,6 +39,7 @@ with PolyORB.Log;
 with PolyORB.Errors;
 with PolyORB.Exceptions;
 with PolyORB.Log;
+with PolyORB.Opaque;
 with PolyORB.ORB;
 with PolyORB.Parameters;
 pragma Elaborate_All (PolyORB.Parameters);
@@ -122,6 +124,16 @@ package body System.Partition_Interface
    procedure Initialize;
    --  Procedure called during global PolyORB initialization

+   function Nameserver_Lookup (Name, Kind : String) return Ref;
+   --  Look up the specified (Name, Kind) pair from the DSA naming context
+
+   procedure Nameserver_Register
+     (Name : String;
+      Kind : String;
+      Obj  : PolyORB.References.Ref);
+   --  Register object with the specified (Name, Kind) pair into the
+   --  DSA naming context.
+
    function Is_Reference_Valid (R : PolyORB.References.Ref) return Boolean;
    --  Binds a reference to determine whether it is valid

@@ -129,6 +141,9 @@ package body System.Partition_Interface
    --  Detach a procedure using setsid() and closing the standard
    --  input/standard output/standard error file descriptors.

+   Local_PID_Barrier   : PTC.Condition_Access;
+   --  Barrier used by task waiting for Local_PID_Allocated to become True
+
    ------------------------------------------------
    -- Termination manager of the local partition --
    ------------------------------------------------
@@ -232,17 +247,6 @@ package body System.Partition_Interface

    --  End of local declarations

-   ---------------------
-   -- Allocate_Buffer --
-   ---------------------
-
-   procedure Allocate_Buffer (Stream : in out Buffer_Stream_Type) is
-      use type PolyORB.Buffers.Buffer_Access;
-   begin
-      pragma Assert (Stream.Buf = null);
-      Stream.Buf := new PolyORB.Buffers.Buffer_Type;
-   end Allocate_Buffer;
-
    -------------------------
    -- Any_Aggregate_Build --
    -------------------------
@@ -278,26 +282,21 @@ package body System.Partition_Interface
    ---------------

    procedure Any_To_BS (Item : Any; Stream : out Buffer_Stream_Type) is
-      use Octet_Sequences;
-      Seq : constant Sequence := Octet_Sequences_Helper.From_Any (Item);
-   begin
-      Stream.Arr := new Stream_Element_Array'
-        (1 .. Stream_Element_Offset (Length (Seq)) => 0);
+      --  Obtain direct unchecked access to the underlying byte storage

-      declare
-         subtype OSEA_T is Element_Array (1 .. Length (Seq));
-         OSEA_Addr : constant System.Address := Stream.Arr (1)'Address;
-         OSEA : OSEA_T;
-         for OSEA'Address use OSEA_Addr;
-         pragma Import (Ada, OSEA);
-      begin
-         OSEA := To_Element_Array (Seq);
-      end;
+      ACC : Aggregate_Content'Class renames
+              Aggregate_Content'Class
+                (Get_Value (Get_Container (Item).all).all);

+      Data_Length  : constant Stream_Element_Count :=
+                       Stream_Element_Count
+                         (Get_Aggregate_Count (ACC));
+      Data_Address : constant System.Address := Unchecked_Get_V (ACC'Access);
+   begin
       PolyORB.Buffers.Initialize_Buffer
-        (Stream.Buf,
-         Stream.Arr'Length,
-         Stream.Arr (Stream.Arr'First)'Address,
+        (Stream.Buf'Access,
+         Data_Length,
+         Data_Address,
          PolyORB.Buffers.Endianness_Type'First, --  XXX Irrelevant
          0);
    end Any_To_BS;
@@ -460,6 +459,24 @@ package body System.Partition_Interface
         and then PolyORB.References.Is_Equivalent (Left_Object, Right_Object);
    end Compare_Content;

+   ----------------
+   -- Create_Any --
+   ----------------
+
+   function Create_Any (TC : PATC.Local_Ref) return Any is
+      use type PATC.Local_Ref;
+   begin
+      if Unwind_Typedefs (TC) = TC_Opaque then
+         declare
+            Empty_Seq : Octet_Sequences.Sequence;
+         begin
+            return Octet_Sequences_Helper.To_Any (Empty_Seq);
+         end;
+      else
+         return Get_Empty_Any_Aggregate (TC);
+      end if;
+   end Create_Any;
+
    --------------------------
    -- DSA_Exception_To_Any --
    --------------------------
@@ -662,15 +679,6 @@ package body System.Partition_Interface
    end Extract_Union_Value;

    --------------
-   -- Finalize --
-   --------------
-
-   procedure Finalize (X : in out Buffer_Stream_Type) is
-   begin
-      PolyORB.Opaque.Free (X.Arr);
-   end Finalize;
-
-   --------------
    -- From_Any --
    --------------

@@ -946,22 +954,39 @@ package body System.Partition_Interface
       return PATC.To_Ref (PolyORB.Any.Get_Unwound_Type (A));
    end Get_TC;

-   Local_PID_Barrier   : PTC.Condition_Access;
-   Local_PID           : RPC.Partition_ID;
-   Local_PID_Allocated : Boolean := False;
+   -------------------------
+   -- Local_PID_Allocated --
+   -------------------------

+   function Local_PID_Allocated return Boolean is
+   begin
+      return System.Standard_Library.Local_Partition_ID /= 0;
+   end Local_PID_Allocated;
+
    ----------------------------
    -- Set_Local_Partition_ID --
    ----------------------------

    procedure Set_Local_Partition_ID (PID : RPC.Partition_ID) is
+      use type RPC.Partition_ID;
    begin
+      --  A PID of 0 denotes the unset (initial) state of
+      --  System.Standard_Library.Local_Partition_ID.
+
+      pragma Assert (PID /= 0);
+
       PTM.Enter (Critical_Section);
+
       if not Local_PID_Allocated then
-         Local_PID := PID;
-         Local_PID_Allocated := True;
+         System.Standard_Library.Local_Partition_ID := Natural (PID);
          PTC.Broadcast (Local_PID_Barrier);
+
+      else
+         --  Should attempts to set the local PID twice be diagnosed???
+
+         null;
       end if;
+
       PTM.Leave (Critical_Section);
    end Set_Local_Partition_ID;

@@ -983,9 +1008,19 @@ package body System.Partition_Interface
       end if;
       PTM.Leave (Critical_Section);

-      return Local_PID;
+      return RPC.Partition_ID (System.Standard_Library.Local_Partition_ID);
    end Get_Local_Partition_ID;

+   ------------------------------
+   -- Get_Local_Partition_Name --
+   ------------------------------
+
+   function Get_Local_Partition_Name return String is
+   begin
+      return PolyORB.Parameters.Get_Conf
+        (Section => "dsa", Key => "partition_name", Default => "NO NAME");
+   end Get_Local_Partition_Name;
+
    --------------------------------
    -- Get_Nested_Sequence_Length --
    --------------------------------
@@ -1357,6 +1392,120 @@ package body System.Partition_Interface
       return Result;
    end Make_Ref;

+   -----------------------
+   -- Nameserver_Lookup --
+   -----------------------
+
+   function Nameserver_Lookup (Name, Kind : String) return Ref is
+      use PolyORB.Parameters;
+      use PolyORB.Errors;
+      use PolyORB.References.Binding;
+
+      LName : constant String := To_Lower (Name);
+
+      Result : Ref;
+
+      Time_Between_Requests : constant Duration :=
+        Get_Conf
+          (Section => "dsa",
+           Key     => "delay_between_failed_requests",
+           Default => 1.0);
+
+      Max_Requests : constant Natural :=
+        Get_Conf
+          (Section => "dsa",
+           Key     => "max_failed_requests",
+           Default => 10);
+
+      Retry_Count : Natural := 0;
+   begin
+      --  Unit not known yet: we therefore know that it is remote, and we
+      --  need to look it up with the naming service.
+
+      loop
+         begin
+            Result := PSNNC.Client.Resolve
+                        (Naming_Context, To_Name (LName, Kind));
+
+            exit when Is_Reference_Valid (Result);
+            --  Resolve succeeded: exit loop
+
+         exception
+               --  Catch all exceptions: we will retry resolution, and bail
+               --  out after Max_Requests iterations.
+
+            when others =>
+               null;
+         end;
+
+         if Retry_Count = Max_Requests then
+            raise System.RPC.Communication_Error with
+              "lookup of " & Kind & " " & Name & " failed";
+         end if;
+         Retry_Count := Retry_Count + 1;
+         PolyORB.Tasking.Threads.Relative_Delay (Time_Between_Requests);
+      end loop;
+      return Result;
+   end Nameserver_Lookup;
+
+   -------------------------
+   -- Nameserver_Register --
+   -------------------------
+
+   procedure Nameserver_Register
+     (Name : String;
+      Kind : String;
+      Obj  : PolyORB.References.Ref)
+   is
+      use Ada.Exceptions;
+      Id      : constant PolyORB.Services.Naming.Name := To_Name (Name, Kind);
+      Context : PSNNC.Ref;
+      Reg_Obj : PolyORB.References.Ref;
+   begin
+      pragma Debug (C, O ("About to register " & Name & " on nameserver"));
+
+      --  May raise an exception which we do not want to handle in the
+      --  following block (failure to establish the naming context is a fatal
+      --  error and must be propagated to the caller).
+
+      Context := Naming_Context;
+
+      begin
+         Reg_Obj := PSNNC.Client.Resolve (Context, Id);
+      exception
+         when others =>
+
+            --  Resolution attempt returned an authoritative "name not found"
+            --  error: register unit now.
+
+            PSNNC.Client.Bind
+              (Self => Naming_Context,
+               N    => Id,
+               Obj  => Obj);
+            return;
+      end;
+
+      --  Name is present in name server, check validity of the reference it
+      --  resolves to.
+
+      if Is_Reference_Valid (Reg_Obj) then
+         --  Reference is valid: RCI unit is already declared by another
+         --  partition.
+
+         PolyORB.Initialization.Shutdown_World (Wait_For_Completion => False);
+         raise Program_Error with Name & " (" & Kind & ") is already declared";
+
+      else
+         --  The reference is not valid anymore: we assume the original server
+         --  has died, and rebind the name.
+
+         PSNNC.Client.Rebind
+           (Self => Naming_Context,
+            N    => To_Name (Name, Kind),
+            Obj  => Obj);
+      end if;
+   end Nameserver_Register;
+
    --------------------
    -- Naming_Context --
    --------------------
@@ -1365,12 +1514,22 @@ package body System.Partition_Interface
       R : PolyORB.References.Ref;
    begin
       if PSNNC.Is_Nil (Naming_Context_Cache) then
-         PolyORB.References.String_To_Object
-           (PolyORB.Parameters.Get_Conf ("dsa", "name_service"),
-            R);
-         PSNNC.Set (Naming_Context_Cache, Entity_Of (R));
+         declare
+            Nameserver_Location : constant String :=
+                                    PolyORB.Parameters.Get_Conf
+                                      ("dsa", "name_service");
+         begin
+            PolyORB.References.String_To_Object (Nameserver_Location, R);
+            if Is_Nil (R) then
+               raise Constraint_Error;
+            end if;
+            PSNNC.Set (Naming_Context_Cache, Entity_Of (R));
+         exception
+            when others =>
+               raise System.RPC.Communication_Error
+                 with "unable to locate name server " & Nameserver_Location;
+         end;
       end if;
-
       return Naming_Context_Cache;
    end Naming_Context;

@@ -1399,10 +1558,11 @@ package body System.Partition_Interface

       Transfer_Length : constant Stream_Element_Count :=
                           Stream_Element_Count'Min
-                            (Remaining (Stream.Buf), Item'Length);
+                            (Remaining (Stream.Buf'Access),
+                             Item'Length);
       Data : PolyORB.Opaque.Opaque_Pointer;
    begin
-      Extract_Data (Stream.Buf, Data, Transfer_Length);
+      Extract_Data (Stream.Buf'Access, Data, Transfer_Length);
       Last := Item'First + Transfer_Length - 1;
       declare
          Z_Addr : constant System.Address := Data;
@@ -1430,7 +1590,8 @@ package body System.Partition_Interface
          end if;

          if PolyORB.References.Is_Nil (Info.Base_Ref) then
-            raise System.RPC.Communication_Error;
+            raise System.RPC.Communication_Error
+              with "unable to locate RCI " & RCI_Name;

             --  XXX add an informative exception message.
             --  NOTE: Here, we are in calling stubs, so it is OK to raise an
@@ -1605,7 +1766,7 @@ package body System.Partition_Interface
                Known_Partition_ID  => False,
                RCI_Partition_ID    => RPC.Partition_ID'First));

-         Register_Unit_On_Name_Server
+         Nameserver_Register
            (Name => To_Lower (Stub.Name.all),
             Kind => "RCI",
             Obj  => Ref);
@@ -1643,73 +1804,6 @@ package body System.Partition_Interface
       pragma Debug (C, O ("Registered the termination manager"));
    end Register_Termination_Manager;

-   ----------------------------------
-   -- Register_Unit_On_Name_Server --
-   ----------------------------------
-
-   procedure Register_Unit_On_Name_Server
-     (Name : String;
-      Kind : String;
-      Obj  : PolyORB.References.Ref)
-   is
-      use Ada.Exceptions;
-      Id      : constant PolyORB.Services.Naming.Name := To_Name (Name, Kind);
-      Context : PSNNC.Ref;
-      Reg_Obj : PolyORB.References.Ref;
-   begin
-      pragma Debug (C, O ("About to register " & Name & " on nameserver"));
-
-      --  May raise an exception which we do not want to handle in the
-      --  following block (failure to establish the naming context is a fatal
-      --  error and must be propagated to the caller).
-
-      Context := Naming_Context;
-
-      begin
-         Reg_Obj := PSNNC.Client.Resolve (Context, Id);
-      exception
-         when others =>
-
-            --  Resolution attempt return an authoritative "name not found"
-            --  error: register unit now.
-
-            PSNNC.Client.Bind
-              (Self => Naming_Context,
-               N    => Id,
-               Obj  => Obj);
-            return;
-      end;
-
-      --  Name is present in name server, check validity of the reference it
-      --  resolves to.
-
-      if Is_Reference_Valid (Reg_Obj) then
-         --  Reference is valid: RCI unit is already declared by another
-         --  partition.
-
-         PolyORB.Initialization.Shutdown_World (Wait_For_Completion => False);
-         raise Program_Error with Name & " (" & Kind & ") is already declared";
-
-      else
-         --  The reference is not valid anymore: we assume the original server
-         --  has died, and rebind the name.
-
-         PSNNC.Client.Rebind
-           (Self => Naming_Context,
-            N    => To_Name (Name, Kind),
-            Obj  => Obj);
-      end if;
-   end Register_Unit_On_Name_Server;
-
-   --------------------
-   -- Release_Buffer --
-   --------------------
-
-   procedure Release_Buffer (Stream : in out Buffer_Stream_Type) is
-   begin
-      PolyORB.Buffers.Release (Stream.Buf);
-   end Release_Buffer;
-
    -----------------------
    -- Request_Arguments --
    -----------------------
@@ -1797,7 +1891,7 @@ package body System.Partition_Interface

       PolyORB.Objects.Free (Oid);

-      Register_Unit_On_Name_Server
+      Nameserver_Register
         (Name => To_Lower (Name),
          Kind => Kind,
          Obj  => Ref);
@@ -1805,6 +1899,15 @@ package body System.Partition_Interface
       pragma Debug (C, O ("Register RACW In Name Server: leave"));
    end Register_RACW_In_Name_Server;

+   --------------------
+   -- Release_Buffer --
+   --------------------
+
+   procedure Release_Buffer (Stream : in out Buffer_Stream_Type) is
+   begin
+      PolyORB.Buffers.Release_Contents (Stream.Buf);
+   end Release_Buffer;
+
    ---------------------
    -- Request_Set_Out --
    ---------------------
@@ -1882,35 +1985,7 @@ package body System.Partition_Interface
       --  retry the query up to Max_Requests times.

       if Is_Nil (Info.Base_Ref) then
-
-         --  Unit not known yet: we therefore know that it is remote, and we
-         --  need to look it up with the naming service.
-
-         loop
-            begin
-               Base_Ref := PSNNC.Client.Resolve
-                 (Naming_Context, To_Name (LName, "RCI"));
-
-               exit when Is_Reference_Valid (Base_Ref);
-               --  Resolve succeeded: exit loop
-
-            exception
-               --  Catch all exceptions: we will retry resolution, and bail
-               --  out after Max_Requests iterations.
-
-               when others =>
-                  null;
-            end;
-
-            if Retry_Count = Max_Requests then
-               O ("Cannot retrieve information for RCI "
-                  & Name & " from name server.", Error);
-               raise System.RPC.Communication_Error;
-            end if;
-            Retry_Count := Retry_Count + 1;
-            PolyORB.Tasking.Threads.Relative_Delay (Time_Between_Requests);
-         end loop;
-
+         Base_Ref := Nameserver_Lookup (LName, "RCI");
          Info := RCI_Info'
            (Base_Ref            => Base_Ref,
             Is_Local            => False,
@@ -1955,40 +2030,13 @@ package body System.Partition_Interface

    begin
       pragma Debug (C, O ("Retrieve RACW From Name Server: enter"));
-
-      loop
-         begin
-            Reg_Obj := PSNNC.Client.Resolve
-              (Naming_Context, To_Name (Name, Kind));
-
-            exit when Is_Reference_Valid (Reg_Obj);
-            --  Resolve succeeded: exit loop
-
-         exception
-               --  Catch all exceptions: we will retry resolution, and bail
-               --  out after Max_Requests iterations.
-
-            when others =>
-               null;
-         end;
-
-         if Retry_Count = Max_Requests then
-            O ("Cannot retrieve information for"
-               & "RACW " & Name & ":" & Kind & " from name server.", Error);
-            raise System.RPC.Communication_Error;
-         end if;
-         Retry_Count := Retry_Count + 1;
-         PolyORB.Tasking.Threads.Relative_Delay (Time_Between_Requests);
-      end loop;
-
+      Reg_Obj := Nameserver_Lookup (Name, Kind);
       Addr := Get_RACW
         (Ref          => Reg_Obj,
          Stub_Tag     => Stub_Tag,
          Is_RAS       => False,
          Asynchronous => True);
-
       pragma Debug (C, O ("Retrieve RACW From Name Server: leave"));
-
    end Retrieve_RACW_From_Name_Server;

    --------------------
@@ -2235,7 +2283,8 @@ package body System.Partition_Interface

       Data : PolyORB.Opaque.Opaque_Pointer;
    begin
-      Allocate_And_Insert_Cooked_Data (Stream.Buf, Item'Length, Data);
+      Allocate_And_Insert_Cooked_Data
+        (Stream.Buf'Access, Item'Length, Data);
       declare
          Z_Addr : constant System.Address := Data;
          Z : Stream_Element_Array (Item'Range);
============================================================
--- src/dsa/s-parint.ads	9890673a72e8d30ca1710f2ec86617802d5d28cb
+++ src/dsa/s-parint.ads	38082057900b75eeab5889a4800447b79939cd88
@@ -46,7 +46,6 @@ with PolyORB.Obj_Adapters;
 with PolyORB.Components;
 with PolyORB.Objects;
 with PolyORB.Obj_Adapters;
-with PolyORB.Opaque;
 with PolyORB.References;
 with PolyORB.Requests;
 with PolyORB.Servants;
@@ -93,12 +92,19 @@ package System.Partition_Interface is
    function Get_Active_Partition_ID (Name : Unit_Name) return RPC.Partition_ID;
    --  Get the Partition_ID of the partition where unit Name resides

+   function Get_Local_Partition_Name return String;
+   --  Return the name of the current partition
+
    function Get_Local_Partition_ID return RPC.Partition_ID;
    --  Return the Partition_ID of the current partition

    procedure Set_Local_Partition_ID (PID : RPC.Partition_ID);
    --  Set the Partition_ID of the current partition

+   function Local_PID_Allocated return Boolean;
+   pragma Inline (Local_PID_Allocated);
+   --  True once the local partition ID is known
+
    ---------------------------------------
    -- Remote access-to-subprogram types --
    ---------------------------------------
@@ -212,14 +218,9 @@ package System.Partition_Interface is
    --  Subp_Info is the address of an array of a statically subtype
    --  of RCI_Subp_Info_Array with a range of 0 .. Subp_Info_Len - 1.

-   procedure Register_Unit_On_Name_Server (Name : String;
-                                           Kind : String;
-                                           Obj  : PolyORB.References.Ref);
-   --  Register one receiving stub on the name server
-
-   function Retrieve_Receiving_Stub (Name : String;
-                                     Kind : Receiving_Stub_Kind)
-     return Servant_Access;
+   function Retrieve_Receiving_Stub
+     (Name : String;
+      Kind : Receiving_Stub_Kind) return Servant_Access;
    --  Return the servant for distributed objects with given Name and Kind, or
    --  null if non-existant.

@@ -347,9 +348,11 @@ package System.Partition_Interface is

    function Get_TC (A : Any) return PolyORB.Any.TypeCode.Local_Ref;

-   function Create_Any
-     (Tc : PolyORB.Any.TypeCode.Local_Ref) return Any
-     renames PolyORB.Any.Get_Empty_Any_Aggregate;
+   function Create_Any (TC : PolyORB.Any.TypeCode.Local_Ref) return Any;
+   --  Same as PolyORB.Any.Get_Empty_Any_Aggregate, except for the case where
+   --  Tc is a sequence<octet> typecode, in which case an Any using the
+   --  specific shadow content type for such sequences is returned instead of
+   --  a Default_Aggregate_Content (Any_To_BS relies on this property).

    function Content_Type
      (Self : PolyORB.Any.TypeCode.Local_Ref)
@@ -578,10 +581,12 @@ package System.Partition_Interface is
    procedure Any_To_BS (Item : Any; Stream : out Buffer_Stream_Type);
    procedure BS_To_Any (Stream : Buffer_Stream_Type; Item : out Any);
    --  Conversion between an Any for an opaque sequence of octets and an Ada
-   --  Stream based on a PolyORB buffer.
+   --  Stream based on a PolyORB buffer. For Any_To_BS, the lifetime of the
+   --  Stream object shall not exceed that of Item.

-   procedure Allocate_Buffer (Stream : in out Buffer_Stream_Type);
    procedure Release_Buffer (Stream : in out Buffer_Stream_Type);
+   --  Return storage allocated for Stream, needs to be called after any
+   --  data has been written to the buffer.

    --------------
    -- Requests --
@@ -716,10 +721,7 @@ private
    All_Receiving_Stubs : Receiving_Stub_Lists.List;

    type Buffer_Stream_Type is new Ada.Streams.Root_Stream_Type with record
-      Buf : PolyORB.Buffers.Buffer_Access;
-      Arr : PolyORB.Opaque.Zone_Access;
+      Buf : aliased PolyORB.Buffers.Buffer_Type;
    end record;

-   procedure Finalize (X : in out Buffer_Stream_Type);
-
 end System.Partition_Interface;
============================================================
--- src/dsa/s-shasto.adb	9be2e415d5966f20042c42ff58c23d584bd4a505
+++ src/dsa/s-shasto.adb	bc64f5f67e9c2175edfc915cf7590707a9adccf0
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2006-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2006-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -90,7 +90,7 @@ package body System.Shared_Storage is
          SDM      : Shared_Data_Manager_RACW;
          Data     : constant Any := Typ'To_Any (V);
          Data_Ptr : constant SDT.Any_Container_Ptr :=
-           AC_To_DAC (Get_Container (Data));
+                      AC_To_DAC (Get_Container (Data));

       begin
          Lookup_Variable (Full_Name, SDM);
============================================================
--- src/giop/diop/polyorb-giop_p-transport_mechanisms-diop.adb	bd45f1f3e6d7b2981c07ff095757c19ad19cba35
+++ src/giop/diop/polyorb-giop_p-transport_mechanisms-diop.adb	f96de414dee35283810592f4356848b60c63f1b6
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -78,9 +78,7 @@ package body PolyORB.GIOP_P.Transport_Me
       use PolyORB.Binding_Objects;

       Sock        : Socket_Type;
-
       TE          : Transport.Transport_Endpoint_Access;
-
    begin
       if Profile.all
         not in PolyORB.Binding_Data.GIOP.DIOP.DIOP_Profile_Type then
@@ -99,7 +97,8 @@ package body PolyORB.GIOP_P.Transport_Me
       Create (Socket_Out_Endpoint (TE.all), Sock, Mechanism.Address.all);

       Binding_Objects.Setup_Binding_Object
-        (TE,
+        (The_ORB,
+         TE,
          DIOP_Factories,
          BO_Ref,
          Profile_Access (Profile));
============================================================
--- src/giop/iiop/polyorb-giop_p-transport_mechanisms-iiop.adb	ec433bce6dea695b3db475fa9fcd60dfab546f36
+++ src/giop/iiop/polyorb-giop_p-transport_mechanisms-iiop.adb	ff93b81c382a7715fcec21d654939d40d9154251
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -103,7 +103,8 @@ package body PolyORB.GIOP_P.Transport_Me
             Create (Socket_Endpoint (TE.all), Sock);

             Binding_Objects.Setup_Binding_Object
-              (TE,
+              (The_ORB,
+               TE,
                IIOP_Factories,
                BO_Ref,
                Profile_Access (Profile));
============================================================
--- src/giop/iiop/security/tls/polyorb-giop_p-transport_mechanisms-tls.adb	bfa051ef5a5286df8295ef0c0d71677e44aeb6ee
+++ src/giop/iiop/security/tls/polyorb-giop_p-transport_mechanisms-tls.adb	3c3ce6909ec41c3bfb6ea24cbdc14b3fb346a977
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -135,7 +135,8 @@ package body PolyORB.GIOP_P.Transport_Me
             Create (TLS_Endpoint (TE.all), TLS_Sock);

             Binding_Objects.Setup_Binding_Object
-              (TE,
+              (The_ORB,
+               TE,
                IIOP_Factories,
                BO_Ref,
                Binding_Data.Profile_Access (Profile));
============================================================
--- src/giop/iiop/ssliop/polyorb-giop_p-transport_mechanisms-ssliop.adb	9081f70b8ec9b5b941220b7ddb59d550052170b1
+++ src/giop/iiop/ssliop/polyorb-giop_p-transport_mechanisms-ssliop.adb	e2a54ca1995ec488a67bf4f524b6f9f10131710a
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -106,7 +106,8 @@ package body PolyORB.GIOP_P.Transport_Me
       Create (SSL_Endpoint (TE.all), SSL_Sock);

       Binding_Objects.Setup_Binding_Object
-        (TE,
+        (The_ORB,
+         TE,
          IIOP_Factories,
          BO_Ref,
          Profile_Access (Profile));
============================================================
--- src/giop/miop/polyorb-filters-miop-miop_out.adb	a464e9614eaf8c576b23b0a77a80e2a2e3d0ef91
+++ src/giop/miop/polyorb-filters-miop-miop_out.adb	de4e95f1a7efe28d5369382091b5e22834cbd046
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -115,8 +115,8 @@ package body PolyORB.Filters.MIOP.MIOP_O
          declare
             D : Data_Out renames Data_Out (S);
             --  Length of GIOP packet
-            L : constant Types.Unsigned_Short
-              := Types.Unsigned_Short (Length (D.Out_Buf));
+            L : constant Types.Unsigned_Short :=
+                  Types.Unsigned_Short (Length (D.Out_Buf.all));
             H : MIOP_Header;
          begin
             pragma Debug (C, O ("Encapsulate GIOP data in a MIOP Packet,"
============================================================
--- src/giop/miop/polyorb-filters-miop.adb	00aee6619958456cbfda4955d1e789000272c0ff
+++ src/giop/miop/polyorb-filters-miop.adb	116deeebf873e24dab845492072dad253c10b345
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -88,7 +88,7 @@ package body PolyORB.Filters.MIOP is
       Marshall (Buffer, Types.Identifier (Header.Unique_Id));

       --  Final padding
-      Pad_Align (Buffer, 8);
+      Pad_Align (Buffer, Align_8);
    end Marshall_MIOP_Header;

    ----------------------------
============================================================
--- src/giop/miop/polyorb-giop_p-transport_mechanisms-uipmc.adb	c6ee13976f5296b245fd63120184f6b1b57fbc04
+++ src/giop/miop/polyorb-giop_p-transport_mechanisms-uipmc.adb	8d550f738ee677f7f5b42621d74ec3a72be04528
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2005-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2005-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -114,7 +114,8 @@ package body PolyORB.GIOP_P.Transport_Me
       Create (Socket_Out_Endpoint (TE.all), Sock, Mechanism.Address.all);

       Binding_Objects.Setup_Binding_Object
-        (TE,
+        (The_ORB,
+         TE,
          MIOP_Factories,
          BO_Ref,
          Profile_Access (Profile));
============================================================
--- src/giop/miop/polyorb-miop_p-groups.adb	0c0f097d2c02a747d0e06f4c4244d74a4be3a12c
+++ src/giop/miop/polyorb-miop_p-groups.adb	f231d67368b8f59f7d4b3a7ae956f2cda71bb542
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2003-2005 Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

@@ -67,7 +67,7 @@ package body PolyORB.MIOP_P.Groups is
       Marshall (Buffer, G_I.Object_Group_Id);
       Marshall (Buffer, G_I.Object_Group_Ref_Version);
       Marshall (Buffer, Types.Identifier (G_I.Group_Domain_Id));
-      Oid := new Object_Id'(Object_Id (To_Stream_Element_Array (Buffer)));
+      Oid := new Object_Id'(Object_Id (To_Stream_Element_Array (Buffer.all)));
       Release (Buffer);
       return Oid;
    end To_Object_Id;
============================================================
--- src/giop/polyorb-giop_p-code_sets-converters.adb	f3ed428a929080947334dc346075cd5dd2b183dd
+++ src/giop/polyorb-giop_p-code_sets-converters.adb	8ba032e2005080d3e24161b7a5ee69b1bdac75d6
@@ -317,7 +317,7 @@ package body PolyORB.GIOP_P.Code_Sets.Co
       pragma Unreferenced (Error);

    begin
-      Pad_Align (Buffer, 4);
+      Pad_Align (Buffer, Align_4);

       declare
          Reserv : constant Reservation     := Reserve (Buffer, 4);
============================================================
--- src/giop/polyorb-giop_p-tagged_components.adb	6adb4a44a74679e013dc941a2114e477ee94bf22
+++ src/giop/polyorb-giop_p-tagged_components.adb	3adb0caa60937355c1c41d18ba6e6f54fb85573e
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -446,10 +446,10 @@ package body PolyORB.GIOP_P.Tagged_Compo

    procedure Remove
      (List : in out Tagged_Component_List;
-      Comp :        Tagged_Component_Access)
+      Comp : Tagged_Component_Access)
    is
    begin
-      Remove (List, Comp, False);
+      Remove_Occurrences (List, Comp, All_Occurrences => False);
    end Remove;

    ---------------
============================================================
--- src/giop/polyorb-protocols-giop-common.adb	77d42bece36b2be62815f8c726e2e4428b9efa75
+++ src/giop/polyorb-protocols-giop-common.adb	bfeef6ffaa4c0a2d56f90905464932e6271c2363
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -161,8 +161,7 @@ package body PolyORB.Protocols.GIOP.Comm
       N               : Request_Note;
       Request_Id      : Types.Unsigned_Long renames N.Id;
       CORBA_Occurence : PolyORB.Any.Any;
-      Data_Alignment  : Stream_Element_Offset :=
-        Sess.Implem.Data_Alignment;
+      Data_Alignment  : Alignment_Type := Sess.Implem.Data_Alignment;

       Static_Buffer : constant QoS_GIOP_Static_Buffer_Parameter_Access :=
         QoS_GIOP_Static_Buffer_Parameter_Access
@@ -262,10 +261,11 @@ package body PolyORB.Protocols.GIOP.Comm
             if Static_Buffer = null then
                pragma Debug (C, O ("Using Any to send reply data"));

-               if TypeCode.Kind (Get_Type (Request.Result.Argument)) /=
-                 Tk_Void then
+               if TypeCode.Kind (Get_Type (Request.Result.Argument))
+                    /= Tk_Void
+               then
                   Pad_Align (Buffer_Out, Data_Alignment);
-                  Data_Alignment := 1;
+                  Data_Alignment := Align_1;
                end if;

                Marshall_From_Any
@@ -316,7 +316,7 @@ package body PolyORB.Protocols.GIOP.Comm
                   return;
                end if;
             else
-               if Length (Static_Buffer.Buffer) /= 0 then
+               if Length (Static_Buffer.Buffer.all) /= 0 then
                   pragma Debug (C, O ("Using buffer to send reply data"));
                   --  The arguments were marshalled and stored in the
                   --  request QoS attribute. We insert the data
@@ -325,12 +325,11 @@ package body PolyORB.Protocols.GIOP.Comm
                   Pad_Align (Buffer_Out, Data_Alignment);

                   declare
-                     Data : PolyORB.Opaque.Opaque_Pointer;
-                     Data_Processed : Stream_Element_Count
-                       := Length (Static_Buffer.Buffer);
-                     Data_To_Process : Stream_Element_Count
-                       := Length (Static_Buffer.Buffer);
-                     Position : Ada.Streams.Stream_Element_Offset := 0;
+                     Data            : PolyORB.Opaque.Opaque_Pointer;
+                     Data_To_Process : Stream_Element_Count :=
+                                         Length (Static_Buffer.Buffer.all);
+                     Data_Processed  : Stream_Element_Count := Data_To_Process;
+                     Position        : Ada.Streams.Stream_Element_Offset := 0;
                   begin
                      while Data_To_Process > 0 loop
                         PolyORB.Buffers.Partial_Extract_Data
@@ -406,7 +405,7 @@ package body PolyORB.Protocols.GIOP.Comm
       --  Marshall Header

       MCtx.Message_Size := Types.Unsigned_Long
-        (Length (Buffer_Out) - GIOP_Header_Size);
+        (Length (Buffer_Out.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess, MCtx, Header_Buffer);

@@ -455,7 +454,7 @@ package body PolyORB.Protocols.GIOP.Comm
       end if;

       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess, MCtx, Header_Buffer);

@@ -701,8 +700,8 @@ package body PolyORB.Protocols.GIOP.Comm
       Success      : Boolean;

       ORB          : constant ORB_Access := ORB_Access (Sess.Server);
-      Arguments_Alignment : Buffers.Alignment_Type
-        := Sess.Implem.Data_Alignment;
+      Arguments_Alignment : Buffers.Alignment_Type :=
+                              Sess.Implem.Data_Alignment;
       Error        : Errors.Error_Container;

       Static_Buffer : QoS_GIOP_Static_Buffer_Parameter_Access;
@@ -741,7 +740,7 @@ package body PolyORB.Protocols.GIOP.Comm
                  /= Tk_Void
                then
                   Align_Position (Sess.Buffer_In, Arguments_Alignment);
-                  Arguments_Alignment := 1;
+                  Arguments_Alignment := Align_1;
                end if;

                Unmarshall_To_Any
============================================================
--- src/giop/polyorb-protocols-giop-giop_1_0.adb	c94cd49e0d5b670d910db1b9e1a2ba2ba0f9e553
+++ src/giop/polyorb-protocols-giop-giop_1_0.adb	39cf55d98a1c310398d4ed54bf5ad112f80ec386
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -506,7 +506,7 @@ package body PolyORB.Protocols.GIOP.GIOP

       MCtx.Message_Type := Locate_Request;
       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess'Access, MCtx'Access, Header_Buffer);
       Copy_Data (Header_Buffer.all, Header_Space);
@@ -576,7 +576,7 @@ package body PolyORB.Protocols.GIOP.GIOP

       MCtx.Message_Type := Request;
       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess'Access, MCtx'Access, Header_Buffer);
       Copy_Data (Header_Buffer.all, Header_Space);
============================================================
--- src/giop/polyorb-protocols-giop-giop_1_0.ads	8f843e2e3182654fa12dfdbd7f27701f98adf546
+++ src/giop/polyorb-protocols-giop-giop_1_0.ads	b3651c63e6b24157a115e008060fc740c7d25641
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2002-2006, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -93,7 +93,7 @@ private

    --  Data alignment

-   Data_Alignment_1_0 : constant Buffers.Alignment_Type := 1;
+   Data_Alignment_1_0 : constant Buffers.Alignment_Type := Buffers.Align_1;

    --  Principal

============================================================
--- src/giop/polyorb-protocols-giop-giop_1_1.adb	117d4608ccc1b29331c89cc3fabd01279995fb31
+++ src/giop/polyorb-protocols-giop-giop_1_1.adb	3103cb94e7346ca18ebe976010a5ef8a2a311556
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -500,7 +500,7 @@ package body PolyORB.Protocols.GIOP.GIOP

       MCtx.Message_Type := Locate_Request;
       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess'Access, MCtx'Access, Header_Buffer);
       Copy_Data (Header_Buffer.all, Header_Space);
@@ -580,7 +580,7 @@ package body PolyORB.Protocols.GIOP.GIOP

       MCtx.Message_Type := Request;
       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess'Access, MCtx'Access, Header_Buffer);
       Copy_Data (Header_Buffer.all, Header_Space);
============================================================
--- src/giop/polyorb-protocols-giop-giop_1_1.ads	ab0d42bc43630139422b4adeedd4089729c10321
+++ src/giop/polyorb-protocols-giop-giop_1_1.ads	a0b0ede73ca7271379f434364a93559c9db1bffd
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2002-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -113,7 +113,7 @@ private

    --  Data alignment

-   Data_Alignment_1_1 : constant Buffers.Alignment_Type := 1;
+   Data_Alignment_1_1 : constant Buffers.Alignment_Type := Buffers.Align_1;

    --  Principal

============================================================
--- src/giop/polyorb-protocols-giop-giop_1_2.adb	7952c768598cc37f53672453ed27302be15967c7
+++ src/giop/polyorb-protocols-giop-giop_1_2.adb	23e08fb0a632d94ce6dcd6071b01ac12a453cb0c
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -698,8 +698,8 @@ package body PolyORB.Protocols.GIOP.GIOP
       Frag_MCtx : aliased GIOP_Message_Context_1_2;
       --  Context for fragments

-      Message_Size : Types.Unsigned_Long
-        := Types.Unsigned_Long (Length (Buffer));
+      Message_Size : Types.Unsigned_Long :=
+                       Types.Unsigned_Long (Length (Buffer.all));
    begin
       if Message_Size > Implem.Max_GIOP_Message_Size then

@@ -1036,7 +1036,7 @@ package body PolyORB.Protocols.GIOP.GIOP
       MCtx.Fragmented := False;
       MCtx.Message_Type := Locate_Request;
       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);
       Marshall_Global_GIOP_Header (Sess'Access, MCtx'Access, Header_Buffer);
       Copy_Data (Header_Buffer.all, Header_Space);
       Release (Header_Buffer);
@@ -1224,7 +1224,7 @@ package body PolyORB.Protocols.GIOP.GIOP
       --  Arguments

       if Static_Buffer /= null
-        and then Length (Static_Buffer.Buffer) /= 0
+        and then Length (Static_Buffer.Buffer.all) /= 0
       then
          --  The arguments were marshalled and stored in the request
          --  QoS attribute. We insert the data contained in the
@@ -1235,12 +1235,11 @@ package body PolyORB.Protocols.GIOP.GIOP
          Pad_Align (Buffer, Sess.Implem.Data_Alignment);

          declare
-            Data : PolyORB.Opaque.Opaque_Pointer;
-            Data_Processed : Stream_Element_Count
-              := Length (Static_Buffer.Buffer);
-            Data_To_Process : Stream_Element_Count
-              := Length (Static_Buffer.Buffer);
-            Position : Ada.Streams.Stream_Element_Offset := 0;
+            Data            : PolyORB.Opaque.Opaque_Pointer;
+            Data_To_Process : Stream_Element_Count :=
+                                Length (Static_Buffer.Buffer.all);
+            Data_Processed  : Stream_Element_Count := Data_To_Process;
+            Position        : Ada.Streams.Stream_Element_Offset := 0;
          begin
             while Data_To_Process > 0 loop
                PolyORB.Buffers.Partial_Extract_Data
@@ -1279,7 +1278,7 @@ package body PolyORB.Protocols.GIOP.GIOP
       MCtx.Fragmented := False;
       MCtx.Message_Type := Request;
       MCtx.Message_Size :=
-        Types.Unsigned_Long (Length (Buffer) - GIOP_Header_Size);
+        Types.Unsigned_Long (Length (Buffer.all) - GIOP_Header_Size);

       Marshall_Global_GIOP_Header (Sess'Access, MCtx'Access, Header_Buffer);
       Copy_Data (Header_Buffer.all, Header_Space);
============================================================
--- src/giop/polyorb-protocols-giop-giop_1_2.ads	f9429c32ec4497de8f0b725297a1b3592ddc3189
+++ src/giop/polyorb-protocols-giop-giop_1_2.ads	00ca83ae03bc8450592e7aafc8badb336cd8c766
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -205,7 +205,7 @@ private

    --  Data alignment

-   Data_Alignment_1_2 : constant Buffers.Alignment_Type := 8;
+   Data_Alignment_1_2 : constant Buffers.Alignment_Type := Buffers.Align_8;

    --  Fragment header size

============================================================
--- src/giop/polyorb-protocols-giop.adb	63bea4f95a38fe9df1814373f570f74ae1601d32
+++ src/giop/polyorb-protocols-giop.adb	a60144d9bf88353f990aff59a00f0a6d8297b8a3
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -225,7 +225,7 @@ package body PolyORB.Protocols.GIOP is

          when Expect_Body =>
             pragma Debug (C, O ("Received GIOP message body"));
-            pragma Debug (Show (Sess.Buffer_In));
+            pragma Debug (C, Show (Sess.Buffer_In));
             Process_Message (Sess.Implem, Sess);

          when others =>
============================================================
--- src/moma/polyorb-moma_p-provider-topic_datas.adb	f545a167daeca97c1757a3b04d82eae5a18b196e
+++ src/moma/polyorb-moma_p-provider-topic_datas.adb	731ac702d14bd8008d21fe9853fa864307d53608
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -150,7 +150,7 @@ package body PolyORB.MOMA_P.Provider.Top
          --  XXX do we really need to raise an exception ?
       end if;

-      Destination_List.Remove (V.Subscribers, Pool);
+      Destination_List.Remove_Occurrences (V.Subscribers, Pool);
       if V.Subscribers = Destination_List.Empty then
          Delete (Data.T, T);
       end if;
============================================================
--- src/polyorb-any.adb	db5acf259c2ec53c0e84942354f5243c94fb0daa
+++ src/polyorb-any.adb	4d09ee435e32503e6f9ce2eb29f898b305d3552b
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -57,13 +57,6 @@ package body PolyORB.Any is
    --  Foreign status is transferred from Src_C to Dst_C. The previous contents
    --  of Dst_C are deallocated if appropriate.

-   procedure Set_Value
-     (C : in out Any_Container'Class; CC : Content_Ptr; Foreign : Boolean);
-   --  Set the designated value of A to CC; set the Foreign indication as
-   --  to the given value. Note that no type conformance check is performed!
-   --  The previous value, and if applicable the associated storage, are
-   --  deallocated.
-
    type Aggregate_Content_Ptr is access all Aggregate_Content'Class;

    --------------------
@@ -816,10 +809,7 @@ package body PolyORB.Any is
    -- Add_Aggregate_Element --
    ---------------------------

-   procedure Add_Aggregate_Element
-     (Value   : in out Any;
-      Element : Any)
-   is
+   procedure Add_Aggregate_Element (Value : in out Any; Element : Any) is
       CA_Ptr : constant Aggregate_Content_Ptr :=
                  Aggregate_Content_Ptr (Get_Container (Value).The_Value);
    begin
@@ -1560,7 +1550,8 @@ package body PolyORB.Any is
       if Kind in Aggregate_TCKind then
          Set_Value
            (Get_Container (A).all,
-            Allocate_Default_Aggregate_Content (Kind), Foreign => False);
+            Allocate_Default_Aggregate_Content (Kind),
+            Foreign => False);
       end if;

       pragma Debug (C, O ("Get_Empty_Any_Aggregate: end"));
@@ -2163,17 +2154,10 @@ package body PolyORB.Any is
    -- Set_Value --
    ---------------

-   procedure Set_Value (C : in out Any_Container'Class; CC : Content_Ptr) is
-   begin
-      Set_Value (C, CC, Foreign => True);
-   end Set_Value;
-
-   ---------------
-   -- Set_Value --
-   ---------------
-
    procedure Set_Value
-     (C : in out Any_Container'Class; CC : Content_Ptr; Foreign : Boolean)
+     (C       : in out Any_Container'Class;
+      CC      : Content_Ptr;
+      Foreign : Boolean := True)
    is
    begin
       if C.The_Value /= null and then not C.Foreign then
============================================================
--- src/polyorb-any.ads	dc224c54d7dcf811f016335af896e7d2e7642c26
+++ src/polyorb-any.ads	d24b4749d2047c99e5abefb824d3be6dc713d1f7
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -29,8 +29,11 @@ pragma Ada_2005;

 pragma Ada_2005;

+pragma Warnings (Off);
+--  The following are internal GNAT units:
 with Ada.Strings.Superbounded;
 with Ada.Strings.Wide_Superbounded;
+pragma Warnings (On);

 with System;

@@ -590,10 +593,13 @@ package PolyORB.Any is
       TC : TypeCode.Local_Ref);
    --  Set the type of C to TC

-   procedure Set_Value (C : in out Any_Container'Class; CC : Content_Ptr);
-   --  Set the contents of C to CC. CC, and any associated storage, are
-   --  assumed to be externally managed and won't be deallocated by the Any
-   --  management subsystem.
+   procedure Set_Value
+     (C       : in out Any_Container'Class;
+      CC      : Content_Ptr;
+      Foreign : Boolean := True);
+   --  Set the contents of C to CC. If Foreign is True then CC, and any
+   --  associated storage, are assumed to be externally managed and won't be
+   --  deallocated by the Any management subsystem.

    procedure Finalize_Value (C : in out Any_Container'Class);
    --  Destroy the stored content wrapper for C, if non-null and non-foreign
@@ -862,12 +868,8 @@ package PolyORB.Any is
    function Get_Aggregate_Count (Value : Any) return Types.Unsigned_Long;
    --  Return the number of elements in an any aggregate

-   procedure Add_Aggregate_Element
-     (Value   : in out Any;
-      Element : Any);
-   --  Adds an element to an any aggregate
-   --  This element is given as a typecode but only its value is
-   --  added to the aggregate
+   procedure Add_Aggregate_Element (Value : in out Any; Element : Any);
+   --  Adds an element to an aggregate Any

    function Get_Aggregate_Element
      (Value : Any;
============================================================
--- src/polyorb-asynch_ev-sockets.adb	6d7ef022c6bb6b2db6ade0e4074a56e3ecb1f11d
+++ src/polyorb-asynch_ev-sockets.adb	da9d36dcf79bbda85337c489434f6bf8043c946c
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -75,6 +75,18 @@ package body PolyORB.Asynch_Ev.Sockets i
       return not Source_Lists.Is_Empty (AEM.Sources);
    end Has_Sources;

+   ----------
+   -- Link --
+   ----------
+
+   function Link
+     (S     : access Socket_Event_Source'Class;
+      Which : Ilists.Link_Type) return access SES_Access
+   is
+   begin
+      return S.Links (Which)'Unchecked_Access;
+   end Link;
+
    ---------------------
    -- Register_Source --
    ---------------------
@@ -92,8 +104,13 @@ package body PolyORB.Asynch_Ev.Sockets i
          return;
       end if;

-      Set (AEM.Monitored_Set, Socket_Event_Source (AES.all).Socket);
-      Source_Lists.Append (AEM.Sources, AES);
+      declare
+         S_AES : Socket_Event_Source'Class
+                   renames Socket_Event_Source'Class (AES.all);
+      begin
+         Set (AEM.Monitored_Set, S_AES.Socket);
+         Source_Lists.Append (AEM.Sources, S_AES'Access);
+      end;
       pragma Debug (C, O ("Register_Source: Sources'Length ="
                        & Integer'Image (Source_Lists.Length (AEM.Sources))));
       AES.Monitor := Asynch_Ev_Monitor_Access (AEM);
@@ -109,7 +126,10 @@ package body PolyORB.Asynch_Ev.Sockets i
    procedure Unregister_Source
      (AEM     : in out Socket_Event_Monitor;
       AES     : Asynch_Ev_Source_Access;
-      Success : out Boolean) is
+      Success : out Boolean)
+   is
+      S_AES : Socket_Event_Source'Class
+                renames Socket_Event_Source'Class (AES.all);
    begin
       pragma Debug (C, O ("Unregister_Source: enter"));
       if not Is_Set (AEM.Monitored_Set,
@@ -117,8 +137,8 @@ package body PolyORB.Asynch_Ev.Sockets i
       then
          Success := False;
       else
-         Clear (AEM.Monitored_Set, Socket_Event_Source (AES.all).Socket);
-         Source_Lists.Remove (AEM.Sources, AES);
+         Clear (AEM.Monitored_Set, S_AES.Socket);
+         Source_Lists.Remove_Element (AEM.Sources, S_AES'Access);
          pragma Debug (C, O ("Unregister_Source: Sources'Length:="
                           & Source_Lists.Length (AEM.Sources)'Img));
          Success := True;
@@ -203,16 +223,15 @@ package body PolyORB.Asynch_Ev.Sockets i
             while not Source_Lists.Last (It) loop

                declare
-                  S    : Asynch_Ev_Source_Access renames Value (It).all;
-                  Sock : Socket_Type
-                    renames Socket_Event_Source (S.all).Socket;
+                  S_AES : Socket_Event_Source'Class renames Value (It).all;
+                  Sock  : Socket_Type renames S_AES.Socket;
                begin
                   if Is_Set (R_Set, Sock) then
                      pragma Debug
                        (C, O ("Got event on socket" & Image (Sock)));

                      Last := Last + 1;
-                     Result (Last) := S;
+                     Result (Last) := S_AES'Access;

                      Clear (AEM.Monitored_Set, Sock);
                      Remove (AEM.Sources, It);
@@ -255,8 +274,7 @@ package body PolyORB.Asynch_Ev.Sockets i
      (Socket : PolyORB.Sockets.Socket_Type)
      return Asynch_Ev_Source_Access
    is
-      Result : constant Asynch_Ev_Source_Access
-        := new Socket_Event_Source;
+      Result : constant Asynch_Ev_Source_Access := new Socket_Event_Source;
    begin
       Socket_Event_Source (Result.all).Socket := Socket;
       return Result;
============================================================
--- src/polyorb-asynch_ev-sockets.ads	f145eec3986b99b2e542bbdb840132a1bed5c34e
+++ src/polyorb-asynch_ev-sockets.ads	db9d4b0130554e5ab153c935a17d7e9022b4b1b3
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2003 Free Software Foundation, Inc.           --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,19 +16,19 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

 --  An asynchrous event source that is a set of socket descriptors.

 with PolyORB.Sockets;
-with PolyORB.Utils.Chained_Lists;
+with PolyORB.Utils.Ilists;

 package PolyORB.Asynch_Ev.Sockets is

@@ -66,18 +66,31 @@ package PolyORB.Asynch_Ev.Sockets is
      (Socket : PolyORB.Sockets.Socket_Type)
      return Asynch_Ev_Source_Access;

-   function AEM_Factory_Of (AES : Socket_Event_Source)
-     return AEM_Factory;
+   function AEM_Factory_Of (AES : Socket_Event_Source) return AEM_Factory;

 private

+   package Ilists renames Utils.Ilists;
+
+   type SES_Access is access all Socket_Event_Source'Class;
+   type Links_Type is array (Ilists.Link_Type) of aliased SES_Access;
+
    type Socket_Event_Source is new Asynch_Ev_Source with record
+      Links  : Links_Type;
       Socket : PolyORB.Sockets.Socket_Type;
    end record;

+   function Link
+     (S     : access Socket_Event_Source'Class;
+      Which : Ilists.Link_Type) return access SES_Access;
+   pragma Inline (Link);
+   --  Accessor for Links
+
    package Source_Lists is
-     new PolyORB.Utils.Chained_Lists
-       (Asynch_Ev_Source_Access, Doubly_Chained => True);
+     new Ilists.Lists
+       (T             => Socket_Event_Source'Class,
+        T_Acc         => SES_Access,
+        Doubly_Linked => True);

    type Socket_Event_Monitor is new Asynch_Ev_Monitor with record
       Selector      : PolyORB.Sockets.Selector_Type;
============================================================
--- src/polyorb-binding_objects.adb	eba30a65cef3d288734a8d87b88e6e711731e0a1
+++ src/polyorb-binding_objects.adb	b307b51b67c5497619e2f0517b67687ca8d3b565
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2004-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -55,18 +55,15 @@ package body PolyORB.Binding_Objects is
       use PolyORB.Components;
       use PolyORB.Errors;

-      use BO_Lists;
-
       Error : Error_Container;
-
    begin
       pragma Debug (C, O ("Finalizing binding object."));

       --  First remove the reference to this BO from its ORB so that is does
       --  not get reused while being finalized.

-      PolyORB.ORB.Unregister_Binding_Object
-        (X.Referenced_In, X'Unchecked_Access);
+      ORB.Unregister_Binding_Object
+        (ORB.ORB_Access (X.ORB), X'Unchecked_Access);

       --  Notify protocol stack that it is about to be dismantled

@@ -128,41 +125,49 @@ package body PolyORB.Binding_Objects is
       return BO.Profile;
    end Get_Profile;

-   -----------------------
-   -- Get_Referenced_At --
-   -----------------------
+   ----------
+   -- Link --
+   ----------

-   function Get_Referenced_At
-     (BO : Binding_Object_Access) return BO_Lists.Iterator
+   function Link
+     (X     : access Binding_Object'Class;
+      Which : Utils.Ilists.Link_Type) return access Binding_Object_Access
    is
    begin
-      return BO.Referenced_At;
-   end Get_Referenced_At;
+      return X.Links (Which)'Unchecked_Access;
+   end Link;

-   ------------------------------------
-   -- Register_Reference_Information --
-   ------------------------------------
+   ----------------
+   -- Referenced --
+   ----------------

-   procedure Register_Reference_Information
-     (BO            : Binding_Object_Access;
-      Referenced_In : Components.Component_Access;
-      Referenced_At : BO_Lists.Iterator)
+   function Referenced (BO : Binding_Object_Access) return Boolean is
+   begin
+      return BO.Referenced;
+   end Referenced;
+
+   --------------------
+   -- Set_Referenced --
+   --------------------
+
+   procedure Set_Referenced
+     (BO         : Binding_Object_Access;
+      Referenced : Boolean)
    is
    begin
-      pragma Debug (C, O ("BO : Registering reference Information."));
-      BO.Referenced_In := Referenced_In;
-      BO.Referenced_At := Referenced_At;
-   end Register_Reference_Information;
+      BO.Referenced := Referenced;
+   end Set_Referenced;

    --------------------------
    -- Setup_Binding_Object --
    --------------------------

    procedure Setup_Binding_Object
-     (TE      :        Transport.Transport_Endpoint_Access;
-      FFC     :        Filters.Factory_Array;
-      BO_Ref  :    out Smart_Pointers.Ref;
-      Pro     :        Binding_Data.Profile_Access)
+     (ORB     : Components.Component_Access;
+      TE      : Transport.Transport_Endpoint_Access;
+      FFC     : Filters.Factory_Array;
+      BO_Ref  : out Smart_Pointers.Ref;
+      Pro     : Binding_Data.Profile_Access)
    is
       BO : Binding_Object_Access;
       Bottom : Filters.Filter_Access;
@@ -173,6 +178,7 @@ package body PolyORB.Binding_Objects is

       Set_Profile (BO, Pro);

+      BO.ORB := ORB;
       BO.Transport_Endpoint := TE;
       Filters.Create_Filter_Chain
         (FFC,
============================================================
--- src/polyorb-binding_objects.ads	09596e10cb8ec629ed43c88a3e9642d285effad4
+++ src/polyorb-binding_objects.ads	0c45487ddb03011c54a10b69cc65ddc858cab5f8
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2004-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -28,13 +28,15 @@
 --  Binding objects: protocol stacks seen globally as a reference-counted
 --  entity.

+pragma Ada_2005;
+
 with PolyORB.Annotations;
 with PolyORB.Binding_Data;
 with PolyORB.Components;
 with PolyORB.Filters;
 with PolyORB.Smart_Pointers;
 with PolyORB.Transport;
-with PolyORB.Utils.Chained_Lists;
+with PolyORB.Utils.Ilists;

 package PolyORB.Binding_Objects is

@@ -44,85 +46,88 @@ package PolyORB.Binding_Objects is
    --  A protocol session and associated transport and filter stack,
    --  seen globally as a reference-counted entity.

-   package BO_Lists is new PolyORB.Utils.Chained_Lists
-     (Binding_Object_Access, "=", Doubly_Chained => True);
-   subtype BO_List is BO_Lists.List;
-   --  A list of access to Binding Objects
+   function Link
+     (X     : access Binding_Object'Class;
+      Which : Utils.Ilists.Link_Type) return access Binding_Object_Access;
+   pragma Inline (Link);
+   --  Accessor for chaining pointers in binding objects allowing them to be
+   --  attached to the ORB's binding objects list.

-   function Get_Component (X : Smart_Pointers.Ref)
-     return PolyORB.Components.Component_Access;
+   function Get_Component
+     (X : Smart_Pointers.Ref) return Components.Component_Access;
    --  Return the top component of the Binding_Object
    --  designated by reference X.

-   function Get_Endpoint (X : Smart_Pointers.Ref)
-     return PolyORB.Transport.Transport_Endpoint_Access;
+   function Get_Endpoint
+     (X : Smart_Pointers.Ref) return Transport.Transport_Endpoint_Access;
    --  Return the transport endpoint of the Binding_Object
    --  designated by reference X.

-   function Get_Profile (BO : Binding_Object_Access)
-     return Binding_Data.Profile_Access;
+   function Get_Profile
+     (BO : Binding_Object_Access) return Binding_Data.Profile_Access;
    --  Return profile associated with Binding Object BO

    procedure Set_Profile
      (BO : Binding_Object_Access; P : Binding_Data.Profile_Access);
    --  Set the profile associated with Binding Object BO

-   procedure Register_Reference_Information
-     (BO            : Binding_Object_Access;
-      Referenced_In : Components.Component_Access;
-      Referenced_At : BO_Lists.Iterator);
-   --  Register reference information into the Binding Object BO so that it can
-   --  remove itself from the ORB binding object list at finalisation.
+   procedure Set_Referenced
+     (BO         : Binding_Object_Access;
+      Referenced : Boolean);
+   --  Record that BO is attached to the ORB's BO list

+   function Referenced (BO : Binding_Object_Access) return Boolean;
+   --  Test whether BO is attached to the ORB's BO list
+
    procedure Setup_Binding_Object
-     (TE      :     Transport.Transport_Endpoint_Access;
-      FFC     :     Filters.Factory_Array;
+     (ORB     : Components.Component_Access;
+      TE      : Transport.Transport_Endpoint_Access;
+      FFC     : Filters.Factory_Array;
       BO_Ref  : out Smart_Pointers.Ref;
-      Pro     :     Binding_Data.Profile_Access);
+      Pro     : Binding_Data.Profile_Access);
    --  Create a binding object associating TE with a protocol stack
    --  instantiated using FFC.

    function Notepad_Of
-     (BO : Binding_Object_Access)
-      return Annotations.Notepad_Access;
+     (BO : Binding_Object_Access) return Annotations.Notepad_Access;
    --  Returns the notepad of given Binding Object

-   function Get_Referenced_At
-     (BO : Binding_Object_Access) return BO_Lists.Iterator;
-   --  Return an iterator denoting the position of BO in the ORB's list of
-   --  active binding objects (as set by Register_Reference_Information).
-
    function Valid (BO : Binding_Object_Access) return Boolean;
    --  True if BO can be used to forward requests to an object

 private
-   type Binding_Object is
-     new Smart_Pointers.Non_Controlled_Entity with record
-         Transport_Endpoint : Transport.Transport_Endpoint_Access;
-         --  Bottom of the binding object: a transport endpoint
+   type Links_Type is
+     array (Utils.Ilists.Link_Type) of aliased Binding_Object_Access;

-         Top : Filters.Filter_Access;
-         --  Top of the binding object: a protocol session
+   type Binding_Object is new Smart_Pointers.Non_Controlled_Entity with record
+      ORB : Components.Component_Access;
+      --  The ORB owning this BO

-         Profile : Binding_Data.Profile_Access;
-         --  The Profile associated with this Binding Object. This profile is
-         --  used to determine if the Binding Object can be reused for another
-         --  profile.
+      Transport_Endpoint : Transport.Transport_Endpoint_Access;
+      --  Bottom of the binding object: a transport endpoint

-         Referenced_In : Components.Component_Access;
-         --  The ORB where this Binding Object is referenced
+      Top : Filters.Filter_Access;
+      --  Top of the binding object: a protocol session

-         Referenced_At : BO_Lists.Iterator;
-         --  The position of this Binding Object in the Binding_Objects list of
-         --  the ORB referencing this Binding Object.
-         --  Note: this component must be accessed under the protection of the
-         --  critical section of the Referenced_In ORB.
+      Profile : Binding_Data.Profile_Access;
+      --  The Profile associated with this Binding Object. This profile is
+      --  used to determine if the Binding Object can be reused for another
+      --  profile.

-         Notepad : aliased Annotations.Notepad;
-         --  Binding_Object's notepad. The user is responsible for ensuring
-         --  proper protection against incorrect concurrent accesses.
-     end record;
+      Links : aliased Links_Type;
+      --  Pointers for chaining of this Binding Object in the
+      --  Binding_Objects list of the ORB.
+      --  Note: this component must be accessed under the protection of the
+      --  critical section of the Referenced_In ORB.

+      Referenced : Boolean := False;
+      --  True when attached to the ORB's BO list
+
+      Notepad : aliased Annotations.Notepad;
+      --  Binding_Object's notepad. The user is responsible for ensuring
+      --  proper protection against incorrect concurrent accesses.
+   end record;
+
    procedure Finalize (X : in out Binding_Object);

 end PolyORB.Binding_Objects;
============================================================
--- src/polyorb-buffers.adb	37848e6f2a31b7862eedd1731894a83b5a155e76
+++ src/polyorb-buffers.adb	de3d04a9d894b30e2109ec2933be2114f0709c7b
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -26,14 +26,19 @@ with Ada.Unchecked_Deallocation;
 ------------------------------------------------------------------------------

 with Ada.Unchecked_Deallocation;
---  For Iovec_Pools.Free

+pragma Warnings (Off);
+--  Depends on System.Unsigned_Types, an internal GNAT unit
+with System.Unsigned_Types;
+pragma Warnings (On);
+
 with PolyORB.Log;

 package body PolyORB.Buffers is

    use Ada.Streams;
    use System.Storage_Elements;
+   use System.Unsigned_Types;
    use PolyORB.Opaque;
    use PolyORB.Log;
    use Buffer_Chunk_Pools;
@@ -56,138 +61,107 @@ package body PolyORB.Buffers is
    -----------------------

    function To_Stream_Element_Array
-     (Buffer : access Buffer_Type) return Opaque.Zone_Access;
+     (Buffer : Buffer_Type) return Opaque.Zone_Access;
    --  Dump the contents of Buffer into a Stream_Element_Array, and return a
    --  pointer to it. The caller must take care of deallocating the pointer
    --  after use.

-   ------------------------
-   -- General operations --
-   ------------------------
+   function Padding_Size
+     (Pos       : Stream_Element_Offset;
+      Alignment : Alignment_Type) return Stream_Element_Count;
+   pragma Inline (Padding_Size);
+   --  Return size of padding required to bring buffer position Pos to the
+   --  desired alignment.

-   ------------
-   -- Length --
-   ------------
+   procedure Show (Octets : Zone_Access);
+   --  Display the contents of Octets for debugging purposes.

-   function Length
-     (Buffer : access Buffer_Type)
-     return Stream_Element_Count is
-   begin
-      return Buffer.Length;
-   end Length;
-
    --------------------
-   -- Set_Endianness --
+   -- Align_Position --
    --------------------

-   procedure Set_Endianness
-     (Buffer : access Buffer_Type;
-      E      :        Endianness_Type) is
+   procedure Align_Position
+     (Buffer    : access Buffer_Type;
+      Alignment : Alignment_Type)
+   is
+      Padding : constant Stream_Element_Count :=
+                  Padding_Size (Buffer.CDR_Position, Alignment);
    begin
-      pragma Assert (Buffer.CDR_Position = Buffer.Initial_CDR_Position);
-      Buffer.Endianness := E;
-   end Set_Endianness;
+      pragma Debug
+        (C, O ("Align_Position: pos = "
+            & Stream_Element_Offset'Image (Buffer.CDR_Position)
+            & ", padding by" & Stream_Element_Count'Image (Padding)
+            & " for " & Alignment_Type'Image (Alignment)));

-   ----------------
-   -- Endianness --
-   ----------------
+      pragma Assert
+        (Buffer.CDR_Position + Padding <=
+           Buffer.Initial_CDR_Position + Buffer.Length);

-   function Endianness (Buffer : access Buffer_Type) return Endianness_Type is
-   begin
-      return Buffer.Endianness;
-   end Endianness;
+      --  Advance the CDR position to the new aligned position

-   ----------------------
-   -- Release_Contents --
-   ----------------------
+      Buffer.CDR_Position := Buffer.CDR_Position + Padding;

-   procedure Release_Contents
-     (Buffer : in out Buffer_Type) is
-   begin
-      Release (Buffer.Contents);
-      Buffer_Chunk_Pools.Release (Buffer.Storage'Access);
-      Buffer.CDR_Position         := 0;
-      Buffer.Initial_CDR_Position := 0;
-      Buffer.Endianness           := Host_Order;
-      Buffer.Length               := 0;
-   end Release_Contents;
+      pragma Debug
+        (C, O ("Align_Position: now at"
+                 & Stream_Element_Offset'Image (Buffer.CDR_Position)));
+   end Align_Position;

-   -----------------------
-   -- Initialize_Buffer --
-   -----------------------
+   -------------------------------------
+   -- Allocate_And_Insert_Cooked_Data --
+   -------------------------------------

-   procedure Initialize_Buffer
-     (Buffer               : access Buffer_Type;
-      Size                 :        Stream_Element_Count;
-      Data                 :        Opaque_Pointer;
-      Endianness           :        Endianness_Type;
-      Initial_CDR_Position :        Stream_Element_Offset)
+   procedure Allocate_And_Insert_Cooked_Data
+     (Buffer    : access Buffer_Type;
+      Size      :        Stream_Element_Count;
+      Data      :    out Opaque_Pointer)
    is
-      Data_Iovec : constant Iovec := (Iov_Base => Data,
-                                      Iov_Len  => Storage_Offset (Size));
+      A_Data : Opaque_Pointer;

    begin
-      pragma Assert (True
-        and then Buffer.CDR_Position = 0
-        and then Buffer.Initial_CDR_Position = 0);
+      Grow_Shrink (Buffer.Contents'Access, Size, A_Data);
+      --  First try to grow an existing Iovec.

-      Buffer.Endianness           := Endianness;
-      Buffer.CDR_Position         := Initial_CDR_Position;
-      Buffer.Initial_CDR_Position := Initial_CDR_Position;
+      if Is_Null (A_Data) then
+         declare
+            A_Chunk : Chunk_Access;
+            Data_Iovec : Iovec;
+         begin
+            Allocate (Buffer.Storage'Access, A_Chunk, Size);
+            pragma Assert (A_Chunk /= null and then A_Chunk.Size >= Size);
+            Data_Iovec := (Iov_Base => Chunk_Storage (A_Chunk),
+                           Iov_Len  => Storage_Offset (Size));

-      Append
-        (Iovec_Pool => Buffer.Contents,
-         An_Iovec   => Data_Iovec);
+            A_Data := Chunk_Storage (A_Chunk);
+            Metadata (A_Chunk).all := (Last_Used => Size);
+            Append
+              (Iovec_Pool => Buffer.Contents,
+               An_Iovec   => Data_Iovec,
+               A_Chunk    => A_Chunk);
+            pragma Assert (not Is_Null (A_Data));
+         end;
+      end if;

-      Buffer.Length := Size;
-   end Initialize_Buffer;
+      Data := A_Data;
+      Buffer.CDR_Position := Buffer.CDR_Position + Size;
+      Buffer.Length := Buffer.Length + Size;
+   end Allocate_And_Insert_Cooked_Data;

-   -------------
-   -- Reserve --
-   -------------
+   ------------------
+   -- CDR_Position --
+   ------------------

-   function Reserve
-     (Buffer : access Buffer_Type;
-      Amount :        Stream_Element_Count) return Reservation
-   is
-      Copy_Address     : Opaque_Pointer;
-      Initial_Position : constant Stream_Element_Offset :=
-                           Buffer.CDR_Position;
+   function CDR_Position
+     (Buffer : access Buffer_Type)
+     return Stream_Element_Offset is
    begin
-      Allocate_And_Insert_Cooked_Data
-        (Buffer, Amount, Copy_Address);
+      return Buffer.CDR_Position;
+   end CDR_Position;

-      return Reservation'
-        (Location     => Copy_Address,
-         Endianness   => Buffer.Endianness,
-         CDR_Position => Initial_Position,
-         Length       => Amount);
-   end Reserve;
-
-   ---------------
-   -- Copy_Data --
-   ---------------
-
-   procedure Copy_Data
-     (From : Buffer_Type;
-      Into :    Reservation) is
-   begin
-      pragma Assert (True
-        and then From.Endianness           = Into.Endianness
-        and then From.Initial_CDR_Position = Into.CDR_Position
-        and then From.Length               = Into.Length);
-
-      Iovec_Pools.Dump (From.Contents, Into.Location);
-   end Copy_Data;
-
    ----------
    -- Copy --
    ----------

-   function Copy
-     (Buffer : access Buffer_Type)
-     return Buffer_Access
-   is
+   function Copy (Buffer : access Buffer_Type) return Buffer_Access is
       Into         : constant Buffer_Access := new Buffer_Type;
       Copy_Address : Opaque_Pointer;

@@ -206,115 +180,139 @@ package body PolyORB.Buffers is
       return Into;
    end Copy;

-   -------------
-   -- Release --
-   -------------
+   ---------------
+   -- Copy_Data --
+   ---------------

-   procedure Release
-     (A_Buffer : in out Buffer_Access)
-   is
-      procedure Free is new Ada.Unchecked_Deallocation
-        (Buffer_Type, Buffer_Access);
-
+   procedure Copy_Data
+     (From : Buffer_Type;
+      Into :    Reservation) is
    begin
-      if A_Buffer /= null then
-         Release_Contents (A_Buffer.all);
-         Free (A_Buffer);
-      end if;
-   end Release;
+      pragma Assert (True
+        and then From.Endianness           = Into.Endianness
+        and then From.Initial_CDR_Position = Into.CDR_Position
+        and then From.Length               = Into.Length);

-   -----------------------------
-   -- To_Stream_Element_Array --
-   -----------------------------
+      Iovec_Pools.Dump (From.Contents, Into.Location);
+   end Copy_Data;

-   function To_Stream_Element_Array
-     (Buffer   : access Buffer_Type)
-     return Opaque.Zone_Access
-   is
-      Result : Opaque.Zone_Access;
+   ----------------
+   -- Endianness --
+   ----------------
+
+   function Endianness (Buffer : access Buffer_Type) return Endianness_Type is
    begin
-      pragma Assert (Buffer.Initial_CDR_Position = 0);
-      Result := new Stream_Element_Array (1 .. Length (Buffer));
-      Iovec_Pools.Dump (Buffer.Contents, Result (Result'First)'Address);
-      return Result;
-   end To_Stream_Element_Array;
+      return Buffer.Endianness;
+   end Endianness;

-   function To_Stream_Element_Array
-     (Buffer   : access Buffer_Type)
-     return Stream_Element_Array
+   ------------------
+   -- Extract_Data --
+   ------------------
+
+   procedure Extract_Data
+     (Buffer      : access Buffer_Type;
+      Data        : out Opaque_Pointer;
+      Size        : Stream_Element_Count;
+      Use_Current : Boolean := True;
+      At_Position : Stream_Element_Offset := 0)
    is
-      Contents : Zone_Access := To_Stream_Element_Array (Buffer);
-      Result   : constant Stream_Element_Array := Contents.all;
+      Extracted_Size : Stream_Element_Count := Size;
    begin
-      Free (Contents);
-      return Result;
-   end To_Stream_Element_Array;
+      Partial_Extract_Data (Buffer, Data, Extracted_Size,
+        Use_Current, At_Position, Partial => False);
+      pragma Assert (Extracted_Size = Size);
+   end Extract_Data;

-   ----------
-   -- Peek --
-   ----------
+   ------------
+   -- Length --
+   ------------

-   function Peek
-     (Buffer   : access Buffer_Type;
-      Position :        Ada.Streams.Stream_Element_Offset)
-     return Ada.Streams.Stream_Element is
+   function Length (Buffer : Buffer_Type) return Stream_Element_Count is
    begin
-      return Iovec_Pools.Peek
-        (Iovec_Pool => Buffer.Contents,
-         Offset     => Position - Buffer.Initial_CDR_Position);
-   end Peek;
+      return Buffer.Length;
+   end Length;

-   ------------------------------
-   -- The CDR view of a buffer --
-   ------------------------------
+   -----------------------
+   -- Initialize_Buffer --
+   -----------------------

-   --------------------------
-   -- Set_Initial_Position --
-   --------------------------
+   procedure Initialize_Buffer
+     (Buffer               : access Buffer_Type;
+      Size                 :        Stream_Element_Count;
+      Data                 :        Opaque_Pointer;
+      Endianness           :        Endianness_Type;
+      Initial_CDR_Position :        Stream_Element_Offset)
+   is
+      Data_Iovec : constant Iovec := (Iov_Base => Data,
+                                      Iov_Len  => Storage_Offset (Size));

-   procedure Set_Initial_Position
-     (Buffer   : access Buffer_Type;
-      Position :        Stream_Element_Offset) is
    begin
-      pragma Assert
-        (Buffer.Initial_CDR_Position = Buffer.CDR_Position);
+      pragma Assert (True
+        and then Buffer.CDR_Position = 0
+        and then Buffer.Initial_CDR_Position = 0);

-      Buffer.Initial_CDR_Position := Position;
-      Buffer.CDR_Position         := Position;
-   end Set_Initial_Position;
+      Buffer.Endianness           := Endianness;
+      Buffer.CDR_Position         := Initial_CDR_Position;
+      Buffer.Initial_CDR_Position := Initial_CDR_Position;

-   Null_Data : aliased Stream_Element_Array (1 .. Alignment_Type'Last - 1)
-     := (1 .. Alignment_Type'Last - 1 => 0);
-   --  Null data used for padding.
+      Append
+        (Iovec_Pool => Buffer.Contents,
+         An_Iovec   => Data_Iovec);

-   Null_Data_Address : constant Opaque_Pointer
-     := Null_Data (Null_Data'First)'Address;
+      Buffer.Length := Size;
+   end Initialize_Buffer;

+   ---------------------
+   -- Insert_Raw_Data --
+   ---------------------
+
+   procedure Insert_Raw_Data
+     (Buffer    : access Buffer_Type;
+      Size      :        Stream_Element_Count;
+      Data      :        Opaque_Pointer)
+   is
+      Data_Iovec : constant Iovec
+        := (Iov_Base => Data, Iov_Len => Storage_Offset (Size));
+   begin
+      pragma Assert (Buffer.Endianness = Host_Order);
+
+      Append (Iovec_Pool => Buffer.Contents, An_Iovec => Data_Iovec);
+      Buffer.CDR_Position := Buffer.CDR_Position + Size;
+      Buffer.Length       := Buffer.Length + Size;
+   end Insert_Raw_Data;
+
    ---------------
    -- Pad_Align --
    ---------------

+   Null_Data : aliased Stream_Element_Array
+                 (1 .. 2 ** Alignment_Type'Pos (Alignment_Type'Last)) :=
+                 (others => 0);
+   --  Null data used for padding
+
+   Null_Data_Address : constant Opaque_Pointer :=
+                         Null_Data (Null_Data'First)'Address;
+
    procedure Pad_Align
      (Buffer    : access Buffer_Type;
       Alignment : Alignment_Type)
    is
       Padding : constant Stream_Element_Count :=
-                  (Alignment - Buffer.CDR_Position) mod Alignment;
+                  Padding_Size (Buffer.CDR_Position, Alignment);
       Padding_Space : Opaque_Pointer;
    begin
+      pragma Debug
+        (C, O ("Pad_Align: pos = "
+            & Stream_Element_Offset'Image (Buffer.CDR_Position)
+            & ", padding by" & Stream_Element_Count'Image (Padding)
+            & " for " & Alignment_Type'Image (Alignment)));
+
       if Padding = 0 then
          --  Buffer is already aligned
+
          return;
       end if;

-      pragma Debug
-        (C, O ("Pad_Align: pos = "
-            & Stream_Element_Offset'Image (Buffer.CDR_Position)));
-      pragma Debug
-        (C, O ("Aligning on" & Alignment_Type'Image (Alignment)));
-      pragma Debug (C, O ("Padding by"
-                       & Stream_Element_Count'Image (Padding)));
-
       --  Try to extend Buffer.Content's last Iovec to provide proper alignment

       Grow_Shrink (Buffer.Contents'Access, Padding, Padding_Space);
@@ -348,143 +346,23 @@ package body PolyORB.Buffers is
       Align_Position (Buffer, Alignment);
    end Pad_Align;

-   --------------------
-   -- Align_Position --
-   --------------------
-
-   procedure Align_Position
-     (Buffer    : access Buffer_Type;
-      Alignment :        Alignment_Type)
-   is
-      Padding : constant Stream_Element_Count
-         := (Alignment - Buffer.CDR_Position) mod Alignment;
-   begin
-      pragma Debug
-        (C, O ("Align_Position: pos = "
-            & Stream_Element_Offset'Image (Buffer.CDR_Position)));
-      pragma Debug
-        (C, O ("Aligning on" & Alignment_Type'Image (Alignment)));
-      pragma Debug
-        (C, O ("Padding by" & Stream_Element_Count'Image (Padding)));
-
-      if Padding = 0 then
-         --  Buffer is already aligned.
-
-         return;
-      end if;
-
-      pragma Assert
-        (Buffer.CDR_Position + Padding
-         <= Buffer.Initial_CDR_Position + Buffer.Length);
-
-      Buffer.CDR_Position := Buffer.CDR_Position + Padding;
-      --  Advance the CDR position to the new alignment.
-
-      pragma Assert (Buffer.CDR_Position mod Alignment = 0);
-      --  Post-condition: the buffer is aligned as requested.
-
-      pragma Debug
-        (C, O ("Align_Position: now at"
-            & Stream_Element_Offset'Image (Buffer.CDR_Position)));
-
-   end Align_Position;
-
-   ---------------------
-   -- Insert_Raw_Data --
-   ---------------------
-
-   procedure Insert_Raw_Data
-     (Buffer    : access Buffer_Type;
-      Size      :        Stream_Element_Count;
-      Data      :        Opaque_Pointer)
-   is
-      Data_Iovec : constant Iovec
-        := (Iov_Base => Data, Iov_Len => Storage_Offset (Size));
-   begin
-      pragma Assert (Buffer.Endianness = Host_Order);
-
-      Append
-        (Iovec_Pool => Buffer.Contents,
-         An_Iovec   => Data_Iovec);
-      Buffer.CDR_Position := Buffer.CDR_Position + Size;
-      Buffer.Length := Buffer.Length + Size;
-   end Insert_Raw_Data;
-
-   -------------------------------------
-   -- Allocate_And_Insert_Cooked_Data --
-   -------------------------------------
-
-   procedure Allocate_And_Insert_Cooked_Data
-     (Buffer    : access Buffer_Type;
-      Size      :        Stream_Element_Count;
-      Data      :    out Opaque_Pointer)
-   is
-      A_Data : Opaque_Pointer;
-
-   begin
-      Grow_Shrink (Buffer.Contents'Access, Size, A_Data);
-      --  First try to grow an existing Iovec.
-
-      if Is_Null (A_Data) then
-         declare
-            A_Chunk : Chunk_Access;
-            Data_Iovec : Iovec;
-         begin
-            Allocate (Buffer.Storage'Access, A_Chunk, Size);
-            pragma Assert (A_Chunk /= null and then A_Chunk.Size >= Size);
-            Data_Iovec := (Iov_Base => Chunk_Storage (A_Chunk),
-                           Iov_Len  => Storage_Offset (Size));
-
-            A_Data := Chunk_Storage (A_Chunk);
-            Metadata (A_Chunk).all := (Last_Used => Size);
-            Append
-              (Iovec_Pool => Buffer.Contents,
-               An_Iovec   => Data_Iovec,
-               A_Chunk    => A_Chunk);
-            pragma Assert (not Is_Null (A_Data));
-         end;
-      end if;
-
-      Data := A_Data;
-      Buffer.CDR_Position := Buffer.CDR_Position + Size;
-      Buffer.Length := Buffer.Length + Size;
-   end Allocate_And_Insert_Cooked_Data;
-
-   ----------------------
-   -- Unuse_Allocation --
-   ----------------------
-
-   procedure Unuse_Allocation
-     (Buffer    : access Buffer_Type;
-      Size      :        Stream_Element_Count)
-   is
-      Data : Opaque_Pointer;
-
-   begin
-      if Size /= 0 then
-         Grow_Shrink (Buffer.Contents'Access, -Size, Data);
-         Buffer.CDR_Position := Buffer.CDR_Position - Size;
-         Buffer.Length := Buffer.Length - Size;
-      end if;
-   end Unuse_Allocation;
-
    ------------------
-   -- Extract_Data --
+   -- Padding_Size --
    ------------------

-   procedure Extract_Data
-     (Buffer      : access Buffer_Type;
-      Data        : out Opaque_Pointer;
-      Size        : Stream_Element_Count;
-      Use_Current : Boolean := True;
-      At_Position : Stream_Element_Offset := 0)
+   function Padding_Size
+     (Pos       : Stream_Element_Offset;
+      Alignment : Alignment_Type) return Stream_Element_Count
    is
-      Extracted_Size : Stream_Element_Count := Size;
+      subtype Alignment_Modular is System.Unsigned_Types.Long_Unsigned;
+
+      Alignment_Mask : constant Alignment_Modular :=
+                         Shift_Left (1, Alignment_Type'Pos (Alignment)) - 1;
+      Padding : constant Alignment_Modular :=
+                  (-Alignment_Modular (Pos)) and Alignment_Mask;
    begin
-      Partial_Extract_Data (Buffer, Data, Extracted_Size,
-        Use_Current, At_Position, Partial => False);
-      pragma Assert (Extracted_Size = Size);
-   end Extract_Data;
+      return Stream_Element_Count (Padding);
+   end Padding_Size;

    --------------------------
    -- Partial_Extract_Data --
@@ -520,38 +398,79 @@ package body PolyORB.Buffers is
       end if;
    end Partial_Extract_Data;

-   ------------------
-   -- CDR_Position --
-   ------------------
+   ----------
+   -- Peek --
+   ----------

-   function CDR_Position
-     (Buffer : access Buffer_Type)
-     return Stream_Element_Offset is
+   function Peek
+     (Buffer   : access Buffer_Type;
+      Position : Ada.Streams.Stream_Element_Offset)
+     return Ada.Streams.Stream_Element
+   is
    begin
-      return Buffer.CDR_Position;
-   end CDR_Position;
+      return Iovec_Pools.Peek
+        (Iovec_Pool => Buffer.Contents,
+         Offset     => Position - Buffer.Initial_CDR_Position);
+   end Peek;

-   ----------------------
-   -- Set_CDR_Position --
-   ----------------------
+   --------------------
+   -- Receive_Buffer --
+   --------------------

-   procedure Set_CDR_Position
+   procedure Receive_Buffer
      (Buffer   : access Buffer_Type;
-      Position :        Stream_Element_Offset) is
+      Max      :        Stream_Element_Count;
+      Received :    out Stream_Element_Count)
+   is
+      V                  : aliased Iovec;
+      Saved_CDR_Position : constant Stream_Element_Offset :=
+                             Buffer.CDR_Position;
+
    begin
-      Buffer.CDR_Position := Position;
-   end Set_CDR_Position;
+      pragma Debug (C, O ("Receive_Buffer: Max =" & Max'Img));

-   ------------
-   -- Rewind --
-   ------------
+      Allocate_And_Insert_Cooked_Data (Buffer, Max, V.Iov_Base);
+      V.Iov_Len := Storage_Offset (Max);
+      Lowlevel_Receive (V'Access);
+      Received := Stream_Element_Offset (V.Iov_Len);

-   procedure Rewind
-     (Buffer : access Buffer_Type) is
+      pragma Debug (C, O ("Receive_Buffer: Received =" & Received'Img));
+      Unuse_Allocation (Buffer, Max - Received);
+      Buffer.CDR_Position := Saved_CDR_Position;
+   end Receive_Buffer;
+
+   -------------
+   -- Release --
+   -------------
+
+   procedure Release
+     (A_Buffer : in out Buffer_Access)
+   is
+      procedure Free is new Ada.Unchecked_Deallocation
+        (Buffer_Type, Buffer_Access);
+
    begin
-      Buffer.CDR_Position := Buffer.Initial_CDR_Position;
-   end Rewind;
+      if A_Buffer /= null then
+         Release_Contents (A_Buffer.all);
+         Free (A_Buffer);
+      end if;
+   end Release;

+   ----------------------
+   -- Release_Contents --
+   ----------------------
+
+   procedure Release_Contents
+     (Buffer : in out Buffer_Type) is
+   begin
+      Release (Buffer.Contents);
+      Buffer_Chunk_Pools.Release (Buffer.Storage'Access);
+      Buffer.CDR_Position         := 0;
+      Buffer.Initial_CDR_Position := 0;
+      Buffer.Endianness           := Host_Order;
+      Buffer.Length               := 0;
+   end Release_Contents;
+
    ---------------
    -- Remaining --
    ---------------
@@ -564,10 +483,38 @@ package body PolyORB.Buffers is
         - Buffer.CDR_Position;
    end Remaining;

-   ---------------------------------------
-   -- The input/output view of a buffer --
-   ---------------------------------------
+   -------------
+   -- Reserve --
+   -------------

+   function Reserve
+     (Buffer : access Buffer_Type;
+      Amount :        Stream_Element_Count) return Reservation
+   is
+      Copy_Address     : Opaque_Pointer;
+      Initial_Position : constant Stream_Element_Offset :=
+                           Buffer.CDR_Position;
+   begin
+      Allocate_And_Insert_Cooked_Data
+        (Buffer, Amount, Copy_Address);
+
+      return Reservation'
+        (Location     => Copy_Address,
+         Endianness   => Buffer.Endianness,
+         CDR_Position => Initial_Position,
+         Length       => Amount);
+   end Reserve;
+
+   ------------
+   -- Rewind --
+   ------------
+
+   procedure Rewind
+     (Buffer : access Buffer_Type) is
+   begin
+      Buffer.CDR_Position := Buffer.Initial_CDR_Position;
+   end Rewind;
+
    -----------------
    -- Send_Buffer --
    -----------------
@@ -579,38 +526,43 @@ package body PolyORB.Buffers is
       Send_Iovec_Pool (Buffer.Contents'Access, Buffer.Length);
    end Send_Buffer;

-   --------------------
-   -- Receive_Buffer --
-   --------------------
+   ----------------------
+   -- Set_CDR_Position --
+   ----------------------

-   procedure Receive_Buffer
+   procedure Set_CDR_Position
      (Buffer   : access Buffer_Type;
-      Max      :        Stream_Element_Count;
-      Received :    out Stream_Element_Count)
-   is
-      V : aliased Iovec;
-      Saved_CDR_Position : constant Stream_Element_Offset
-        := Buffer.CDR_Position;
+      Position :        Stream_Element_Offset) is
+   begin
+      Buffer.CDR_Position := Position;
+   end Set_CDR_Position;

-   begin
-      pragma Debug (C, O ("Receive_Buffer: Max =" & Max'Img));
+   --------------------
+   -- Set_Endianness --
+   --------------------

-      Allocate_And_Insert_Cooked_Data (Buffer, Max, V.Iov_Base);
-      V.Iov_Len := Storage_Offset (Max);
-      Lowlevel_Receive (V'Access);
-      Received := Stream_Element_Offset (V.Iov_Len);
+   procedure Set_Endianness
+     (Buffer : access Buffer_Type;
+      E      :        Endianness_Type) is
+   begin
+      pragma Assert (Buffer.CDR_Position = Buffer.Initial_CDR_Position);
+      Buffer.Endianness := E;
+   end Set_Endianness;

-      pragma Debug (C, O ("Receive_Buffer: Received =" & Received'Img));
-      Unuse_Allocation (Buffer, Max - Received);
-      Buffer.CDR_Position := Saved_CDR_Position;
-   end Receive_Buffer;
+   --------------------------
+   -- Set_Initial_Position --
+   --------------------------

-   -------------------------
-   -- Utility subprograms --
-   -------------------------
+   procedure Set_Initial_Position
+     (Buffer   : access Buffer_Type;
+      Position : Stream_Element_Offset) is
+   begin
+      pragma Assert
+        (Buffer.Initial_CDR_Position = Buffer.CDR_Position);

-   procedure Show (Octets : Zone_Access);
-   --  Display the contents of Octets for debugging purposes.
+      Buffer.Initial_CDR_Position := Position;
+      Buffer.CDR_Position         := Position;
+   end Set_Initial_Position;

    ----------
    -- Show --
@@ -667,6 +619,10 @@ package body PolyORB.Buffers is
       end if;
    end Show;

+   ----------
+   -- Show --
+   ----------
+
    procedure Show (Buffer : access Buffer_Type) is
    begin
       pragma Debug (C2, O2 ("Dumping "
@@ -680,22 +636,68 @@ package body PolyORB.Buffers is
       end if;

       declare
-         Dumped : Zone_Access
-           := To_Stream_Element_Array (Buffer);
+         Dumped : Zone_Access := To_Stream_Element_Array (Buffer.all);
       begin
          Show (Dumped);
          Free (Dumped);
       end;
    end Show;

-   -------------------------------------------
-   -- Implementation of package Iovec_Pools --
-   -------------------------------------------
+   -----------------------------
+   -- To_Stream_Element_Array --
+   -----------------------------

+   function To_Stream_Element_Array
+     (Buffer : Buffer_Type) return Opaque.Zone_Access
+   is
+      Result : Opaque.Zone_Access;
+   begin
+      pragma Assert (Buffer.Initial_CDR_Position = 0);
+      Result := new Stream_Element_Array (1 .. Length (Buffer));
+      Iovec_Pools.Dump (Buffer.Contents, Result (Result'First)'Address);
+      return Result;
+   end To_Stream_Element_Array;
+
+   -----------------------------
+   -- To_Stream_Element_Array --
+   -----------------------------
+
+   function To_Stream_Element_Array
+     (Buffer : Buffer_Type) return Stream_Element_Array
+   is
+      Contents : Zone_Access := To_Stream_Element_Array (Buffer);
+      Result   : constant Stream_Element_Array := Contents.all;
+   begin
+      Free (Contents);
+      return Result;
+   end To_Stream_Element_Array;
+
+   ----------------------
+   -- Unuse_Allocation --
+   ----------------------
+
+   procedure Unuse_Allocation
+     (Buffer    : access Buffer_Type;
+      Size      :        Stream_Element_Count)
+   is
+      Data : Opaque_Pointer;
+
+   begin
+      if Size /= 0 then
+         Grow_Shrink (Buffer.Contents'Access, -Size, Data);
+         Buffer.CDR_Position := Buffer.CDR_Position - Size;
+         Buffer.Length := Buffer.Length - Size;
+      end if;
+   end Unuse_Allocation;
+
+   -----------------
+   -- Iovec_Pools --
+   -----------------
+
    package body Iovec_Pools is

-      procedure Free is new Ada.Unchecked_Deallocation
-        (Iovec_Array, Iovec_Array_Access);
+      procedure Free is
+        new Ada.Unchecked_Deallocation (Iovec_Array, Iovec_Array_Access);

       ----------------------------------------
       -- Utility Subprograms (declarations) --
@@ -722,152 +724,35 @@ package body PolyORB.Buffers is
       procedure Dump (Iovecs : Iovec_Array; Into : Opaque_Pointer);
       --  Dump the content of Iovecs into Into

-      -----------------
-      -- Grow_Shrink --
-      -----------------
-
-      procedure Grow_Shrink
-        (Iovec_Pool   : access Iovec_Pool_Type;
-         Size         : Stream_Element_Offset;
-         Data         : out Opaque_Pointer)
-      is
-
-         -------------------------
-         -- First_Address_After --
-         -------------------------
-
-         function First_Address_After (An_Iovec : Iovec) return Opaque_Pointer;
-         pragma Inline (First_Address_After);
-         --  Return the address of the storage element immediately following
-         --  the last element of An_Iovec.
-
-         function First_Address_After
-           (An_Iovec : Iovec) return Opaque_Pointer
-         is
-         begin
-            return An_Iovec.Iov_Base + An_Iovec.Iov_Len;
-         end First_Address_After;
-
-         -------------
-         -- Do_Grow --
-         -------------
-
-         procedure Do_Grow
-           (Last_Iovec : in out Iovec;
-            Last_Chunk :        Chunk_Access);
-         pragma Inline (Do_Grow);
-
-         procedure Do_Grow
-           (Last_Iovec : in out Iovec;
-            Last_Chunk :        Chunk_Access) is
-         begin
-            if Last_Chunk /= null then
-               declare
-                  Chunk_Metadata : constant Chunk_Metadata_Access
-                    := Metadata (Last_Chunk);
-               begin
-                  if False
-                    or else (Size > 0
-                             and then Chunk_Metadata.Last_Used + Size
-                               <= Last_Chunk.Size)
-                    or else (Size < 0
-                             and then Chunk_Metadata.Last_Used + Size >= 0
-                             and then Last_Iovec.Iov_Len
-                               + Storage_Offset (Size) >= 0)
-                  then
-                     Chunk_Metadata.Last_Used
-                       := Chunk_Metadata.Last_Used + Size;
-                     Data := First_Address_After (Last_Iovec);
-                     Last_Iovec.Iov_Len := Last_Iovec.Iov_Len
-                       + Storage_Offset (Size);
-                  else
-                     --  Cannot grow last chunk: leave Data unchanged.
-
-                     pragma Debug
-                       (C, O ("Cannot satisfy growth request of size"
-                           & Stream_Element_Offset'Image (Size)));
-                     null;
-                  end if;
-               end;
-            end if;
-         end Do_Grow;
-
-      begin
-         Data := System.Null_Address;
-
-         if Iovec_Pool.Last = 0 then
-            --  Empty Iovec pool.
-
-            return;
-         end if;
-
-         if Iovec_Pool.Last <= Iovec_Pool.Prealloc_Array'Last then
-            Do_Grow (Iovec_Pool.Prealloc_Array (Iovec_Pool.Last),
-                     Iovec_Pool.Last_Chunk);
-         else
-            Do_Grow (Iovec_Pool.Dynamic_Array (Iovec_Pool.Last),
-                     Iovec_Pool.Last_Chunk);
-         end if;
-      end Grow_Shrink;
-
-      ----------------
-      -- Is_Dynamic --
-      ----------------
-
-      function Is_Dynamic (Iovec_Pool : Iovec_Pool_Type) return Boolean is
-      begin
-         return Iovec_Pool.Dynamic_Array /= null;
-      end Is_Dynamic;
-
-      --------------------
-      -- Iovecs_Address --
-      --------------------
-
-      function Iovecs_Address
-        (Iovec_Pool : Iovec_Pool_Type) return System.Address
-      is
-      begin
-         if Is_Dynamic (Iovec_Pool) then
-            return Iovec_Pool.Dynamic_Array (1)'Address;
-         else
-            return Iovec_Pool.Prealloc_Array (1)'Address;
-         end if;
-      end Iovecs_Address;
-
       ------------
-      -- Extend --
+      -- Append --
       ------------

-      procedure Extend
+      procedure Append
         (Iovec_Pool : in out Iovec_Pool_Type;
-         Require    :        Natural;
-         Allocate   :        Natural) is
+         An_Iovec   : Iovec;
+         A_Chunk    : Buffer_Chunk_Pools.Chunk_Access := null)
+      is
+         New_Last : constant Natural := Iovec_Pool.Last + 1;
       begin
-         pragma Assert (Allocate >= Require);
+         Extend (Iovec_Pool, New_Last, 2 * Iovec_Pool.Length);

-         if Require > Iovec_Pool.Length then
-            declare
-               New_Array : constant Iovec_Array_Access :=
-                             new Iovec_Array (1 .. Allocate);
+         --  Append new Iovec

-               Old_Array_Address : constant System.Address :=
-                                     Iovecs_Address (Iovec_Pool);
-               Old_Array : Iovec_Array (1 .. Iovec_Pool.Length);
-               for Old_Array'Address use Old_Array_Address;
-               pragma Import (Ada, Old_Array);
-            begin
-               New_Array (1 .. Iovec_Pool.Last) := Old_Array (Old_Array'Range);
+         Iovec_Pool.Last := New_Last;
+         Iovec_Pool.Last_Chunk := A_Chunk;

-               if Is_Dynamic (Iovec_Pool) then
-                  Free (Iovec_Pool.Dynamic_Array);
-               end if;
+         declare
+            Pool_Iovecs_Address : constant System.Address :=
+                                    Iovecs_Address (Iovec_Pool);
+            Pool_Iovecs : Iovec_Array (1 .. Iovec_Pool.Length);
+            for Pool_Iovecs'Address use Pool_Iovecs_Address;
+            pragma Import (Ada, Pool_Iovecs);
+         begin
+            Pool_Iovecs (Iovec_Pool.Last) := An_Iovec;
+         end;
+      end Append;

-               Iovec_Pool.Dynamic_Array := New_Array;
-               Iovec_Pool.Length := New_Array'Length;
-            end;
-         end if;
-      end Extend;
-
       ----------
       -- Dump --
       ----------
@@ -900,77 +785,56 @@ package body PolyORB.Buffers is
          end loop;
       end Dump;

-      -------------------------------------------
-      -- Visible subprograms (implementations) --
-      -------------------------------------------
+      ----------
+      -- Dump --
+      ----------

-      ------------------
-      -- Prepend_Pool --
-      ------------------
-
-      procedure Prepend_Pool
-        (Prefix     : Iovec_Pool_Type;
-         Iovec_Pool : in out Iovec_Pool_Type)
+      procedure Dump
+        (Iovec_Pool : Iovec_Pool_Type;
+         Into       : Opaque_Pointer)
       is
-         New_Last : constant Natural := Iovec_Pool.Last + Prefix.Last;
-
+         Vecs_Address : constant System.Address := Iovecs_Address (Iovec_Pool);
+         Vecs : Iovec_Array (1 .. Iovec_Pool.Last);
+         for Vecs'Address use Vecs_Address;
+         pragma Import (Ada, Vecs);
       begin
-         Extend (Iovec_Pool, New_Last, New_Last + 1);
-         --  An Iovec pool that has been prefixed will likely not be appended
-         --  to anymore.
+         Dump (Vecs, Into);
+      end Dump;

-         declare
-            Prefix_Iovecs_Address : constant System.Address :=
-                                      Iovecs_Address (Prefix);
-            Prefix_Iovecs : Iovec_Array (1 .. Prefix.Length);
-            for Prefix_Iovecs'Address use Prefix_Iovecs_Address;
-            pragma Import (Ada, Prefix_Iovecs);
-
-            Pool_Iovecs_Address : constant System.Address
-              := Iovecs_Address (Iovec_Pool);
-            Pool_Iovecs : Iovec_Array (1 .. Iovec_Pool.Length);
-            for Pool_Iovecs'Address use Pool_Iovecs_Address;
-            pragma Import (Ada, Pool_Iovecs);
-
-         begin
-            --  Append new Iovec
-
-            Pool_Iovecs (1 .. New_Last) :=
-              Prefix_Iovecs (Prefix_Iovecs'Range)
-                & Pool_Iovecs (1 .. Iovec_Pool.Last);
-            Iovec_Pool.Last := New_Last;
-         end;
-      end Prepend_Pool;
-
       ------------
-      -- Append --
+      -- Extend --
       ------------

-      procedure Append
+      procedure Extend
         (Iovec_Pool : in out Iovec_Pool_Type;
-         An_Iovec   : Iovec;
-         A_Chunk    : Buffer_Chunk_Pools.Chunk_Access := null)
-      is
-         New_Last : constant Natural := Iovec_Pool.Last + 1;
+         Require    :        Natural;
+         Allocate   :        Natural) is
       begin
-         Extend (Iovec_Pool, New_Last, 2 * Iovec_Pool.Length);
+         pragma Assert (Allocate >= Require);

-         --  Append new Iovec
+         if Require > Iovec_Pool.Length then
+            declare
+               New_Array : constant Iovec_Array_Access :=
+                             new Iovec_Array (1 .. Allocate);

-         Iovec_Pool.Last := New_Last;
-         Iovec_Pool.Last_Chunk := A_Chunk;
+               Old_Array_Address : constant System.Address :=
+                                     Iovecs_Address (Iovec_Pool);
+               Old_Array : Iovec_Array (1 .. Iovec_Pool.Length);
+               for Old_Array'Address use Old_Array_Address;
+               pragma Import (Ada, Old_Array);
+            begin
+               New_Array (1 .. Iovec_Pool.Last) := Old_Array (Old_Array'Range);

-         declare
-            Pool_Iovecs_Address : constant System.Address :=
-                                    Iovecs_Address (Iovec_Pool);
-            Pool_Iovecs : Iovec_Array (1 .. Iovec_Pool.Length);
-            for Pool_Iovecs'Address use Pool_Iovecs_Address;
-            pragma Import (Ada, Pool_Iovecs);
-         begin
-            Pool_Iovecs (Iovec_Pool.Last) := An_Iovec;
-         end;
-      end Append;
+               if Is_Dynamic (Iovec_Pool) then
+                  Free (Iovec_Pool.Dynamic_Array);
+               end if;

+               Iovec_Pool.Dynamic_Array := New_Array;
+               Iovec_Pool.Length := New_Array'Length;
+            end;
+         end if;
+      end Extend;
+
       ------------------
       -- Extract_Data --
       ------------------
@@ -1028,6 +892,122 @@ package body PolyORB.Buffers is
          end if;
       end Extract_Data;

+      -----------------
+      -- Grow_Shrink --
+      -----------------
+
+      procedure Grow_Shrink
+        (Iovec_Pool   : access Iovec_Pool_Type;
+         Size         : Stream_Element_Offset;
+         Data         : out Opaque_Pointer)
+      is
+
+         function First_Address_After (An_Iovec : Iovec) return Opaque_Pointer;
+         pragma Inline (First_Address_After);
+         --  Return the address of the storage element immediately following
+         --  the last element of An_Iovec.
+
+         procedure Do_Grow
+           (Last_Iovec : in out Iovec;
+            Last_Chunk : Chunk_Access);
+         pragma Inline (Do_Grow);
+         --  ??? comment needed
+
+         -------------
+         -- Do_Grow --
+         -------------
+
+         procedure Do_Grow
+           (Last_Iovec : in out Iovec;
+            Last_Chunk : Chunk_Access)
+         is
+         begin
+            if Last_Chunk /= null then
+               declare
+                  Chunk_Metadata : constant Chunk_Metadata_Access
+                    := Metadata (Last_Chunk);
+               begin
+                  if False
+                    or else (Size > 0
+                             and then Chunk_Metadata.Last_Used + Size
+                               <= Last_Chunk.Size)
+                    or else (Size < 0
+                             and then Chunk_Metadata.Last_Used + Size >= 0
+                             and then Last_Iovec.Iov_Len
+                               + Storage_Offset (Size) >= 0)
+                  then
+                     Chunk_Metadata.Last_Used
+                       := Chunk_Metadata.Last_Used + Size;
+                     Data := First_Address_After (Last_Iovec);
+                     Last_Iovec.Iov_Len := Last_Iovec.Iov_Len
+                       + Storage_Offset (Size);
+                  else
+                     --  Cannot grow last chunk: leave Data unchanged.
+
+                     pragma Debug
+                       (C, O ("Cannot satisfy growth request of size"
+                           & Stream_Element_Offset'Image (Size)));
+                     null;
+                  end if;
+               end;
+            end if;
+         end Do_Grow;
+
+         -------------------------
+         -- First_Address_After --
+         -------------------------
+
+         function First_Address_After
+           (An_Iovec : Iovec) return Opaque_Pointer
+         is
+         begin
+            return An_Iovec.Iov_Base + An_Iovec.Iov_Len;
+         end First_Address_After;
+
+      --  Start of processing for Grow_Shrink
+
+      begin
+         Data := System.Null_Address;
+
+         if Iovec_Pool.Last = 0 then
+            --  Empty Iovec pool.
+
+            return;
+         end if;
+
+         if Iovec_Pool.Last <= Iovec_Pool.Prealloc_Array'Last then
+            Do_Grow (Iovec_Pool.Prealloc_Array (Iovec_Pool.Last),
+                     Iovec_Pool.Last_Chunk);
+         else
+            Do_Grow (Iovec_Pool.Dynamic_Array (Iovec_Pool.Last),
+                     Iovec_Pool.Last_Chunk);
+         end if;
+      end Grow_Shrink;
+
+      --------------------
+      -- Iovecs_Address --
+      --------------------
+
+      function Iovecs_Address
+        (Iovec_Pool : Iovec_Pool_Type) return System.Address
+      is
+      begin
+         if Is_Dynamic (Iovec_Pool) then
+            return Iovec_Pool.Dynamic_Array (1)'Address;
+         else
+            return Iovec_Pool.Prealloc_Array (1)'Address;
+         end if;
+      end Iovecs_Address;
+
+      ----------------
+      -- Is_Dynamic --
+      ----------------
+
+      function Is_Dynamic (Iovec_Pool : Iovec_Pool_Type) return Boolean is
+      begin
+         return Iovec_Pool.Dynamic_Array /= null;
+      end Is_Dynamic;
+
       ----------
       -- Peek --
       ----------
@@ -1067,6 +1047,44 @@ package body PolyORB.Buffers is
          raise Constraint_Error;
       end Peek;

+      ------------------
+      -- Prepend_Pool --
+      ------------------
+
+      procedure Prepend_Pool
+        (Prefix     : Iovec_Pool_Type;
+         Iovec_Pool : in out Iovec_Pool_Type)
+      is
+         New_Last : constant Natural := Iovec_Pool.Last + Prefix.Last;
+
+      begin
+         Extend (Iovec_Pool, New_Last, New_Last + 1);
+         --  An Iovec pool that has been prefixed will likely not be appended
+         --  to anymore.
+
+         declare
+            Prefix_Iovecs_Address : constant System.Address :=
+                                      Iovecs_Address (Prefix);
+            Prefix_Iovecs : Iovec_Array (1 .. Prefix.Length);
+            for Prefix_Iovecs'Address use Prefix_Iovecs_Address;
+            pragma Import (Ada, Prefix_Iovecs);
+
+            Pool_Iovecs_Address : constant System.Address
+              := Iovecs_Address (Iovec_Pool);
+            Pool_Iovecs : Iovec_Array (1 .. Iovec_Pool.Length);
+            for Pool_Iovecs'Address use Pool_Iovecs_Address;
+            pragma Import (Ada, Pool_Iovecs);
+
+         begin
+            --  Append new Iovec
+
+            Pool_Iovecs (1 .. New_Last) :=
+              Prefix_Iovecs (Prefix_Iovecs'Range)
+                & Pool_Iovecs (1 .. Iovec_Pool.Last);
+            Iovec_Pool.Last := New_Last;
+         end;
+      end Prepend_Pool;
+
       -------------
       -- Release --
       -------------
@@ -1126,22 +1144,6 @@ package body PolyORB.Buffers is
          end loop;
       end Send_Iovec_Pool;

-      ----------
-      -- Dump --
-      ----------
-
-      procedure Dump
-        (Iovec_Pool : Iovec_Pool_Type;
-         Into       : Opaque_Pointer)
-      is
-         Vecs_Address : constant System.Address := Iovecs_Address (Iovec_Pool);
-         Vecs : Iovec_Array (1 .. Iovec_Pool.Last);
-         for Vecs'Address use Vecs_Address;
-         pragma Import (Ada, Vecs);
-      begin
-         Dump (Vecs, Into);
-      end Dump;
-
    end Iovec_Pools;

 end PolyORB.Buffers;
============================================================
--- src/polyorb-buffers.ads	11916cf4cd3bbf85ac3f1cec3e3258b3f55cc4e6
+++ src/polyorb-buffers.ads	1b8ebc7a25c8705634e689afd1b7c259a13e643b
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -35,6 +35,7 @@ with Ada.Streams;
 --  Note: Buffers should only be read/written sequentially.

 with Ada.Streams;
+with Ada.Unchecked_Conversion;

 with System.Storage_Elements;

@@ -49,8 +50,21 @@ package PolyORB.Buffers is
    -------------------------

    type Endianness_Type is (Little_Endian, Big_Endian);
-   subtype Alignment_Type is Ada.Streams.Stream_Element_Offset range 1 .. 8;
+   --  Endianness of a buffer

+   type Alignment_Type is (Align_1, Align_2, Align_4, Align_8);
+   for Alignment_Type use
+     (Align_1 => 1,
+      Align_2 => 2,
+      Align_4 => 4,
+      Align_8 => 8);
+   for Alignment_Type'Size use Short_Short_Integer'Size;
+   --  Alignment of a piece of data within a buffer
+   --  It is assumed that <n> = 2 ** Align_<n>'Pos = representation(Align_<n>)
+
+   function Alignment_Of is
+     new Ada.Unchecked_Conversion (Short_Short_Integer, Alignment_Type);
+
    Host_Order : constant Endianness_Type;
    --  The byte order of this host.

@@ -64,7 +78,7 @@ package PolyORB.Buffers is
    ------------------------

    function Length
-     (Buffer : access Buffer_Type) return Ada.Streams.Stream_Element_Count;
+     (Buffer : Buffer_Type) return Ada.Streams.Stream_Element_Count;
    pragma Inline (Length);
    --  Return the length of Buffer

@@ -133,8 +147,7 @@ package PolyORB.Buffers is
    --  On return, A_Buffer is set to null.

    function To_Stream_Element_Array
-     (Buffer   : access Buffer_Type)
-     return Ada.Streams.Stream_Element_Array;
+     (Buffer : Buffer_Type) return Ada.Streams.Stream_Element_Array;
    --  Dump the contents of Buffer into a Stream_Element_Array.
    --  Beware of overflowing the stack when using this function.

@@ -174,7 +187,7 @@ package PolyORB.Buffers is

    procedure Align_Position
      (Buffer    : access Buffer_Type;
-      Alignment :        Alignment_Type);
+      Alignment : Alignment_Type);
    --  Aligns Buffer on specified Alignment before retrieving aligned data

    --  After execution of either of the two above operations, the current CDR
============================================================
--- src/polyorb-exceptions.adb	f8d2de11d4615d84e490265229949ca430326d08
+++ src/polyorb-exceptions.adb	90bb51d2a7ccd0f01ef210908cb23ef82c4373f1
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -155,7 +155,7 @@ package body PolyORB.Exceptions is
    begin
       O ("Dump_All_Occurrences:");

-      if Exc_Occ_List = Empty then
+      if Is_Empty (Exc_Occ_List) then
          O ("No stored exceptions.");
          return;
       end if;
============================================================
--- src/polyorb-filters-slicers.adb	52e433b1d7392ce6c4ce15c251a6b43d7aea8659
+++ src/polyorb-filters-slicers.adb	8155f53087fa23e99ffec5dc26542c1826c58d72
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -90,7 +90,7 @@ package body PolyORB.Filters.Slicers is
             F.Data_Expected := DEM.Max;
             F.Initial_Data_Expected := DEM.Max;
             F.In_Buf := DEM.In_Buf;
-            F.Buffer_Length := Length (F.In_Buf);
+            F.Buffer_Length := Length (F.In_Buf.all);

             return Emit
               (F.Lower,
@@ -115,12 +115,12 @@ package body PolyORB.Filters.Slicers is
             end if;

             pragma Assert
-              (Data_Received = Length (F.In_Buf) - F.Buffer_Length);
+              (Data_Received = Length (F.In_Buf.all) - F.Buffer_Length);
             --  Integrity check: Receive_Buffer must have increased
             --  Length (F.In_Buf) by exactly the amount of data received.

             F.Data_Expected := F.Data_Expected - Data_Received;
-            F.Buffer_Length := Length (F.In_Buf);
+            F.Buffer_Length := Length (F.In_Buf.all);

             if F.Data_Expected = 0 then
                declare
============================================================
--- src/polyorb-if_descriptors.ads	0cef5e8b1268b6c299d0ba1658baf3067ac8e5a2
+++ src/polyorb-if_descriptors.ads	661166cb263715f320bc96025a8eee327938f480
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2002 Free Software Foundation, Inc.             --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,12 +16,12 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
---                PolyORB is maintained by ACT Europe.                      --
---                    (email: sales@act-europe.fr)                          --
+--                  PolyORB is maintained by AdaCore                        --
+--                     (email: sales@adacore.com)                           --
 --                                                                          --
 ------------------------------------------------------------------------------

@@ -35,7 +35,7 @@ package PolyORB.If_Descriptors is

 package PolyORB.If_Descriptors is

-   type If_Descriptor is abstract new Smart_Pointers.Entity
+   type If_Descriptor is abstract new Smart_Pointers.Non_Controlled_Entity
      with private;
    type If_Descriptor_Access is access all If_Descriptor'Class;

@@ -58,7 +58,7 @@ private

 private

-   type If_Descriptor is abstract new Smart_Pointers.Entity
+   type If_Descriptor is abstract new Smart_Pointers.Non_Controlled_Entity
      with null record;

 end PolyORB.If_Descriptors;
============================================================
--- src/polyorb-jobs.adb	f0697ad1b8affcbf53bef6b435a6955a84f3952a
+++ src/polyorb-jobs.adb	1dce24e40213573ef364c6467a2c67839b3e324b
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -86,7 +86,7 @@ package body PolyORB.Jobs is
    is
       use type Job_Queues.List;
    begin
-      return Q.Contents = Job_Queues.Empty;
+      return Job_Queues.Is_Empty (Q.Contents);
    end Is_Empty;

    ---------------
============================================================
--- src/polyorb-minimal_servant.ads	471788336df2a4fb10b2178852cb392718a154ef
+++ src/polyorb-minimal_servant.ads	70ea2db2756739d89e673e6ec54b6c3bec4ed874
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2002-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -40,13 +40,14 @@ with PolyORB.Smart_Pointers;
 with PolyORB.Components;
 with PolyORB.Servants;
 with PolyORB.Smart_Pointers;
+with PolyORB.Smart_Pointers.Controlled_Entities;
 with PolyORB.Requests;

 package PolyORB.Minimal_Servant is

    pragma Elaborate_Body;

-   type Servant is abstract new PolyORB.Smart_Pointers.Entity
+   type Servant is abstract new Smart_Pointers.Controlled_Entities.Entity
      with private;

    type Servant_Acc is access all Servant;
@@ -72,7 +73,8 @@ private
      (Self : not null access Implementation;
       Msg  : Components.Message'Class) return Components.Message'Class;

-   type Servant is abstract new PolyORB.Smart_Pointers.Entity with record
+   type Servant is abstract new Smart_Pointers.Controlled_Entities.Entity
+   with record
       Neutral_View : aliased Implementation (Servant'Access);
       --  The PolyORB (personality-neutral) view of this servant.
       --  This instance of the multiple views idiom allows the
============================================================
--- src/polyorb-opaque-chunk_pools.adb	e192a5d0143eaa35a83187111175b88350421734
+++ src/polyorb-opaque-chunk_pools.adb	70261eaec2aee40c52b3c7e7634dba38401d035a
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -62,10 +62,9 @@ package body PolyORB.Opaque.Chunk_Pools
       else
          New_Chunk := new Chunk (Size => Allocation_Size);
          New_Chunk.Metadata := Null_Metadata;
+         Append (Pool.Dynamic_Chunks, New_Chunk);
       end if;

-      Append (Pool.Chunks, New_Chunk);
-
       A_Chunk := New_Chunk;
    end Allocate;

@@ -79,38 +78,48 @@ package body PolyORB.Opaque.Chunk_Pools
       return A_Chunk.Data (A_Chunk.Data'First)'Address;
    end Chunk_Storage;

+   ----------
+   -- Link --
+   ----------
+
+   function Link
+     (C     : access Chunk;
+      Which : Utils.Ilists.Link_Type) return access Chunk_Access
+   is
+      use Utils.Ilists;
+   begin
+      pragma Assert (Which = Next);
+      return C.Next'Unchecked_Access;
+   end Link;
+
+   --------------
+   -- Metadata --
+   --------------
+
+   function Metadata
+     (A_Chunk : Chunk_Access) return Metadata_Access is
+   begin
+      return A_Chunk.Metadata'Access;
+   end Metadata;
+
    -------------
    -- Release --
    -------------

    procedure Release (Pool : access Pool_Type) is
       procedure Free is new Ada.Unchecked_Deallocation (Chunk, Chunk_Access);
-      It : Chunk_Lists.Iterator := First (Pool.Chunks);
+      It : Chunk_Lists.Iterator := First (Pool.Dynamic_Chunks);
    begin
       while not Last (It) loop
          declare
             use type System.Address;
-            This : Chunk_Access renames Value (It).all;
+            This : Chunk_Access := Value (It);
          begin
-            if This.all'Address /= Pool.Prealloc'Address then
-               Free (This);
-            end if;
+            Remove (Pool.Dynamic_Chunks, It);
+            Free (This);
          end;
-         Next (It);
       end loop;
-
-      Deallocate (Pool.Chunks);
       Pool.Prealloc_Used := False;
    end Release;

-   --------------
-   -- Metadata --
-   --------------
-
-   function Metadata
-     (A_Chunk : Chunk_Access) return Metadata_Access is
-   begin
-      return A_Chunk.Metadata'Access;
-   end Metadata;
-
 end PolyORB.Opaque.Chunk_Pools;
============================================================
--- src/polyorb-opaque-chunk_pools.ads	19d09d4d795d8e83a12682a9aa30e32d62663d57
+++ src/polyorb-opaque-chunk_pools.ads	a4f3ca205b2d723e8fc53876da9e538ef2d81dbb
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -27,15 +27,15 @@

 --  Pools of memory chunks, with associated client metadata.

-with PolyORB.Utils.Chained_Lists;
+pragma Ada_2005;

-generic
+with PolyORB.Utils.Ilists;

+generic
    type Chunk_Metadata is private;
    --  The metadata associated with each storage chunk.

    Null_Metadata : Chunk_Metadata;
-
 package PolyORB.Opaque.Chunk_Pools is

    pragma Preelaborate;
@@ -65,14 +65,11 @@ package PolyORB.Opaque.Chunk_Pools is
      (A_Chunk : Chunk_Access) return Opaque.Opaque_Pointer;
    --  Return a pointer to a chunk's storage space.

-   procedure Release
-     (Pool : access Pool_Type);
+   procedure Release (Pool : access Pool_Type);
    --  Signals that Pool will not be used anymore.
    --  The associated storage is returned to the system.

-   function Metadata
-     (A_Chunk : Chunk_Access)
-     return Metadata_Access;
+   function Metadata (A_Chunk : Chunk_Access) return Metadata_Access;
    --  Returns an access to the metadata associated
    --  with A_Chunk by the client of the Chunk_Pool
    --  package.
@@ -84,26 +81,37 @@ private
    --  A chunk pool is managed as a linked list
    --  of chunks.

-   type Chunk (Size : Ada.Streams.Stream_Element_Count) is
-     tagged limited record
-        Metadata : aliased Chunk_Metadata;
-         --  Metadata associated by a client to this chunk.
+   type Chunk (Size : Ada.Streams.Stream_Element_Count) is limited record
+      Next     : aliased Chunk_Access;
+      --  Used to link Chunk on pool's dynamic chunks list

-        Data     : aliased Ada.Streams.Stream_Element_Array (1 .. Size);
-         --  The storage space of the chunk.
-     end record;
+      Metadata : aliased Chunk_Metadata;
+      --  Metadata associated by a client to this chunk.

-   package Chunk_Lists is new Utils.Chained_Lists (Chunk_Access);
+      Data     : aliased Ada.Streams.Stream_Element_Array (1 .. Size);
+      --  The storage space of the chunk.
+   end record;

+   function Link
+     (C     : access Chunk;
+      Which : Utils.Ilists.Link_Type) return access Chunk_Access;
+   pragma Inline (Link);
+   --  Accessor for Next
+
+   package Chunk_Lists is new Utils.Ilists.Lists
+     (T             => Chunk,
+      T_Acc         => Chunk_Access,
+      Doubly_Linked => False);
+
    type Pool_Type is limited record
       Prealloc : aliased Chunk (Default_Chunk_Size);
-      --  A pre-allocated chunk.
+      --  A pre-allocated chunk

       Prealloc_Used : Boolean := False;
-      --  The pre-allocated chunk has been used.
+      --  The pre-allocated chunk has been used

-      Chunks   : Chunk_Lists.List;
-      --  The list of all dynamically allocated chunks in this pool.
+      Dynamic_Chunks   : Chunk_Lists.List;
+      --  The list of all dynamically allocated chunks in this pool
    end record;

 end PolyORB.Opaque.Chunk_Pools;
============================================================
--- src/polyorb-orb.adb	38549bf735dccbffb71e5c8d6a9a5da27f217dcc
+++ src/polyorb-orb.adb	31cea568c888e0588e64562740702d4a72381d1a
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -139,7 +139,7 @@ package body PolyORB.ORB is
       Pro : Binding_Data.Profile_Access;
       QoS : PolyORB.QoS.QoS_Parameters) return Smart_Pointers.Ref
    is
-      use BO_Lists;
+      use PBOL;

       It     : Iterator;
       Result : Smart_Pointers.Ref;
@@ -160,18 +160,13 @@ package body PolyORB.ORB is
       while not Last (It) loop

          declare
-            BO_Acc : Binding_Object_Access renames Value (It).all;
-            End_Iterator : BO_Lists.Iterator;
+            BO_Acc : Binding_Object_Access renames Value (It);
          begin
             if not Valid (BO_Acc) then

-               --  Mark binding object as not referenced anymore
+               --  Mark binding object as not referenced anymore and purge

-               Register_Reference_Information
-                 (BO_Acc, Component_Access (ORB), End_Iterator);
-
-               --  Now we can safely purge it from the list
-
+               Set_Referenced (BO_Acc, Referenced => False);
                Remove (ORB.Binding_Objects, It);

             elsif Get_Profile (BO_Acc) /= null then
@@ -646,40 +641,24 @@ package body PolyORB.ORB is
       declare
          BO_Acc : constant Binding_Object_Access :=
                     Binding_Object_Access (Smart_Pointers.Entity_Of (BO));
-         It     : BO_Lists.Iterator;
-
       begin
          Enter_ORB_Critical_Section (ORB.ORB_Controller);

          --  Register BO in the Binding_Objects list of ORB

-         BO_Lists.Prepend (ORB.Binding_Objects, BO_Acc);
+         PBOL.Prepend (ORB.Binding_Objects, BO_Acc);
+         Set_Referenced (BO_Acc, Referenced => True);

-         --  Save the position
+         Leave_ORB_Critical_Section (ORB.ORB_Controller);

-         It := BO_Lists.First (ORB.Binding_Objects);
-
-         --  Record in BO a reference to its position on the list so that it
-         --  can remove itself properly at finalization.
-
-         Register_Reference_Information
-                                 (BO => BO_Acc,
-                                  Referenced_In => Component_Access (ORB),
-                                  Referenced_At => It);
-
-         Leave_ORB_Critical_Section (ORB.ORB_Controller);
+         Emit_No_Reply
+           (Component_Access (TE),
+            Filters.Iface.Set_Server'
+              (Server         => Component_Access (ORB),
+               Binding_Object => BO_Acc));
       end;

-      Emit_No_Reply
-        (Component_Access (TE),
-         Filters.Iface.Set_Server'
-         (Server         => Component_Access (ORB),
-          Binding_Object =>
-            Binding_Objects.Binding_Object_Access
-          (Smart_Pointers.Entity_Of (BO))));
-
       if New_AES /= null then
-
          --  This is not a write only Endpoint

          declare
@@ -687,7 +666,6 @@ package body PolyORB.ORB is
                      Handler (New_AES.all);
             TE_H : TE_AES_Event_Handler renames TE_AES_Event_Handler (H.all);
          begin
-
             --  Register link from AES to TE

             H.AES    := New_AES;
@@ -725,25 +703,20 @@ package body PolyORB.ORB is
    -------------------------------

    procedure Unregister_Binding_Object
-     (ORB : Components.Component_Access;
+     (ORB : access ORB_Type;
       BO  : Binding_Object_Access)
    is
       ORB_Acc : constant ORB_Access := ORB_Access (ORB);
-      It      : BO_Lists.Iterator;
    begin
       pragma Debug (C, O ("Unregister_Binding_Object: enter"));
       Enter_ORB_Critical_Section (ORB_Acc.ORB_Controller);

-      --  Obtain position of BO in Binding_Objects within critical section,
-      --  as it might be changed by Find_Reusable_Binding_Object.
-
-      It := Get_Referenced_At (BO);
-
       --  If BO is still referenced, remove it now

-      if not BO_Lists.Last (It) then
+      if Referenced (BO) then
          pragma Debug (C, O ("removing binding object"));
-         BO_Lists.Remove (ORB_Acc.Binding_Objects, It);
+         Set_Referenced (BO, Referenced => False);
+         PBOL.Remove_Element (ORB_Acc.Binding_Objects, BO);
       end if;

       Leave_ORB_Critical_Section (ORB_Acc.ORB_Controller);
@@ -762,10 +735,8 @@ package body PolyORB.ORB is

    begin
       Enter_ORB_Critical_Section (ORB.ORB_Controller);
-
       pragma Assert (ORB.Obj_Adapter = null);
       ORB.Obj_Adapter := OA;
-
       Leave_ORB_Critical_Section (ORB.ORB_Controller);
    end Set_Object_Adapter;

@@ -809,9 +780,9 @@ package body PolyORB.ORB is
             --  Try to register the source to an existing monitor

             Disable_Polling (ORB.ORB_Controller, Monitors (J));
-
             Register_Source (Monitors (J), AES, Success);
             Enable_Polling (ORB.ORB_Controller, Monitors (J));
+
             if Success then
                Notify_Event (ORB.ORB_Controller,
                              Event'(Kind           => Event_Sources_Added,
@@ -915,7 +886,6 @@ package body PolyORB.ORB is
       when E : others =>
          pragma Debug (C, O ("Run: Got exception "
                           & Ada.Exceptions.Exception_Information (E)));
-
          Free (AJ);
          raise;
    end Run;
@@ -980,7 +950,6 @@ package body PolyORB.ORB is
             use PolyORB.Errors;

             Error : Error_Container;
-
          begin
             References.Binding.Bind
               (Req.Target,
@@ -1283,10 +1252,10 @@ package body PolyORB.ORB is
    function Get_Binding_Objects (ORB : access ORB_Type)
      return BO_Ref_List
    is
-      use BO_Lists;
+      use PBOL;
       use Smart_Pointers;

-      It : BO_Lists.Iterator;
+      It : PBOL.Iterator;
       Result : BO_Ref_List;
    begin
       Enter_ORB_Critical_Section (ORB.ORB_Controller);
@@ -1298,7 +1267,7 @@ package body PolyORB.ORB is
          declare
             Ref : Smart_Pointers.Ref;
          begin
-            Smart_Pointers.Set (Ref, Entity_Ptr (Value (It).all));
+            Smart_Pointers.Set (Ref, Entity_Ptr (Value (It)));
             BO_Ref_Lists.Prepend (Result, Ref);
          end;

============================================================
--- src/polyorb-orb.ads	5a5f09d08b9fae81db8d56a85367fb1859f328db
+++ src/polyorb-orb.ads	90b4dfe13639558e244d2467e77c19faa20376cf
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -34,6 +34,7 @@ with PolyORB.Binding_Objects;
 with PolyORB.Asynch_Ev;
 with PolyORB.Binding_Data;
 with PolyORB.Binding_Objects;
+with PolyORB.Binding_Objects.Lists;
 with PolyORB.Components;
 with PolyORB.Filters;
 with PolyORB.Jobs;
@@ -51,15 +52,16 @@ package PolyORB.ORB is

 package PolyORB.ORB is

-   package PAE renames PolyORB.Asynch_Ev;
-   package PBD renames PolyORB.Binding_Data;
-   package PBO renames PolyORB.Binding_Objects;
-   package PC  renames PolyORB.Components;
-   package PF  renames PolyORB.Filters;
-   package PJ  renames PolyORB.Jobs;
-   package POC renames PolyORB.ORB_Controller;
-   package PT  renames PolyORB.Transport;
-   package PTI renames PolyORB.Task_Info;
+   package PAE  renames PolyORB.Asynch_Ev;
+   package PBD  renames PolyORB.Binding_Data;
+   package PBO  renames PolyORB.Binding_Objects;
+   package PBOL renames PolyORB.Binding_Objects.Lists;
+   package PC   renames PolyORB.Components;
+   package PF   renames PolyORB.Filters;
+   package PJ   renames PolyORB.Jobs;
+   package POC  renames PolyORB.ORB_Controller;
+   package PT   renames PolyORB.Transport;
+   package PTI  renames PolyORB.Task_Info;

    ----------------------------------
    -- Abstract tasking policy type --
@@ -234,7 +236,7 @@ package PolyORB.ORB is
    --  A filter chain is instantiated using Chain, and associated with TE.

    procedure Unregister_Binding_Object
-     (ORB : Components.Component_Access;
+     (ORB : access ORB_Type;
       BO  : Binding_Objects.Binding_Object_Access);
    --  Unregister a Binding Object from the ORB

@@ -312,7 +314,7 @@ private
       Transport_Access_Points : TAP_List;
       --  The set of transport access points managed by this ORB

-      Binding_Objects : PBO.BO_List;
+      Binding_Objects : PBOL.List;
       --  The set of binding objects managed by this ORB

       Obj_Adapter : Obj_Adapters.Obj_Adapter_Access;
============================================================
--- src/polyorb-poa_manager-basic_manager.adb	940803f7bb53121ccbcb29fcdf823c3e6002dfed
+++ src/polyorb-poa_manager-basic_manager.adb	e56aff07f963a6e027a5af5a60da3ac83c5f1c6e
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -233,7 +233,7 @@ package body PolyORB.POA_Manager.Basic_M
       pragma Debug (C, O ("Create a new Basic_POA_Manager"));

       Create (M.Lock);
-      pragma Assert (M.Held_Requests = Empty);
+      pragma Assert (Is_Empty (M.Held_Requests));
       M.Current_State := HOLDING;
    end Create;

@@ -373,7 +373,7 @@ package body PolyORB.POA_Manager.Basic_M

       Deallocate (Self.Managed_POAs);

-      while Self.Held_Requests /= Requests_Queues.Empty loop
+      while not Is_Empty (Self.Held_Requests) loop
          Extract_First (Self.Held_Requests, R);
          Destroy_Request (R);
       end loop;
============================================================
--- src/polyorb-poa_manager-basic_manager.ads	0b176448e4d191aba4e02ada3a87930c88ef20c5
+++ src/polyorb-poa_manager-basic_manager.ads	495d1b41846642501703b3499bdf8923f15c7169
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -129,7 +129,7 @@ private
       PM_Hold_Servant : Hold_Servant_Access := null;
       --  Reference to the holding servant

-      Held_Requests : Requests_Queue := Requests_Queues.Empty;
+      Held_Requests : Requests_Queue;
       --  List of requests held by the POAManager
    end record;

============================================================
--- src/polyorb-poa_manager.ads	ec3001c5983cae39e4a8a27947074ca89edc2487
+++ src/polyorb-poa_manager.ads	0edcbce66c9b8473930fb97977ceb221d5389d69
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2005 Free Software Foundation, Inc.           --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -16,8 +16,8 @@
 -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
 -- License  for more details.  You should have received  a copy of the GNU  --
 -- General Public License distributed with PolyORB; see file COPYING. If    --
--- not, write to the Free Software Foundation, 59 Temple Place - Suite 330, --
--- Boston, MA 02111-1307, USA.                                              --
+-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
+-- Floor, Boston, MA 02111-1301, USA.                                       --
 --                                                                          --
 --                                                                          --
 --                  PolyORB is maintained by AdaCore                        --
@@ -43,7 +43,8 @@ package PolyORB.POA_Manager is

    type Ref is new Smart_Pointers.Ref with private;

-   type POAManager is abstract new Smart_Pointers.Entity with private;
+   type POAManager is abstract new Smart_Pointers.Non_Controlled_Entity
+     with private;

    type POAManager_Access is access all POAManager'Class;

@@ -102,6 +103,7 @@ private

    type Ref is new Smart_Pointers.Ref with null record;

-   type POAManager is abstract new Smart_Pointers.Entity with null record;
+   type POAManager is abstract new Smart_Pointers.Non_Controlled_Entity
+      with null record;

 end PolyORB.POA_Manager;
============================================================
--- src/polyorb-references-ior.adb	b6f075b931047ade3517564aa0cc5e3a11dd5931
+++ src/polyorb-references-ior.adb	afcb63f6a912e58bd8b3cc6df55a66cb9e7d41ce
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -210,7 +210,7 @@ package body PolyORB.References.IOR is
             PolyORB.Types.RepositoryId'
               (To_PolyORB_String (Type_Id_Of (Value))));

-         Pad_Align (Buffer, 4);
+         Pad_Align (Buffer, Align_4);

          declare
             Profs     : constant Profile_Array := Profiles_Of (Value);
============================================================
--- src/polyorb-references-uri.adb	7dad7b907947ed7bc935ca68bb9f95df1f8d9a47
+++ src/polyorb-references-uri.adb	fe956470c0137830c5614681388d2f088cdafec9
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -45,7 +45,7 @@ package body PolyORB.References.URI is

    type Profile_Record is record
       Tag                    : PolyORB.Binding_Data.Profile_Tag;
-      Proto_Ident            : Types.String;
+      Proto_Ident            : String_Ptr;
       Profile_To_String_Body : Profile_To_String_Body_Type;
       String_To_Profile_Body : String_To_Profile_Body_Type;
    end record;
@@ -165,6 +165,7 @@ package body PolyORB.References.URI is
      (Obj_Addr : String) return Binding_Data.Profile_Access
    is
       use PolyORB.Types;
+      use PolyORB.Utils;

       Iter : Iterator := First (Callbacks);
    begin
@@ -172,17 +173,12 @@ package body PolyORB.References.URI is
                        & Obj_Addr));

       while not Last (Iter) loop
-         declare
-            Ident : String renames To_String (Value (Iter).Proto_Ident);
-         begin
-            if Obj_Addr'Length > Ident'Length
-              and then Obj_Addr (Ident'Range) = Ident then
-               pragma Debug
-                 (C, O ("Try to unmarshall profile with profile factory tag "
-                     & Profile_Tag'Image (Value (Iter).Tag)));
-               return Value (Iter).String_To_Profile_Body (Obj_Addr);
-            end if;
-         end;
+         if Has_Prefix (Obj_Addr, Prefix => Value (Iter).Proto_Ident.all) then
+            pragma Debug
+              (C, O ("Try to unmarshall profile with profile factory tag "
+                  & Profile_Tag'Image (Value (Iter).Tag)));
+            return Value (Iter).String_To_Profile_Body (Obj_Addr);
+         end if;

          Next (Iter);
       end loop;
@@ -282,9 +278,11 @@ package body PolyORB.References.URI is
       Profile_To_String_Body : Profile_To_String_Body_Type;
       String_To_Profile_Body : String_To_Profile_Body_Type) is
    begin
+      pragma Debug (C, O ("Register URI cb: prefix=" & Proto_Ident
+                            & " tag=" & Tag'Img));
       Append (Callbacks,
               Profile_Record'(Tag,
-                              Types.To_PolyORB_String (Proto_Ident),
+                              new String'(Proto_Ident),
                               Profile_To_String_Body,
                               String_To_Profile_Body));
    end Register;
@@ -311,8 +309,7 @@ package body PolyORB.References.URI is
    begin
       while not Last (Iter) loop
          Register_String_To_Object
-           (PolyORB.Types.To_String (Value (Iter).Proto_Ident),
-            String_To_Object'Access);
+           (Value (Iter).Proto_Ident.all, String_To_Object'Access);
          Next (Iter);
       end loop;
    end Initialize;
============================================================
--- src/polyorb-references.ads	8a58554d26800bf6018f8b1344eda091ce400cb7
+++ src/polyorb-references.ads	a94899add6bdf8fd2d9b5baece4c4d9363ca1520
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -141,6 +141,7 @@ private
    procedure Share_Binding_Info
      (Dest   : Ref'Class;
       Source : Ref'Class);
+   --  Needs comment???

    Nil_Ref : constant Ref := (PolyORB.Smart_Pointers.Ref with null record);

============================================================
--- src/polyorb-representations-cdr-common.adb	48e55eecf86e8a6a03230e58bbcbeed493a550a0
+++ src/polyorb-representations-cdr-common.adb	3eb9f48d652ae8a93685e1722def5242a74aa290
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -53,7 +53,7 @@ package body PolyORB.Representations.CDR

    function Encapsulate (Buffer : access Buffer_Type) return Encapsulation  is
    begin
-      return Encapsulation'(To_Stream_Element_Array (Buffer));
+      return Encapsulation'(To_Stream_Element_Array (Buffer.all));
    end Encapsulate;

    -------------------------
@@ -182,12 +182,18 @@ package body PolyORB.Representations.CDR
    begin
       pragma Debug (C, O ("Marshall (Octet) : enter"));
       Align_Marshall_Copy (Buffer, (1 => Stream_Element
-                           (PolyORB.Types.Octet'(Data))), 1);
+                           (PolyORB.Types.Octet'(Data))), Align_1);
       pragma Debug (C, O ("Marshall (Octet) : end"));
    end Marshall;

    --  Transfer of elementary integer types

+   function Swapped (X : Types.Octet) return Types.Octet;
+   pragma Inline (Swapped);
+   --  Identity function!
+   package CDR_Octet is
+     new Align_Transfer_Elementary (T => PolyORB.Types.Octet);
+
    function Swapped is
      new GNAT.Byte_Swapping.Swapped2 (PolyORB.Types.Unsigned_Short);
    package CDR_Unsigned_Short is
@@ -565,8 +571,7 @@ package body PolyORB.Representations.CDR
    ------------------------------------

    function Unmarshall
-     (Buffer : access Buffer_Type)
-     return PolyORB.Types.Boolean
+     (Buffer : access Buffer_Type) return PolyORB.Types.Boolean
    is
    begin
       pragma Debug (C, O ("Unmarshall (Boolean) : enter & end"));
@@ -575,8 +580,7 @@ package body PolyORB.Representations.CDR
    end Unmarshall;

    function Unmarshall_Latin_1_Char
-     (Buffer : access Buffer_Type)
-     return PolyORB.Types.Char
+     (Buffer : access Buffer_Type) return PolyORB.Types.Char
    is
    begin
       pragma Debug (C, O ("Unmarshall (Char) : enter & end"));
@@ -586,13 +590,7 @@ package body PolyORB.Representations.CDR

    function Unmarshall
      (Buffer : access Buffer_Type) return PolyORB.Types.Octet
-   is
-      Result : Stream_Element_Array (1 .. 1);
-   begin
-      Align_Unmarshall_Copy (Buffer, 1, Result);
-      pragma Debug (C, O ("Unmarshall (Octet) : enter & end"));
-      return PolyORB.Types.Octet (Result (1));
-   end Unmarshall;
+     renames CDR_Octet.Unmarshall;

    function Unmarshall
      (Buffer : access Buffer_Type) return PolyORB.Types.Unsigned_Short
@@ -815,7 +813,7 @@ package body PolyORB.Representations.CDR
          Data   : F)
       is
       begin
-         Align_Marshall_Copy (Buffer, Fixed_To_Octets (Data), 1);
+         Align_Marshall_Copy (Buffer, Fixed_To_Octets (Data), Align_1);
       end Marshall;

       ----------------
@@ -883,4 +881,9 @@ package body PolyORB.Representations.CDR

    end Fixed_Point;

+   function Swapped (X : Types.Octet) return Types.Octet is
+   begin
+      return X;
+   end Swapped;
+
 end PolyORB.Representations.CDR.Common;
============================================================
--- src/polyorb-representations-cdr.adb	7633553de55e337f04a5dcc0b32aa7ed80d4a61f
+++ src/polyorb-representations-cdr.adb	7c492bb499c601870f0e050aa1551acc15df28ab
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -331,7 +331,8 @@ package body PolyORB.Representations.CDR
             end if;

             Aggregate_Data      := Unchecked_Get_V (ACC);
-            Aggregate_Alignment := Alignment_Type (El_Size);
+            Aggregate_Alignment :=
+              Alignment_Of (Short_Short_Integer (El_Size));
             Aggregate_Size      := Stream_Element_Count (El_Count * El_Size);

             pragma Debug (C, O ("Fast_Path_Get_Info:"
============================================================
--- src/polyorb-representations-test.adb	28e5b72ba24ed33e43f94feff17c6833c26763e4
+++ src/polyorb-representations-test.adb	ce7a8ed5546ad686587182e59da8daa938708614
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -65,7 +65,7 @@ package body PolyORB.Representations.Tes
    is
       A : Stream_Element_Array (1 .. 1);
    begin
-      Align_Unmarshall_Copy (B, 1, A);
+      Align_Unmarshall_Copy (B, Align_1, A);
       return Character'Val (A (1));
    end Unmarshall_Char;

@@ -91,8 +91,7 @@ package body PolyORB.Representations.Tes
       S : String (1 .. 1024);
       C : Character;
       Last : Integer := S'First - 1;
-      Max : constant Stream_Element_Count
-        := Length (B);
+      Max : constant Stream_Element_Count := Length (B.all);
    begin
       pragma Warnings (Off);
       pragma Unreferenced (R);
============================================================
--- src/polyorb-sequences-helper.adb	0c6c5ca8261a05797e4473929bb8b9798ca76248
+++ src/polyorb-sequences-helper.adb	568e67f2d6a154b213be7141f8a59d04f5c79c2e
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -191,23 +191,22 @@ package body PolyORB.Sequences.Helper is

    function To_Any (Item : Sequence) return Any.Any is
       pragma Assert (Initialized);
-      Result : Any.Any := Get_Empty_Any_Aggregate (Sequence_TC);
-
+      Result : Any.Any;
    begin
-      Add_Aggregate_Element
-        (Result, To_Any (Types.Unsigned_Long (Length (Item))));
-
-      for J in 1 .. Length (Item) loop
-         Add_Aggregate_Element (Result,
-           Element_To_Any
-             (Unchecked_Element_Of (Item'Unrestricted_Access, J).all));
-      end loop;
+      Set_Type (Result, Sequence_TC);
+      Set_Value
+        (Get_Container (Result).all,
+         new Sequence_Content'
+           (Any.Aggregate_Content with
+              V            => new Sequence'(Item),
+              Length_Cache => Unsigned_Long (Length (Item))),
+         Foreign => False);
       return Result;
    end To_Any;

-   ----------------------
-   -- Unchecked_Get_V  --
-   ----------------------
+   ---------------------
+   -- Unchecked_Get_V --
+   ---------------------

    function Unchecked_Get_V
      (ACC : not null access Sequence_Content) return System.Address
============================================================
--- src/polyorb-sequences-helper.ads	81879001c540180d35eab89b0f9f6d14d79ec926
+++ src/polyorb-sequences-helper.ads	c073ed608915f4376f399e8b3f43b3bb5a9af6d5
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2003-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2003-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -52,6 +52,7 @@ generic

    with function Element_From_Any (Item : PolyORB.Any.Any) return Element;
    with function Element_To_Any   (Item : Element) return PolyORB.Any.Any;
+   pragma Unreferenced (Element_To_Any);
    with function Element_Wrap (X : access Element)
      return PolyORB.Any.Content'Class;

============================================================
--- src/polyorb-servants-group_servants.adb	5264d5f908feab5a73078a495447b562d0ee2991
+++ src/polyorb-servants-group_servants.adb	d55fa9ec95d15c9f932a1a4155cf6c82ec690130
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2002-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2002-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -411,7 +411,7 @@ package body PolyORB.Servants.Group_Serv

    procedure Unregister
      (Self : access Group_Servant;
-      Ref  :        PolyORB.References.Ref)
+      Ref  : References.Ref)
    is
       use PolyORB.References;

@@ -422,7 +422,7 @@ package body PolyORB.Servants.Group_Serv

       Enter (Self.Group_Lock);

-      TPL.Remove (Self.Target_List, Ref);
+      TPL.Remove_Occurrences (Self.Target_List, Ref);
       pragma Debug (C, O ("Group size:" & TPL.Length (Self.Target_List)'Img));

       Leave (Self.Group_Lock);
============================================================
--- src/polyorb-smart_pointers-initialization.adb	d558c5f480a1242d4e18b47efe56d30afa37d08f
+++ src/polyorb-smart_pointers-initialization.adb	4d77d7353e67ed63fcde10ef4daa36ce35c98721
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2004-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2004-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -31,7 +31,6 @@ with PolyORB.Initialization;

 with PolyORB.Initialization;

-with PolyORB.Tasking.Mutexes;
 with PolyORB.Utils.Strings;

 package body PolyORB.Smart_Pointers.Initialization is
@@ -40,24 +39,24 @@ package body PolyORB.Smart_Pointers.Init
    -- Debugging hooks implementation --
    ------------------------------------

-   function Entity_External_Tag
-     (X : Unsafe_Entity'Class)
-      return String;
-   function Ref_External_Tag
-     (X : Ref'Class)
-      return String;
+   function Entity_External_Tag (X : Unsafe_Entity'Class) return String;
+   function Ref_External_Tag (X : Ref'Class) return String;
    --  Return the external representation of X'Tag.

-   function Entity_External_Tag
-     (X : Unsafe_Entity'Class)
-      return String is
+   -------------------------
+   -- Entity_External_Tag --
+   -------------------------
+
+   function Entity_External_Tag (X : Unsafe_Entity'Class) return String is
    begin
       return Ada.Tags.External_Tag (X'Tag);
    end Entity_External_Tag;

-   function Ref_External_Tag
-     (X : Ref'Class)
-      return String is
+   ----------------------
+   -- Ref_External_Tag --
+   ----------------------
+
+   function Ref_External_Tag (X : Ref'Class) return String is
    begin
       return Ada.Tags.External_Tag (X'Tag);
    end Ref_External_Tag;
@@ -67,13 +66,14 @@ package body PolyORB.Smart_Pointers.Init
    ----------------

    procedure Initialize;
+   --  Initialize Smart_Pointers module

    procedure Initialize is
    begin
-      Tasking.Mutexes.Create (Counter_Lock);
-      Smart_Pointers.Entity_External_Tag := Entity_External_Tag'Access;
-      Smart_Pointers.Ref_External_Tag    := Ref_External_Tag'Access;
-      Smart_Pointers.Default_Trace       := Get_Trace ("default");
+      Smart_Pointers.Initialize
+        (The_Entity_External_Tag => Entity_External_Tag'Access,
+         The_Ref_External_Tag    => Ref_External_Tag'Access,
+         The_Default_Trace       => Get_Trace ("default"));
    end Initialize;

    use PolyORB.Initialization;
============================================================
--- src/polyorb-smart_pointers.adb	3708a49832a6b36abcebe143d72dc127b80bfc15
+++ src/polyorb-smart_pointers.adb	5771db48ee89af79eda56325f590f17302e7ba72
@@ -29,6 +29,7 @@ with PolyORB.Parameters;

 with PolyORB.Log;
 with PolyORB.Parameters;
+with PolyORB.Tasking.Mutexes;

 package body PolyORB.Smart_Pointers is

@@ -41,6 +42,9 @@ package body PolyORB.Smart_Pointers is
    function C (Level : Log_Level := Debug) return Boolean
      renames L.Enabled;

+   Counter_Lock : Mutex_Access;
+   --  Global lock used to protect concurrent accesses to reference counters
+
    procedure Unchecked_Inc_Usage (Obj : Entity_Ptr);
    --  Internal procedure to increment Obj's usage counter. This must be
    --  called with the proper lock held.
@@ -53,6 +57,13 @@ package body PolyORB.Smart_Pointers is
       Obj        : Entity_Ptr);
    --  Produce debugging trace for the indicated event on Obj, if applicable

+   Entity_External_Tag : Entity_External_Tag_Hook := null;
+   Ref_External_Tag    : Ref_External_Tag_Hook := null;
+   --  Debugging hooks, set at initialization
+
+   Default_Trace : Boolean := True;
+   --  needs comment???
+
    ------------
    -- Adjust --
    ------------
@@ -90,7 +101,7 @@ package body PolyORB.Smart_Pointers is
       pragma Assert (Counter_Lock /= null);
       Entity_Lock (Obj.all);

-      pragma Debug (Trace_Event (Dec_Usage, Obj));
+      pragma Debug (C, Trace_Event (Dec_Usage, Obj));
       Obj.Counter := Obj.Counter - 1;

       if Obj.Counter = 0 then
@@ -102,7 +113,7 @@ package body PolyORB.Smart_Pointers is
          --  Releasing Obj lock at this stage is sufficient to ensure
          --  that only one task finalizes Obj.all and frees Obj.

-         if Obj.all not in Entity'Class then
+         if not Is_Controlled (Obj.all) then
             --  This entity is not controlled: finalize it ourselves

             Finalize (Obj.all);
@@ -193,15 +204,6 @@ package body PolyORB.Smart_Pointers is
    -- Finalize --
    --------------

-   procedure Finalize (X : in out Entity_Controller) is
-   begin
-      Finalize (X.E.all);
-   end Finalize;
-
-   --------------
-   -- Finalize --
-   --------------
-
    procedure Finalize (The_Ref : in out Ref) is

       function Return_Ref_External_Tag return String;
@@ -279,27 +281,26 @@ package body PolyORB.Smart_Pointers is
    ----------------

    procedure Initialize
-     (X : in out Entity_Controller) is
+     (The_Entity_External_Tag : Entity_External_Tag_Hook;
+      The_Ref_External_Tag    : Ref_External_Tag_Hook;
+      The_Default_Trace       : Boolean)
+   is
    begin
-      pragma Debug (C, O ("Initializing Entity"));
-      Initialize (X.E.all);
+      Create (Counter_Lock);
+      Entity_External_Tag := The_Entity_External_Tag;
+      Ref_External_Tag    := The_Ref_External_Tag;
+      Default_Trace       := The_Default_Trace;
    end Initialize;

-   ----------------
-   -- Initialize --
-   ----------------
+   -------------------
+   -- Is_Controlled --
+   -------------------

-   procedure Initialize
-     (X : in out Entity)
-   is
-      pragma Warnings (Off);
+   function Is_Controlled (X : Unsafe_Entity) return Boolean is
       pragma Unreferenced (X);
-      pragma Warnings (On);
-
    begin
-      pragma Assert (Counter_Lock /= null);
-      null;
-   end Initialize;
+      return False;
+   end Is_Controlled;

    ------------
    -- Is_Nil --
@@ -388,7 +389,7 @@ package body PolyORB.Smart_Pointers is
    procedure Unchecked_Inc_Usage (Obj : Entity_Ptr) is
    begin
       pragma Assert (Obj.Counter /= -1);
-      pragma Debug (Trace_Event (Inc_Usage, Obj));
+      pragma Debug (C, Trace_Event (Inc_Usage, Obj));
       Obj.Counter := Obj.Counter + 1;
    end Unchecked_Inc_Usage;

============================================================
--- src/polyorb-smart_pointers.ads	d8438c6adc9f3ea8a6420257ccf0b9785f35dd27
+++ src/polyorb-smart_pointers.ads	ea54c240d3278d0be12d2936d3582b0fb3a3a200
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2007, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -27,8 +27,6 @@ with Ada.Finalization;

 with Ada.Finalization;

-with PolyORB.Tasking.Mutexes;
-
 package PolyORB.Smart_Pointers is

    pragma Preelaborate;
@@ -37,18 +35,11 @@ package PolyORB.Smart_Pointers is
    -- Task-unsafe entity --
    ------------------------

-   type Unsafe_Entity is abstract tagged limited record
-      Counter : Integer := 0;
-      --  Reference counter.
-      --  If set to -1, no reference counting is performed for this entity:
-      --  Inc_Usage and Dec_Usage are both no-ops in that case.
+   type Unsafe_Entity is abstract tagged limited private;

-      --  ???
-      --  It is strictly forbidden to access this component from outside
-      --  this unit, however we can't make it private due to G412-018.
+   function Is_Controlled (X : Unsafe_Entity) return Boolean;
+   --  False expect for derived type from Smart_Pointers.Controlled_Entities

-   end record;
-
    procedure Finalize (X : in out Unsafe_Entity);
    --  Unsafe_Entity is the base type of all objects that can be referenced.
    --  It contains a Counter, which is the number of references to this
@@ -82,7 +73,7 @@ package PolyORB.Smart_Pointers is
    -- Task-safe entity --
    ----------------------

-   type Non_Controlled_Entity is abstract new Unsafe_Entity with null record;
+   type Non_Controlled_Entity is abstract new Unsafe_Entity with private;
    --  Same as Unsafe_Entity, but accesses to the reference counter are
    --  made task safe through calls to the Entity_Lock and Entity_Unlock
    --  operations.
@@ -91,17 +82,6 @@ package PolyORB.Smart_Pointers is
    procedure Entity_Unlock (X : in out Non_Controlled_Entity);
    --  Mutex operations

-   ---------------------------------
-   -- Controlled task-safe entity --
-   ---------------------------------
-
-   type Entity is abstract new Non_Controlled_Entity with private;
-
-   procedure Initialize (X : in out Entity);
-   --  An entity that is a controlled object. Contrary to
-   --  Non_Controlled_Entity, the Finalize operation is called whenever the
-   --  entity is finalized.
-
    ---------
    -- Ref --
    ---------
@@ -157,28 +137,15 @@ private

 private

-   ----------------------
-   -- Task-safe entity --
-   ----------------------
+   type Unsafe_Entity is abstract tagged limited record
+      Counter : Integer := 0;
+      --  Reference counter.
+      --  If set to -1, no reference counting is performed for this entity:
+      --  Inc_Usage and Dec_Usage are both no-ops in that case.
+   end record;

-   Counter_Lock : Tasking.Mutexes.Mutex_Access;
-   --  Global mutex used to guarantee consistency of concurrent accesses to
-   --  entity reference counters. To be created by a child unit during
-   --  PolyORB initialization.
+   type Non_Controlled_Entity is abstract new Unsafe_Entity with null record;

-   type Entity_Controller (E : access Entity'Class)
-      is new Ada.Finalization.Limited_Controlled with null record;
-
-   procedure Initialize (X : in out Entity_Controller);
-   procedure Finalize   (X : in out Entity_Controller);
-
-   type Entity is abstract new Non_Controlled_Entity with record
-      Controller : Entity_Controller (Entity'Access);
-      --  Controller component used to trigger a call to the Entity's
-      --  Finalize primitive operation when it is Finalized (note that
-      --  Entity itself is not a controlled type).
-   end record;
-
    type Ref is new Ada.Finalization.Controlled with record
       A_Ref : Entity_Ptr := null;
       --  The entity designated by this reference
@@ -202,9 +169,12 @@ private
      function (X : Ref'Class) return String;
    --  A function returning External_Tag (Entity_Of (X)'Tag)

-   Entity_External_Tag : Entity_External_Tag_Hook := null;
-   Ref_External_Tag    : Ref_External_Tag_Hook := null;
-   --  Hooks to be set up by a child unit during PolyORB initialization
+   procedure Initialize
+     (The_Entity_External_Tag : Entity_External_Tag_Hook;
+      The_Ref_External_Tag    : Ref_External_Tag_Hook;
+      The_Default_Trace       : Boolean);
+   --  Initialize internal structures and set debugging hooks (to be called by
+   --  child elaboration package)

    --  Determination of whether to trace smart pointers event for a specific
    --  entity type: in [smart_pointers] section, whether type T is traced
@@ -214,8 +184,6 @@ private
    Trace_Section : constant String := "smart_pointers";
    Trace_Suffix  : constant String := ".trace";

-   Default_Trace : Boolean := True;
-
    function Get_Trace (Entity_Type : String) return Boolean;
    --  Return indication of whether to trace events for the given entity type

============================================================
--- src/polyorb-task_info.adb	40d2a3dafe9bf04f8e9983b4d15dcda48a96f615
+++ src/polyorb-task_info.adb	e6beed64fd8ee5c7a2e438ed52d4508e9f1d779f
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -91,13 +91,13 @@ package body PolyORB.Task_Info is
    -----------------

    procedure List_Attach
-     (TI   : Task_Info_Access;
-      List : in out Task_Lists.List)
+     (TI   : access Task_Info;
+      List : in out Task_List)
    is
-      pragma Assert (Task_Lists.Last (TI.Position));
+      pragma Assert (not TI.On_List);
    begin
-      Task_Lists.Prepend (List, TI);
-      TI.Position := Task_Lists.First (List);
+      Prepend (List, TI);
+      TI.On_List := True;
    end List_Attach;

    -----------------
@@ -105,16 +105,25 @@ package body PolyORB.Task_Info is
    -----------------

    procedure List_Detach
-     (TI   : in out Task_Info;
-      List : in out Task_Lists.List)
+     (TI   : access Task_Info;
+      List : in out Task_List)
    is
    begin
-      if not Task_Lists.Last (TI.Position) then
-         Task_Lists.Remove (List, TI.Position);
-         TI.Position := Task_Lists.Last (List);
+      if TI.On_List then
+         Remove_Element (List, TI);
+         TI.On_List := False;
       end if;
    end List_Detach;

+   ----------------
+   -- List_First --
+   ----------------
+
+   function List_First (List : Task_List) return access Task_Info is
+   begin
+      return Task_Lists.Value (First (List));
+   end List_First;
+
    --------------
    -- May_Exit --
    --------------
@@ -227,6 +236,18 @@ package body PolyORB.Task_Info is
       return TI.Exit_Condition /= null and then TI.Exit_Condition.all;
    end Exit_Condition;

+   ----------
+   -- Link --
+   ----------
+
+   function Link
+     (S     : access Task_Info;
+      Which : Utils.Ilists.Link_Type) return access Task_Info_Access
+   is
+   begin
+      return S.Links (Which)'Unchecked_Access;
+   end Link;
+
    -----------
    -- Mutex --
    -----------
@@ -334,6 +355,15 @@ package body PolyORB.Task_Info is
       return TI.Id;
    end Id;

+   --------------
+   -- Is_Empty --
+   --------------
+
+   function Is_Empty (List : Task_List) return Boolean is
+   begin
+      return Task_Lists.Is_Empty (Task_Lists.List (List));
+   end Is_Empty;
+
    ---------
    -- Job --
    ---------
============================================================
--- src/polyorb-task_info.ads	dee96975701f64f4d10311d2aa03202083463067
+++ src/polyorb-task_info.ads	495f627cd43ac04822c4a2bf8164a6e53551aed7
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---         Copyright (C) 2001-2008, Free Software Foundation, Inc.          --
+--         Copyright (C) 2001-2009, Free Software Foundation, Inc.          --
 --                                                                          --
 -- PolyORB is free software; you  can  redistribute  it and/or modify it    --
 -- under terms of the  GNU General Public License as published by the  Free --
@@ -28,13 +28,15 @@
 --  This package provides a facility for associating information with each
 --  task executing the ORB main loop.

+pragma Ada_2005;
+
 with PolyORB.Asynch_Ev;
 with PolyORB.Jobs;
 with PolyORB.Tasking.Condition_Variables;
 with PolyORB.Tasking.Mutexes;
 with PolyORB.Tasking.Threads;
 with PolyORB.Types;
-with PolyORB.Utils.Chained_Lists;
+with PolyORB.Utils.Ilists;

 package