[multiple changes]
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. From-SVN: r213441
This commit is contained in:
parent
d18bbd2534
commit
4d49c6e149
@ -1,3 +1,14 @@
|
||||
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
|
||||
|
@ -744,8 +744,7 @@ __gnat_fputwc(int c, FILE *stream)
|
||||
}
|
||||
|
||||
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];
|
||||
@ -771,8 +770,7 @@ FILE *
|
||||
__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];
|
||||
|
@ -148,10 +148,9 @@ extern int __gnat_rename (char *, char *);
|
||||
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);
|
||||
|
@ -108,9 +108,8 @@ package Interfaces.C_Streams is
|
||||
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,
|
||||
@ -148,9 +147,8 @@ package Interfaces.C_Streams is
|
||||
(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;
|
||||
|
@ -1276,21 +1276,6 @@ package body Osint is
|
||||
-- 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
|
||||
|
||||
|
@ -117,8 +117,7 @@ package System.CRTL is
|
||||
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;
|
||||
@ -137,8 +136,7 @@ package System.CRTL is
|
||||
(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
|
||||
|
@ -1068,7 +1068,7 @@ package body System.File_IO is
|
||||
-- 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
|
||||
|
||||
@ -1222,7 +1222,7 @@ package body System.File_IO is
|
||||
|
||||
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);
|
||||
|
@ -426,7 +426,7 @@ package System.OS_Lib is
|
||||
-- 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");
|
||||
|
@ -11512,7 +11512,15 @@ package body Sem_Res is
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user