+2014-08-01 Robert Dewar <dewar@adacore.com>
+
+ * sem_res.adb: Minor comment addition.
+
+2014-08-01 Arnaud Charlet <charlet@adacore.com>
+
+ * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
+ s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
+ no longer used.
+ * s-os_lib.ads: Minor reformatting.
+
2014-08-01 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
}
FILE *
-__gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED,
- char *vms_form ATTRIBUTE_UNUSED)
+__gnat_fopen (char *path, char *mode, int encoding ATTRIBUTE_UNUSED)
{
#if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
TCHAR wpath[GNAT_MAX_PATH_LEN];
__gnat_freopen (char *path,
char *mode,
FILE *stream,
- int encoding ATTRIBUTE_UNUSED,
- char *vms_form ATTRIBUTE_UNUSED)
+ int encoding ATTRIBUTE_UNUSED)
{
#if defined (_WIN32) && ! defined (__vxworks) && ! defined (IS_CROSS)
TCHAR wpath[GNAT_MAX_PATH_LEN];
extern int __gnat_chdir (char *);
extern int __gnat_rmdir (char *);
-extern FILE *__gnat_fopen (char *, char *, int,
- char *);
+extern FILE *__gnat_fopen (char *, char *, int);
extern FILE *__gnat_freopen (char *, char *, FILE *,
- int, char *);
+ int);
extern int __gnat_open (char *, int);
extern int __gnat_open_read (char *, int);
extern int __gnat_open_rw (char *, int);
function fopen
(filename : chars;
mode : chars;
- encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8;
- vms_form : chars := System.Null_Address) return FILEs
- renames System.CRTL.fopen;
+ encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8)
+ return FILEs renames System.CRTL.fopen;
-- Note: to maintain target independence, use text_translation_required,
-- a boolean variable defined in sysdep.c to deal with the target
-- dependent text translation requirement. If this variable is set,
(filename : chars;
mode : chars;
stream : FILEs;
- encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8;
- vms_form : chars := System.Null_Address) return FILEs
- renames System.CRTL.freopen;
+ encoding : System.CRTL.Filename_Encoding := System.CRTL.UTF8)
+ return FILEs renames System.CRTL.freopen;
function fseek
(stream : FILEs;
-- Command_Name(Cindex1 .. Cindex2) is now the equivalent of the
-- POSIX command "basename argv[0]"
- -- Strip off any versioning information found on some systems. This
- -- would take the form of TOOL.exe followed by a ";" or "." and a
- -- sequence of one or more numbers.
-
- if Command_Name (Cindex2) in '0' .. '9' then
- for J in reverse Cindex1 .. Cindex2 loop
- if Command_Name (J) = '.' or else Command_Name (J) = ';' then
- Cindex2 := J - 1;
- exit;
- end if;
-
- exit when Command_Name (J) not in '0' .. '9';
- end loop;
- end if;
-
-- Strip off any executable extension (usually nothing or .exe)
-- but formally reported by autoconf in the variable EXEEXT
function fopen
(filename : chars;
mode : chars;
- encoding : Filename_Encoding := Unspecified;
- vms_form : chars := System.Null_Address) return FILEs;
+ encoding : Filename_Encoding := Unspecified) return FILEs;
pragma Import (C, fopen, "__gnat_fopen");
function fputc (C : int; stream : FILEs) return int;
(filename : chars;
mode : chars;
stream : FILEs;
- encoding : Filename_Encoding := Unspecified;
- vms_form : chars := System.Null_Address) return FILEs;
+ encoding : Filename_Encoding := Unspecified) return FILEs;
pragma Import (C, freopen, "__gnat_freopen");
function fseek
-- may have changed and we do not want to delete a different file.
Stream :=
- fopen (Namestr'Address, Fopstr'Address, Encoding, Null_Address);
+ fopen (Namestr'Address, Fopstr'Address, Encoding);
if Stream = NULL_Stream then
File.Stream := freopen
(File.Name.all'Address, Fopstr'Address, File.Stream,
- File.Encoding, Null_Address);
+ File.Encoding);
if File.Stream = NULL_Stream then
Close (File_Ptr);
-- to the current position (origin = SEEK_CUR), end of file (origin =
-- SEEK_END), or start of file (origin = SEEK_SET).
- type Large_File_Size is range -(2 ** 63) .. (2 ** 63) - 1;
+ type Large_File_Size is range -2 ** 63 .. 2 ** 63 - 1;
function File_Length (FD : File_Descriptor) return Long_Integer;
pragma Import (C, File_Length, "__gnat_file_length_long");
Remove_Interp (I);
end if;
- if Present (System_Aux_Id)
+ -- When compiling for a system where Address is of a visible
+ -- integer type, spurious ambiguities can be produced when
+ -- arithmetic operations have a literal operand and return
+ -- System.Address or a descendant of it. These ambiguities
+ -- are usually resolved by the context, but for conversions
+ -- there is no context type and the removal of the spurious
+ -- operations must be done explicitly here.
+
+ if not Address_Is_Private
and then Is_Descendent_Of_Address (It.Typ)
then
Remove_Interp (I);