+2014-01-24 Pascal Obry <obry@adacore.com>
+
+ * g-sercom-mingw.adb: Fix serial port name for port number > 10.
+
2014-01-24 Gary Dismukes <dismukes@adacore.com>
* exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
-- --
-- B o d y --
-- --
--- Copyright (C) 2007-2012, AdaCore --
+-- Copyright (C) 2007-2013, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- This is the Windows implementation of this package
-with Ada.Unchecked_Deallocation; use Ada;
with Ada.Streams; use Ada.Streams;
+with Ada.Unchecked_Deallocation; use Ada;
with System; use System;
with System.Communication; use System.Communication;
function Name (Number : Positive) return Port_Name is
N_Img : constant String := Positive'Image (Number);
begin
- return Port_Name ("COM" & N_Img (N_Img'First + 1 .. N_Img'Last) & ':');
+ if Number > 9 then
+ return Port_Name ("\\.\COM" & N_Img (N_Img'First + 1 .. N_Img'Last));
+ else
+ return Port_Name
+ ("COM" & N_Img (N_Img'First + 1 .. N_Img'Last) & ':');
+ end if;
end Name;
----------