aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-25[multiple changes]Arnaud Charlet1-33/+17
2010-10-25 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_file_time_name_attr): Use GetFileAttributesEx to get the timestamp. A bit faster than opening/closing the file. (__gnat_stat_to_attr): Remove kludge for Windows. (__gnat_file_exists_attr): Likewise. The timestamp is now retreived using GetFileAttributesEx as faster. 2010-10-25 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Derive_Interface_Subprogram): New subprogram. (Derive_Subprograms): For abstract private types transfer to the full view entities of uncovered interface primitives. Required because if the interface primitives are left in the private part of the package they will be decorated as hidden when the analysis of the enclosing package completes (and hence the interface primitive is not visible for dispatching calls). 2010-10-25 Matthew Heaney <heaney@adacore.com> * Makefile.rtl, impunit.adb: Added bounded set and bounded map containers. * a-crbltr.ads: Added declaration of generic package for bounded tree types. * a-rbtgbo.ads, a-rbtgbo.adb, a-rbtgbk.ads, a-rbtgbk.adb, a-btgbso.ads, a-btgbso.adb, a-cborse.ads, a-cborse.adb, a-cborma.ads, a-cborma.adb: New. 2010-10-25 Thomas Quinot <quinot@adacore.com> * sem_util.adb: Minor reformatting. * usage.adb: Fix usage line for -gnatwh. 2010-10-25 Thomas Quinot <quinot@adacore.com> * sem_ch12.adb (Analyze_Package_Instantiation): For an instantiation in an RCI spec, omit package body if instantiation comes from source, even as a nested package. * exp_dist.adb (Add_Calling_Stubs_To_Declarations, *_Support.Add_Receiving_Stubs_To_Declarations): Handle the case of nested packages, package instantiations and subprogram instantiations. From-SVN: r165920
2010-10-25[multiple changes]Arnaud Charlet1-30/+48
2010-10-25 Robert Dewar <dewar@adacore.com> * exp_ch5.adb (Expand_Predicated_Loop): Remove code for loop through non-static predicate, since we agree not to allow this. (Expand_Predicated_Loop): Properlay handle false predicate (null list in Static_Predicate field. * sem_ch13.adb (Build_Static_Predicate): Extensive changes to clean up handling of more general predicate forms. 2010-10-25 Robert Dewar <dewar@adacore.com> * sem_ch4.adb, sem_util.adb: Minor reformatting. * sem_ch8.adb (Find_Selected_Component): Allow selection from instance of type in predicate or invariant expression. 2010-10-25 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_stat_to_attr): Can set the timestamp on Windows now. (f2t): New routine. (__gnat_stat): Rewrite Win32 version. From-SVN: r165919
2010-10-22[multiple changes]Arnaud Charlet1-0/+12
2010-10-22 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb (Complete_Private_Subtype): The full view of the subtype may already have a rep item chain inherited from the full view of the base type, so do not overwrite it when propagating rep items from the partial view of the subtype. * sem_ch3.adb: Minor code reorganization. Minor reformatting. 2010-10-22 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi (gnatmetric): Remove description of debug option. 2010-10-22 Tristan Gingold <gingold@adacore.com> * adaint.c (__gnat_number_of_cpus): Add implementation for VMS. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * par-ch5.adb: Set properly starting sloc of loop parameter. From-SVN: r165818
2010-10-18adaint.c (__gnat_pthread_setaffinity_np, [...]): Remove wrappers, no longer ↵Jose Ruiz1-46/+0
needed. 2010-10-18 Jose Ruiz <ruiz@adacore.com> * adaint.c (__gnat_pthread_setaffinity_np, __gnat_pthread_attr_setaffinity_np): Remove wrappers, no longer needed. * s-osinte-linux.ads (pthread_setaffinity_np, pthread_attr_setaffinity_np): Remove use of wrappers. * s-taprop-linux.adb (Create_Task, Initialize): Restore check to verify whether the affinity functionality is available in the OS. * gcc-interface/utils.c: Set TREE_STATIC on functions only when there are defined. From-SVN: r165635
2010-10-18adaint.c (__gnat_pthread_setaffinity_np, [...]): Add these wrappers which ↵Jose Ruiz1-0/+46
check the availability of the underlying OS... 2010-10-18 Jose Ruiz <ruiz@adacore.com> * adaint.c (__gnat_pthread_setaffinity_np, __gnat_pthread_attr_setaffinity_np): Add these wrappers which check the availability of the underlying OS functionality before calling. * s-osinte-linux.ads (pthread_setaffinity_np, pthread_attr_setaffinity_np): Call a wrapper instead of the OS function to perform a check of its availability. * s-taprop-linux.adb (Create_Task): Remove the check to verify whether the affinity functionality is available in the OS. Now done in a wrapper * gcc-interface/Makefile.in: Remove vmshandler.asm, unused. * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r165628
2010-10-18[multiple changes]Arnaud Charlet1-34/+15
2010-10-18 Jose Ruiz <ruiz@adacore.com> * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add field corresponding to the affinity when expanding the task declaration. (Make_Task_Create_Call): Add the affinity parameter to the call to create task. * sem_prag.adb (Analyze_Pragma): Add the analysis for pragma CPU, taking into account the case when it applies to a subprogram (only for main and with static expression) or to a task. * par_prag.adb:(Prag): Make pragma CPU a valid one. * snames.ads-tmpl (Name_uCPU, Name_CPU): Add these new name identifiers used by the expander for handling the affinity parameter when creating a task. (Pragma_Id): Add Pragma_CPU as a valid one. * rtsfind.ads (RTU_Id): Make System_Multiprocessors accesible. (RE_Id, RE_Unit_Table): Make the entities RE_CPU_Range and RE_Unspecified_CPU visible. * sinfo.ads, sinfo.adb (Has_Pragma_CPU, Set_Has_Pragma_CPU): Add these two subprograms to set/get the flag indicating whether there is a pragma CPU which applies to the entity. * lib.ads, lib.adb (Unit_Record, Default_Main_CPU, Main_CPU, Set_Main_CPU): Add the field Main_CPU to Unit_Record to store the value of the affinity associated to the main subprogram (if any). Default_Main_CPU is used when no affinity is set. Subprograms Set_Main_CPU and Main_CPU are added to set/get the affinity of the main subprogram. * ali.ads, ali.adb (ALIs_Record): Add field Main_CPU to contain the value of the affinity of the main subprogram. (Scan_ALI): Get the affinity of the main subprogram (encoded as C=XX in the M line). * lib-writ.ads, lib-writ.adb (M_Parameters): Encode the affinity of the main subprogram in the M (main) line using C=XX. * lib-load.adb (Create_Dummy_Package_Unit, Load_Main_Source, Load_Unit): Add new field Main_CPU. * bindgen.adb (Gen_Adainit_Ada, Gen_Adainit_C): Add the code to pass the affinity of the main subprogram to the run time. * s-taskin.ads (Common_ATCB): Add the field Base_CPU to store the affinity. (Unspecified_CPU): Add this constant to identify the case when no affinity is set for tasks. * s-taskin.adb (Initialize_ATCB): Store the value coming from pragma CPU in the common part of the ATCB. (Initialize): Store the value coming from pragma CPU (for the environment task) in the common part of the ATCB. * s-tassta.ads, s-tassta.adb (Create_Task): Add the affinity specified by pragma CPU to the ATCB. * s-tarest.ads, s-tarest.adb (Create_Restricted_Task): Add the affinity specified by pragma CPU to the ATCB. * s-tporft.adb (Register_Foreign_Thread): Add the new affinity parameter to the call to Initialize_ATCB. * s-taprop-linux.adb (Create_Task): Change the attributes of the thread to include the task affinity before creation. Additionally, the affinity selected with Task_Info is also enforced changing the attributes at task creation time, instead of changing it after creation. (Initialize): Change the affinity of the environment task if required by a pragma CPU. * s-osinte-linux.ads (pthread_setaffinity_np): Instead of using a wrapper to check whether the function is available or not, use a weak symbol. (pthread_attr_setaffinity_np): Add the import of this function which is used to change the affinity in the attributes used to create a thread. * adaint.c (__gnat_pthread_attr_setaffinity_np): Remove this wrapper. It was used to check whether the pthread function was available or not, but the use of a weak symbol handles this situation in a cleaner way. * s-taprop-mingw.adb (Create_Task, Initialize): Change the affinity of tasks (including the environment task) if required by a pragma CPU. * s-taprop-solaris.adb (Enter_Task): Change the affinity of tasks (including the environment task) if required by a pragma CPU. * s-taprop-vxworks.adb (Create_Task, Initialize): Change the affinity of tasks (including the environment task) if required by a pragma CPU. * init.c (__gl_main_cpu): Make this value visible to the run time. It will pass the affinity of the environment task. 2010-10-18 Javier Miranda <miranda@adacore.com> * einfo.adb (Direct_Primitive_Operations): Complete assertion. From-SVN: r165625
2010-10-12[multiple changes]Arnaud Charlet1-0/+4
2010-10-12 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_number_of_cpus): Add implementation for Windows. 2010-10-12 Arnaud Charlet <charlet@adacore.com> * make.adb (Globalize): New procedure. (Compile): Set Do_Codepeer_Globalize_Step when -gnatC is used. (Gnatmake): Call Globalize when needed. (Process_Restrictions_Or_Restriction_Warnings): Ignore Restrictions pragmas in CodePeer mode. (Adjust_Global_Switches): Set No_Initialize_Scalars in CodePeer mode, to generate simpler and consistent code. 2010-10-12 Bob Duff <duff@adacore.com> * exp_util.adb (Remove_Side_Effects): Disable previous change, can cause side effects to be duplicated. From-SVN: r165359
2010-10-11[multiple changes]Arnaud Charlet1-7/+7
2010-10-11 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Do not emit error for AI05-0033 in CodePeer mode. 2010-10-11 Robert Dewar <dewar@adacore.com> * atree.h, atree.ads, atree.adb (Flag3): New flag (replaces Unused_1) * csinfo.adb: Aspect_Specifications is a new special field * einfo.adb (Flag3): New unused flag * exp_util.adb (Insert_Actions): Add processing for N_Aspect_Specification. * sem.adb: Add entry for N_Aspect_Specification. * sinfo.ads, sinfo.adb (N_Aspect_Specification): New node (Has_Aspect_Specifications): New flag (Permits_Aspect_Specifications): New function (Aspect_Specifications): New function (Set_Aspect_Specifications): New procedure * sprint.adb (Sprint_Node): Put N_At_Clause in proper alpha order (Sprint_Node): Add dummy entry for N_Aspect_Specification * treepr.adb (Flag3): New flag to be listed 2010-10-11 Vincent Celier <celier@adacore.com> * adaint.c: Minor reformatting. From-SVN: r165279
2010-10-11[multiple changes]Arnaud Charlet1-1/+20
2010-10-11 Robert Dewar <dewar@adacore.com> * sem_ch6.adb, s-htable.ads: Minor reformatting. 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Selected_Component): If the selector is invisible in an instantiation, and both the formal and the actual are private extensions of the same type, look for the desired component in the proper view of the parent type. 2010-10-11 Vincent Celier <celier@adacore.com> * adaint.c (__gnat_number_of_cpus): Add implementation for Solaris, AIX, Tru64, Darwin, IRIX and HP-UX. From-SVN: r165277
2010-10-11Makefile.rtl: Add s-multip.Vincent Celier1-0/+12
2010-10-11 Vincent Celier <celier@adacore.com> * Makefile.rtl: Add s-multip. * adaint.c: New function __gnat_number_of_cpus, implemented for Linux, defaulting to 1 for other platforms. * adaint.h: New function __gnat_number_of_cpus. * impunit.adb (Non_Imp_File_Names_12): New file list for Ada 2012, with a single component "s-multip". * impunit.ads (Kind_Of_Unit): New enumerated value Ada_12_Unit for Ada 2012. * rtsfind.ads (RTU_Id): New enumerated value System_Multiprocessors * s-multip.ads, s-multip.adb: New Ada 2012 package. * sem_ch10.adb (Analyze_With_Clause): Check also Ada 2012 units. From-SVN: r165274
2010-09-09prj.adb (Get_Object_Directory): Return object directory display nameVincent Celier1-2/+9
2010-09-09 Vincent Celier <celier@adacore.com> * prj.adb (Get_Object_Directory): Return object directory display name * adaint.c (__gnat_get_file_names_case_sensitive): When environment variable GNAT_FILE_NAME_CASE_SENSITIVE has a value of "0" or "1", return this value, otherwise return the default for the platform. From-SVN: r164086
2010-09-09adaint.c: New function __gnat_get_env_vars_case_sensitive...Vincent Celier1-0/+12
2010-09-09 Vincent Celier <celier@adacore.com> * adaint.c: New function __gnat_get_env_vars_case_sensitive, returns 0 for VMS and Windows, and 1 for all other platforms. * adaint.h: New function __gnat_get_env_vars_case_sensitive * osint.ads, osint.adb (Canonical_Case_Env_Var_Name): New procedure. * prj-ext.adb (Add): Call Canonical_Case_Env_Var_Name instead of Canonical_Case_File_Name, as we are dealing with environment variables, not files. From-SVN: r164069
2010-08-10[multiple changes]Arnaud Charlet1-1/+1
2010-08-10 Thomas Quinot <quinot@adacore.com> * exp_attr.adb: Add comments. 2010-08-10 Jerome Lambourg <lambourg@adacore.com> * adaint.c (__gnat_get_file_names_case_sensitive): return 0 on darwin. From-SVN: r163059
2010-06-22[multiple changes]Arnaud Charlet1-149/+20
2010-06-22 Ed Schonberg <schonberg@adacore.com> * cstand.adb: Add tree nodes for pragma Pack on string types. 2010-06-22 Javier Miranda <miranda@adacore.com> * einfo.ads, einfo.adb (Last_Formal): New synthesized attribute. * exp_util.adb (Find_Prim_Op): Use new attribute to locate the last formal of a primitive. * exp_disp.adb (Is_Predefined_Dispatching_Operation, Is_Predefined_Dispatching_Alias): Use new attribute to locate the last formal of a primitive. * exp_cg.adb (Is_Predefined_Dispatching_Operation): Use new attribute to obtain the last formal of a primitive. 2010-06-22 Geert Bosch <bosch@adacore.com> * sysdep.c, init.c, adaint.c, cstreams.c: Remove conditional code depending on __EMX__ or MSDOS being defined. * i-cstrea.ads, gnat_rm.texi: Remove mentions of OS/2, DOS and Xenix. * a-excpol-abort.adb: Update comment indicating users of the file. * xref_lib.adb, sfn_scan.adb: Remove mention of OS/2, replace NT by Windows. * env.c: Remove empty conditional for MSDOS. * s-stchop.adb, g-dirope.ads, s-fileio.adb, osint.ads: Remove mention of OS/2 in comment. From-SVN: r161205
2010-06-22[multiple changes]Arnaud Charlet1-7/+15
2010-06-22 Robert Dewar <dewar@adacore.com> * lib-writ.ads, errout.adb, einfo.adb, einfo.ads: Minor reformatting. 2010-06-22 Vincent Celier <celier@adacore.com> * adaint.c (__gnat_locate_regular_file): If a directory in the path is empty, make it the current working directory. 2010-06-22 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb (Build_Derived_Record_Type): When deriving a tagged private type with discriminants, make sure the parent type is frozen. 2010-06-22 Eric Botcazou <ebotcazou@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Bit>: Deal with packed array references specially. * exp_ch4.adb (Expand_N_Indexed_Component): Do not convert a reference to a component of a bit packed array if it is the prefix of 'Bit. * exp_pakd.ads (Expand_Packed_Bit_Reference): Declare. * exp_pakd.adb (Expand_Packed_Bit_Reference): New procedure. Expand a 'Bit reference, where the prefix involves a packed array reference. (Get_Base_And_Bit_Offset): New helper, extracted from... (Expand_Packed_Address_Reference): ...here. Call above procedure to get the outer object and offset expression. From-SVN: r161160
2010-06-18[multiple changes]Arnaud Charlet1-2/+2
2010-06-18 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb: Add extra guard. 2010-06-18 Gary Dismukes <dismukes@adacore.com> * sem_util.adb (Object_Access_Level): For Ada 2005, determine the accessibility level of a function call from the level of the innermost enclosing dynamic scope. (Innermost_Master_Scope_Depth): New function to find the depth of the nearest dynamic scope enclosing a node. 2010-06-18 Tristan Gingold <gingold@adacore.com> * adaint.c: Make ATTR_UNSET static as it is not used outside this file. 2010-06-18 Thomas Quinot <quinot@adacore.com> * g-socket.ads: Minor reformatting. From-SVN: r160964
2010-06-17[multiple changes]Arnaud Charlet1-10/+15
2010-06-17 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Non_VMS_Usage): Do not issue usage for gnat sync. Update the last line of the usage, indicating what commands do not accept project file switches. * vms_conv.adb: Do not issue usage line for GNAT SYNC * vms_data.ads: Fix errors in the qualifiers /LOGFILE and /MAIN of GNAT ELIM. * gnat_ugn.texi: Document the relaxed rules for library directories in externally built library projects. 2010-06-17 Doug Rupp <rupp@adacore.com> * s-auxdec-vms_64.ads: Make boolean and arithmetic operations intrinsic where possible. * s-auxdec-vms-alpha.adb: Remove kludges for aforemention. * gcc-interface/Makefile.in: Update VMS target pairs. 2010-06-17 Vasiliy Fofanov <fofanov@adacore.com> * adaint.c: Reorganized in order to avoid use of GetProcessId to stay compatible with Windows NT 4.0 which doesn't provide this function. 2010-06-17 Vincent Celier <celier@adacore.com> * ali-util.adb (Time_Stamp_Mismatch): In Verbose mode, if there is different timestamps but the checksum is the same, issue a short message saying so. 2010-06-17 Arnaud Charlet <charlet@adacore.com> * s-interr.adb (Finalize): If the Abort_Task signal is set to system, it means that we cannot reset interrupt handlers since this would require potentially sending the abort signal to the Server_Task. From-SVN: r160911
2009-11-30[multiple changes]Arnaud Charlet1-14/+16
2009-11-30 Ed Schonberg <schonberg@adacore.com> * par_sco.adb (Traverse_Handled_Statement_Sequence): Do not emit SCO's for null statements that do not come from source. * sinfo.ads: Clarify documentation of Comes_From_Source 2009-11-30 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_Source): Use Display_Name for both projects when displaying the paths in error message. 2009-11-30 Emmanuel Briot <briot@adacore.com> * adaint.h, adaint.c (file_attributes): force the use of unsigned char. On some platforms, "char" is signed, on others unsigned, so we explicitly specify the one we expect From-SVN: r154826
2009-11-30[multiple changes]Arnaud Charlet1-1/+1
2009-11-30 Jerome Lambourg <lambourg@adacore.com> * exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve comment for the Value_Type case. 2009-11-30 Thomas Quinot <quinot@adacore.com> * a-textio.adb: Minor reformatting 2009-11-30 Pascal Obry <obry@adacore.com> * adaint.c: Fix bug in passing parameter. * expect.c: Include io.h to get definition of _open_osfhandle From-SVN: r154810
2009-10-30[multiple changes]Arnaud Charlet1-13/+13
2009-10-30 Emmanuel Briot <briot@adacore.com> * make.adb (Start_Compile_If_Possible): Compute location of resulting ALI file in this procedure instead of after the compilation itself, since the current directory might have changed in between when using -j<n>. * osint.ads: Addded missing alignment clause. * adaint.c, adaint.h, osint.adb (__gnat_reset_attributes, __gnat_size_of_file_attributes): Rename reset_attributes and size_of_file_attributes. 2009-10-30 Javier Miranda <miranda@adacore.com> * sem_scil.adb (Adjust_SCIL_Node): Add missing management of sequences of statements when searching for SCIL nodes. 2009-10-30 Tristan Gingold <gingold@adacore.com> * gnatlink.adb, link.c: By default use shared libgcc on darwin. From-SVN: r153749
2009-10-302009-10-30 Emmanuel Briot <briot@adacore.com>Emmanuel Briot1-207/+336
* make.adb, adaint.c, adaint.h, osint.adb, osint.ads, bcheck.adb (*_attr): new subprograms. (File_Length, File_Time_Stamp, Is_Writable_File): new subprograms (Read_Library_Info_From_Full, Full_Library_Info_Name, Full_Source_Name): Now benefit from a previous cache of the file attributes, to further save on system calls. (Smart_Find_File): now also cache the file attributes. This makes the package File_Stamp_Hash_Table useless, and it was removed. (Compile_Sources): create subprograms for the various steps of the main loop, for readibility and to avoid sharing variables between the various steps. From-SVN: r153747
2009-10-27[multiple changes]Arnaud Charlet1-0/+22
2009-10-27 Vincent Celier <celier@adacore.com> * makeutl.adb (Check_Source_Info_In_ALI): Do not recompile if a subunit from the runtime is found, except if gnatmake switch -a is used and this subunit cannot be found. 2009-10-27 Ed Schonberg <schonberg@adacore.com> * gnatbind.adb (gnatbind): When the -R option is selected, list subunits as well, for tools that need the complete closure of the main program. 2009-10-27 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: Minor updates. 2009-10-27 Emmanuel Briot <briot@adacore.com> * prj-tree.adb (Free): Fix memory leak. 2009-10-27 Vasiliy Fofanov <fofanov@adacore.com> * adaint.c, s-os_lib.adb (__gnat_create_output_file_new): New function that ensures the file that is created is new. Use this function to make sure there is no race condition if several processes are creating temp files concurrently. * s-os_lib.ads: Update comment. 2009-10-27 Thomas Quinot <quinot@adacore.com> * sem_ch12.adb: Minor reformatting 2009-10-27 Javier Miranda <miranda@adacore.com> * exp_ch4.ads (Integer_Promotion_Possible): New subprogram. * exp_ch4.adb (Integer_Promotion_Possible): New subprogram. (Expand_N_Type_Conversion): Replace code that checks if the integer promotion of the operands is possible by a call to the new function Integer_Promotion_Possible. Minor reformating because an enclosing block is now not needed. * checks.adb (Apply_Arithmetic_Overflow_Check): Add missing check to see if the integer promotion is possible; in such case the runtime checks are not generated. From-SVN: r153592
2009-07-30Minor reformatting.Arnaud Charlet1-1/+1
From-SVN: r150252
2009-07-26re PR bootstrap/40578 (FOPEN double defined used in ada/adaint.h:58)Dave Korn1-33/+33
PR bootstrap/40578 * adaint.h (FOPEN, STAT, FSTAT, LSTAT, STRUCT_STAT): Rename from these (GNAT_FOPEN, GNAT_STAT, GNAT_FSTAT, GNAT_LSTAT, GNAT_STRUCT_STAT): ... to these. (__gnat_stat): Adjust reference to STAT in prototype. * adaint.c (__gnat_try_lock, __gnat_fopen, __gnat_file_length, __gnat_named_file_length, __gnat_file_time_name, __gnat_file_time_fd, __gnat_get_libraries_from_registry, __gnat_stat, __gnat_file_exists, __gnat_is_regular_file, __gnat_is_directory, __gnat_is_readable_file, __gnat_is_writable_file, __gnat_is_executable_file, __gnat_set_writable, __gnat_set_executable, __gnat_set_non_writable, __gnat_set_readable, __gnat_set_non_readable, __gnat_is_symbolic_link, __gnat_copy_attribs): Adjust all references to the above. * cstreams.c (__gnat_is_regular_file_fd): Likewise. From-SVN: r150098
2009-07-13[multiple changes]Arnaud Charlet1-3/+6
2009-07-13 Robert Dewar <dewar@adacore.com> * output.adb: Minor comment addition for last change * sinfo.ads: Minor reformatting 2009-07-13 Vasiliy Fofanov <fofanov@adacore.com> * adaint.c (__gnat_portable_no_block_spawn): on Windows, return -1 when spawn failed like on all other targets. 2009-07-13 Ed Schonberg <schonberg@adacore.com> * exp_ch7.adb: Indicate origin of temporary for transient expression. From-SVN: r149584
2009-07-13mingw32.h: Make it explicit that we need XP or later.Vasiliy Fofanov1-61/+49
2009-07-13 Vasiliy Fofanov <fofanov@adacore.com> * mingw32.h: Make it explicit that we need XP or later. * initialize.c: Remove useless extern symbol declaration. * adaint.h: Ditto, also expose __gnat_win32_remove_handle to allow code reuse in expect.c. * adaint.c: Changes throughout the Windows section to redesign storage of the child process list and the process identification. * expect.c (__gnat_kill, __gnat_waitpid): Simplify, cleanup, use pids for interfacing, fix errors. (__gnat_expect_portable_execvp): use function in adaint.c From-SVN: r149573
2009-07-13[multiple changes]Arnaud Charlet1-3/+15
2009-07-13 Thomas Quinot <quinot@adacore.com> * g-socthi-vxworks.adb (C_Sendto): VxWorks does not support the standard sendto(2) interface for connected sockets (passing a null destination address). Use send(2) instead for that case. 2009-07-13 Pascal Obry <obry@adacore.com> * adaint.c: Fix __gnat_stat() with Win32 UNC paths. From-SVN: r149559
2009-06-27init.c (__gnat_set_globals): Add prototype.Eric Botcazou1-2/+2
* init.c (__gnat_set_globals): Add prototype. * adaint.c (__gnat_binder_supports_auto_init): Likewise. (__gnat_sals_init_using_constructors): Likewise. * gcc-interface/utils.c (gnat_pushlevel): Likewise. (get_block_jmpbuf_decl): Likewise. (gnat_poplevel): Likewise. (merge_sizes): Rename local variable. (copy_type): Likewise. (build_vms_descriptor32): Likewise. (build_vms_descriptor): Likewise. (convert_vms_descriptor64): Likewise. (convert_vms_descriptor32): Likewise. (convert_to_fat_pointer): Likewise. (maybe_unconstrained_array): Likewise. (def_fn_type): Use promoted type with va_arg. * gcc-interface/decl.c (gnat_to_gnu_entity): Add declaration. (substitute_in_type): Rename local variable. * gcc-interface/Make-lang.in (ada-warn): Use STRICT_WARN. From-SVN: r149007
2009-06-26[multiple changes]Arnaud Charlet1-0/+1
2009-06-26 Matthew Gingell <gingell@adacore.com> * adaint.c: Do not use the dummy version of convert_addresses on LynxOS 2009-06-26 Vincent Celier <celier@adacore.com> * prj.ads (No_Language_Config): Value of Dependency_Kind is None by default. 2009-06-26 Robert Dewar <dewar@adacore.com> * exp_ch4.adb, gnatcmd.adb, make.adb: Minor reformatting From-SVN: r148963
2009-06-22[multiple changes]Arnaud Charlet1-42/+41
2009-06-22 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Check_Files): Close temporary files after all file names have been written into it. 2009-06-22 Matthew Gingell <gingell@adacore.com> * adaint.c, adaint.h, cstreams.c: Call stat64 on platforms where it is available. 2009-06-22 Thomas Quinot <quinot@adacore.com> * sem_disp.adb (Check_Direct_Call): Handle the case where the full view of the root type is visible at the point of the call. 2009-06-22 Pat Rogers <rogers@adacore.com> * gnat_ugn.texi: Revised a sentence to correct a minor grammar error. From-SVN: r148781
2009-06-11[multiple changes]Arnaud Charlet1-0/+8
2009-06-11 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Resolve_Attribute, case 'access): Add missing accessibiliy check on access_to_subprogram in the context of an anonymous access that is not an access parameter. 2009-06-11 Eric Botcazou <ebotcazou@adacore.com> * tracebak.c (i386 section): Define IS_BAD_PTR on Solaris. 2009-06-11 Quentin Ochem <ochem@adacore.com> * sem_warn.adb, scng.adb, sfn_scan.adb, freeze.adb: Add CODEFIX comments for message handled by GPS. 2009-06-11 Matthew Gingell <gingell@adacore.com> * adaint.c: Use fopen64 instead of fopen on platforms where we know it's supported. 2009-06-11 Pascal Obry <obry@adacore.com> * g-cgi.ads: Fix comment typo. * g-cgi.adb: Properly decode "+" in CGI parameters as spaces. From-SVN: r148392
2009-05-06[multiple changes]Arnaud Charlet1-0/+57
2009-05-06 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: Add subsection for Exits_From_Conditional_Loops rule Add formal definition for extra exit point metric 2009-05-06 Pascal Obry <obry@adacore.com> * adaint.c: Support for setting attributes on unicode filename on Windows. From-SVN: r147171
2009-04-29[multiple changes]Arnaud Charlet1-0/+3
2009-04-29 Ed Schonberg <schonberg@adacore.com> * sem_elim.adb (Check_Eliminated): Handle new improved eliminate information: no need for full scope check. (Eliminate_Error): Do not emit error in a generic context. 2009-04-29 Ed Falis <falis@adacore.com> * adaint.c (__gnat_rmdir): return error code if VTHREADS is defined. VxWorks 653 POS does not support rmdir. 2009-04-29 Matteo Bordin <bordin@adacore.com> * s-stausa.adb, s-stausa.ads: Get_Usage_Range: changing the way results are printed. From-SVN: r146943
2009-04-20sem_ch3.adb, [...]: Minor reformattingArnaud Charlet1-1/+1
* sem_ch3.adb, sem_ch6.adb: Minor reformatting * adaint.c (__gnat_is_readable_file): Check for file existence when not using ACL (always the case on remote drives). From-SVN: r146406
2009-04-20[multiple changes]Arnaud Charlet1-6/+14
2009-04-20 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c: Add support for generating a dummy version of s-oscons.ads providing all possible constants. * g-socthi-mingw.ads: Fix calling convention for __gnat_inet_pton. * socket.c (__gnat_inet_pton): On Windows make sure we always use the ANSI version (not the UNICODE version) of WSAStringToAddress. 2009-04-20 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_set_OWNER_ACL): properly free memory allocated for the security descriptor and make sure all handles are closed before leaving this procedure. From-SVN: r146392
2009-04-20adaint.c (__gnat_get_libraries_from_registry): Fix code to avoid warning.Pascal Obry1-66/+68
2009-04-20 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_get_libraries_from_registry): Fix code to avoid warning. At the same time fix a memory leak. * osint.adb (Get_Libraries_From_Registry): Properly free memory returned by the above routine. From-SVN: r146380
2009-04-20[multiple changes]Arnaud Charlet1-65/+66
2009-04-20 Robert Dewar <dewar@adacore.com> * s-conca5.adb, s-conca5.ads, s-conca7.adb, s-conca7.ads, s-conca9.adb, s-conca9.ads, rtsfind.ads, s-conca2.adb, s-conca2.ads, s-conca4.adb, s-conca4.ads, s-conca6.adb, s-conca6.ads, s-conca8.adb, s-conca8.ads, s-conca3.adb, s-conca3.ads (Str_Concat_Bounds_x): New functions. * exp_ch4.adb (Expand_Concatenate): Minor code reorganization 2009-04-20 Pascal Obry <obry@adacore.com> * initialize.c (__gnat_initialize): Add braces to kill warning. * adaint.c: Minor reformatting, untabify, remove trailing spaces. From-SVN: r146379
2009-04-20[multiple changes]Arnaud Charlet1-2/+4
2009-04-20 Eric Botcazou <ebotcazou@adacore.com> * adaint.h (__gnat_lwp_self): Declare on Linux. * adaint.c (__gnat_os_filename): Add ATTRIBUTE_UNUSED on 'filename'. 2009-04-20 Robert Dewar <dewar@adacore.com> * exp_ch5.adb, usage.adb, back_end.adb, opt.ads: Implement front-end part of -fpreserve-control-flow switch. From-SVN: r146376
2009-04-20[multiple changes]Arnaud Charlet1-22/+88
2009-04-20 Ed Schonberg <schonberg@adacore.com> * inline.adb (Add_Inlined_Subprogram): Do not place on the back-end list a caller of an inlined subprogram, if the caller itself is not called. 2009-04-20 Pascal Obry <obry@adacore.com> * adaint.c: Disable use of ACL on network drives. 2009-04-20 Arnaud Charlet <charlet@adacore.com> * gnat_ugn.texi: Add examples. From-SVN: r146374
2009-04-17[multiple changes]Arnaud Charlet1-26/+62
2009-04-17 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting 2009-04-17 Pascal Obry <obry@adacore.com> * adaint.c: Add __gnat_use_acl global variable to control use of ACL. From-SVN: r146269
2009-04-17[multiple changes]Arnaud Charlet1-10/+13
2009-04-17 Thomas Quinot <quinot@adacore.com> * exp_ch7.adb: Minor reformatting 2009-04-17 Robert Dewar <dewar@adacore.com> * restrict.adb (Check_Restriction_No_Dependence): Don't check restriction if outside main extended source unit. * sem_ch10.adb (Analyze_With_Clause): Check No_Dependence restriction for parents of child units as well as the child unit itself. 2009-04-17 Bob Duff <duff@adacore.com> * checks.ads: Minor comment fix * exp_aggr.ads: Minor comment fix 2009-04-17 Nicolas Roche <roche@adacore.com> * adaint.c: Improve cross compiler detection and handling. From-SVN: r146236
2009-04-17[multiple changes]Arnaud Charlet1-33/+40
2009-04-17 Eric Botcazou <ebotcazou@adacore.com> * exp_ch4.adb (Expand_Concatenation): Do not use calls at -Os. 2009-04-17 Pascal Obry <obry@adacore.com> * mingw32.h: Add S2WSC and WS2SC macros to convert to/from CurrentCodePage. * adaint.h: Encoding_Unspecified is now defined. Corresponds to the value when no encoding form paramter is set on Text_IO services. * adaint.c: CurrentCodePage new variable on Windows. Use new macros S2WSC and WS2SC instead of the UTF-8 oriented ones. * mkdir.c: Use new macros S2WSC and WS2SC instead of the UTF-8 oriented ones. * initialize.c: Initialize CurrentCodePage depending on GNAT_CODE_PAGE environment variable value. Default is UTF-8. * s-crtl.ads: Filename_Encoding add Unspecified in the enumeration type. fopen and freopen encoding parameter is now set to Unspecified. The default value is in this case UTF-8 (as it was before) but use the new macros that convert to/from the code page set at runtime (CurrentCodePage). * s-fileio.adb: When no encoding specified use Unspecified value. 2009-04-17 Ed Schonberg <schonberg@adacore.com> * atree.adb, atree.ads: Remove dead code. From-SVN: r146235
2009-04-16adaint.h, adaint.c (__gnat_rmdir): New routine.Pascal Obry1-0/+17
2009-04-16 Pascal Obry <obry@adacore.com> * adaint.h, adaint.c (__gnat_rmdir): New routine. Simple wrapper routines used to convert to proper encoding on Windows. * s-crtl.ads: Use __gnat_rmdir instead of direct call to the C library. * g-dirope.adb (Remove_Dir): Fix a bug, the root directory was removed twice. From-SVN: r146176
2009-04-16[multiple changes]Arnaud Charlet1-0/+17
2009-04-16 Thomas Quinot <quinot@adacore.com> * snames.ads-tmpl (Name_Defined): New predefined name for use by the integrated preprocessor. * prep.ads, prep.adb (Setup_Hooks): New subprogram. (Initialize): Split into two subprograms, Initialize (to be called prior to compiler command line processing) and Setup_Hooks (to be called later on when the first source file is loaded). * gprep.adb: Change call to Prep.Initialize to call to Prep.Setup_Hooks. Add call to Prep.Initialize. * sinput-l.adb, prepcomp.adb: Change call to Prep.Initialize to call to Prep.Setup_Hooks. 2009-04-16 Pascal Obry <obry@adacore.com> * adaint.h, adaint.c (__gnat_chdir): New routine. Simple wrapper routines used to convert to proper encoding on Windows. * s-crtl.ads: Use __gnat_chdir instead of direct call to the C library. * a-direct.adb, g-dirope.adb: Use chdir from System.CRTL. From-SVN: r146174
2009-04-16[multiple changes]Arnaud Charlet1-22/+1
2009-04-16 Bob Duff <duff@adacore.com> * exp_ch6.ads, exp_ch6.adb (Is_Build_In_Place_Function_Return): Remove, unused. 2009-04-16 Thomas Quinot <quinot@adacore.com> * sem_ch4.adb: Minor reformatting * adaint.c: Remove junk duplicated code. * sem_ch3.adb: Minor reformatting * exp_dist.adb: Minor comment rewording From-SVN: r146165
2009-04-15[multiple changes]Arnaud Charlet1-0/+35
2009-04-15 Pascal Obry <obry@adacore.com> Add support for Win32 native encoding for delete/rename routines. * adaint.c (__gnat_unlink): New routine. (__gnat_rename): New routine. Simple wrapper routines used to convert to proper encoding on Windows. * s-os_lib.adb: Use __gnat_unlink and __gnat_rename instead of direct call to the C library. * g-sercom-mingw.adb, s-win32.ads: Update Win32 binding. 2009-04-15 Robert Dewar <dewar@adacore.com> * s-tassta.adb: Minor reformatting From-SVN: r146101
2009-04-15adaint.c: Add function __gnat_lwp_self that retrieves the LWP of the current ↵Nicolas Roche1-0/+10
thread. 2009-04-15 Nicolas Roche <roche@adacore.com> * adaint.c: Add function __gnat_lwp_self that retrieves the LWP of the current thread. * s-osinte-linux.ads: Import the __gnat_lwp_self function as lwp_self * s-taprop-linux.adb (Enter_Task): Store the LWP in the TCB From-SVN: r146097
2009-04-10[multiple changes]Arnaud Charlet1-4/+5
2009-04-10 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Pragma, case Task_Name): Do not expand argument of pragma. It will be recopied and analyzed when used in call to Create_Task. * sem_res.adb (Resolve_Call): Clarify use of secondary stack within initialization operations and recognize use of it in procedure calls within init_procs. * exp_ch9.adb (Make_Task_Create_Call): Copy full tree of Task_Name argument, because it may have side-effects. * exp_ch2.adb: Remove obsolete comments on default functions 2009-04-10 Jose Ruiz <ruiz@adacore.com> * adaint.c (RTX section): Do for RTX the same thing as we do for Windows (include ctype.h and define a fallback ISALPHA if IN_RTS). From-SVN: r145882
2009-04-09Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.Jakub Jelinek1-12/+11
From-SVN: r145841
2008-09-25re PR ada/37641 (FILE_WRITE_PROPERTIES is deprecated)Samuel Tardieu1-1/+1
gcc/ada/ PR ada/37641 * adaint.c (__gnat_set_non_writable): Use FILE_WRITE_EA instead of deprecated FILE_WRITE_PROPERTIES. From-SVN: r140665