-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
with Namet; use Namet;
with Types; use Types;
-with System.Storage_Elements;
-with System.OS_Lib; use System.OS_Lib;
with System; use System;
+pragma Warnings (Off);
+-- This package is used also by gnatcoll
+with System.OS_Lib; use System.OS_Lib;
+pragma Warnings (On);
+
+with System.Storage_Elements;
+
pragma Elaborate_All (System.OS_Lib);
-- For the call to function Get_Target_Object_Suffix in the private part
package Osint is
Multi_Unit_Index_Character : Character := '~';
- -- The character before the index of the unit in a multi-unit source, in
- -- ALI and object file names. This is not a constant, because it is changed
- -- to '$' on VMS.
+ -- The character before the index of the unit in a multi-unit source in ALI
+ -- and object file names. Changed to '$' on VMS.
Ada_Include_Path : constant String := "ADA_INCLUDE_PATH";
Ada_Objects_Path : constant String := "ADA_OBJECTS_PATH";
Get_File_Names_Case_Sensitive /= 0;
-- Set to indicate whether the operating system convention is for file
-- names to be case sensitive (e.g., in Unix, set True), or non case
- -- sensitive (e.g., in OS/2, set False).
+ -- sensitive (e.g., in Windows, set False).
procedure Canonical_Case_File_Name (S : in out String);
-- Given a file name, converts it to canonical case form. For systems
-- this call converts the given string to canonical all lower case form,
-- so that two file names compare equal if they refer to the same file.
+ function Get_Env_Vars_Case_Sensitive return Int;
+ pragma Import (C, Get_Env_Vars_Case_Sensitive,
+ "__gnat_get_env_vars_case_sensitive");
+ Env_Vars_Case_Sensitive : constant Boolean :=
+ Get_Env_Vars_Case_Sensitive /= 0;
+ -- Set to indicate whether the operating system convention is for
+ -- environment variable names to be case sensitive (e.g., in Unix, set
+ -- True), or non case sensitive (e.g., in Windows, set False).
+
+ procedure Canonical_Case_Env_Var_Name (S : in out String);
+ -- Given an environment variable name, converts it to canonical case form.
+ -- For systems where environment variable names are case sensitive, this
+ -- procedure has no effect. If environment variable names are not case
+ -- sensitive, then this call converts the given string to canonical all
+ -- lower case form, so that two environment variable names compare equal if
+ -- they refer to the same environment variable.
+
function Number_Of_Files return Int;
-- Gives the total number of filenames found on the command line
function File_Time_Stamp
(Name : C_File_Name;
Attr : access File_Attributes) return OS_Time;
+ function File_Time_Stamp
+ (Name : Path_Name_Type;
+ Attr : access File_Attributes) return Time_Stamp_Type;
-- Return the time stamp of the file
function Is_Readable_File
-- detected, the file being written is deleted, and a fatal error is
-- signalled.
- File_Attributes_Size : constant Integer := 50;
+ File_Attributes_Size : constant Natural := 24;
-- This should be big enough to fit a "struct file_attributes" on any
- -- system. It doesn't matter if it is too big (which avoids the need for
- -- either mapping the struct exactly or importing the sizeof from C, which
- -- would result in dynamic code)
+ -- system. It doesn't cause any malfunction if it is too big (which avoids
+ -- the need for either mapping the struct exactly or importing the sizeof
+ -- from C, which would result in dynamic code). However, it does waste
+ -- space (e.g. when a component of this type appears in a record, if it is
+ -- unnecessarily large.
type File_Attributes is
array (1 .. File_Attributes_Size)