OSDN Git Service

2007-09-12 Hristian Kirtchev <kirtchev@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Sep 2007 11:58:59 +0000 (11:58 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Sep 2007 11:58:59 +0000 (11:58 +0000)
* bindusg.adb (Display): Correct comment for switch -X. Add a line for
the usage of switch -y.

* switch-b.adb (Scan_Binder_Switches): Set flag Leap_Seconds_Support
when switch -y is present.

* opt.ads: Add binder flag Leap_Seconds_Support used to enable/disable
leap seconds in Ada.Calendar and its children.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128429 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/bindusg.adb
gcc/ada/opt.ads
gcc/ada/switch-b.adb

index ea06299..21e3163 100644 (file)
@@ -232,10 +232,14 @@ package body Bindusg is
       Write_Line ("  -x        Exclude source files (check object " &
                   "consistency only)");
 
-      --  Line for X switch
+      --  Line for -X switch
 
       Write_Line ("  -Xnnn     Default exit status value = nnn");
 
+      --  Line for -y switch
+
+      Write_Line ("  -y        Enable leap seconds");
+
       --  Line for -z switch
 
       Write_Line ("  -z        No main subprogram (zero main)");
index 69676a9..7a10556 100644 (file)
@@ -631,6 +631,11 @@ package Opt is
    --  When True the temporary files created by the GNAT driver are not
    --  deleted. Set by switch -dn or qualifier /KEEP_TEMPORARY_FILES.
 
+   Leap_Seconds_Support : Boolean := False;
+   --  GNATBIND
+   --  Set to True to enable leap seconds support in Ada.Calendar and its
+   --  children.
+
    Link_Only : Boolean := False;
    --  GNATMAKE, GPRMAKE
    --  Set to True to skip compile and bind steps
index e9f8df6..0938c10 100644 (file)
@@ -456,6 +456,12 @@ package body Switch.B is
             Ptr := Ptr + 1;
             Scan_Pos (Switch_Chars, Max, Ptr, Default_Exit_Status, C);
 
+         --  Processing for y switch
+
+         when 'y' =>
+            Ptr := Ptr + 1;
+            Leap_Seconds_Support := True;
+
          --  Processing for z switch
 
          when 'z' =>