OSDN Git Service

2010-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / ada / hostparm.ads
index 6f2ecc7..64164f3 100644 (file)
@@ -6,25 +6,23 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
--- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
--- 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 GNAT;  see file COPYING.  If not, write --
--- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
--- Boston, MA 02110-1301, USA.                                              --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
 --                                                                          --
--- As a special exception,  if other files  instantiate  generics from this --
--- unit, or you link  this unit with other files  to produce an executable, --
--- this  unit  does not  by itself cause  the resulting  executable  to  be --
--- covered  by the  GNU  General  Public  License.  This exception does not --
--- however invalidate  any other reasons why  the executable file  might be --
--- covered by the  GNU Public License.                                      --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --  are parameters that are relevant to the host machine on which the
 --  compiler is running, and thus this package is part of the compiler.
 
-package Hostparm is
-
-   -----------------------
-   -- TARGET Parameters --
-   -----------------------
+with Types;
 
-   --  ??? The following should really be moved to a Target package
-
-   Java_VM : constant Boolean := False;
-   --  Set true when compiling the JGNAT tool chain (compiler, gnatmake, etc)
+package Hostparm is
 
    ---------------------
    -- HOST Parameters --
@@ -55,19 +46,23 @@ package Hostparm is
 
    OpenVMS : Boolean := Gnat_VMSp /= 0;
    --  Set True for OpenVMS host. See also OpenVMS target boolean in
-   --  5vsystem.ads and OpenVMS_On_Target boolean in Targparm. This is
-   --  not a constant, because it can be modified by -gnatdm.
+   --  system-vms.ads and system-vms_64.ads and OpenVMS_On_Target boolean in
+   --  Targparm. This is not a constant, because it can be modified by -gnatdm.
 
-   Normalized_CWD : constant String := "./";
+   Direct_Separator : constant Character;
+   pragma Import (C, Direct_Separator, "__gnat_dir_separator");
+   Normalized_CWD : constant String := "." & Direct_Separator;
    --  Normalized string to access current directory
 
-   Max_Line_Length : constant := 255;
-   --  Maximum source line length. This can be set to any value up to
-   --  2**15 - 1, a limit imposed by the assumption that column numbers
-   --  can be stored in 16 bits (see Types.Column_Number). A value of
-   --  200 is the minimum value required (RM 2.2(15)), but we use 255
-   --  for most GNAT targets since this is DEC Ada compatible. The value
-   --  set here can be overridden by the explicit use of -gnatyM.
+   Max_Line_Length : constant := Types.Column_Number'Pred
+                       (Types.Column_Number'Last);
+   --  Maximum source line length. By default we set it to the maximum
+   --  value that can be supported, which is given by the range of the
+   --  Column_Number type. We subtract 1 because need to be able to
+   --  have a valid Column_Number equal to Max_Line_Length to represent
+   --  the location of a "line too long" error.
+   --  200 is the minimum value required (RM 2.2(15)). The value set here
+   --  can be reduced by the explicit use of the -gnatyM style switch.
 
    Max_Name_Length : constant := 1024;
    --  Maximum length of unit name (including all dots, and " (spec)") and