Commit Graph

77 Commits

Author SHA1 Message Date
Arnaud Charlet
ba759acdc8 [multiple changes]
2011-09-06  Yannick Moy  <moy@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): Call
	Set_Corresponding_Aspect when creating pragma from aspect.
	(Add_Predicates): Use new field Corresponding_Aspect.
	* sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
	name when present, for the purpose of issuing error messages;
	remove local procedure Error_Pragma_Arg_Alternate_Name.
	* sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
	N_Pragma node.
	(From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
	N_Pragma node.

2011-09-06  Robert Dewar  <dewar@adacore.com>

	* checks.adb, s-except.ads, g-socket.adb: Minor reformatting.

2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Build_Heap_Allocator): Add new
	local variable Desig_Typ. Code and comment reformatting. Add
	machinery to ensure that the allocation uses a fat pointer when
	the type of the return object is a constrained array and the
	function return type is an unconstrained array.

2011-09-06  Vincent Celier  <celier@adacore.com>

	* make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
	parameters in subprograms.

2011-09-06  Arnaud Charlet  <charlet@adacore.com>

	* s-taprop-mingw.adb (Finalize_TCB): Fix typo.

2011-09-06  Thomas Quinot  <quinot@adacore.com>

	* s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
	(System.Tasking.Primitive_Operations.Specific.Delete): Remove
	subprogram.
	(System.Tasking.Primitive_Operations.Specific.Set): If argument
	is null, destroy task specific data, to make API consistent with
	other platforms, and thus compatible with the shared version
	of s-tpoaal.adb.
	(System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
	Document the above assumption.

From-SVN: r178583
2011-09-06 12:43:17 +02:00
Arnaud Charlet
f4f92d9d59 [multiple changes]
2011-09-06  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
	variable for type of return value when return type is
	unconstrained and context is an assignment.

2011-09-06  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
	class-wide operation if expansion is not enabled.

2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>

	* checks.adb (Apply_Scalar_Range_Check): Deal with access
	type prefix.

2011-09-06  Yannick Moy  <moy@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications, case
	Aspect_Invariant): Do not issue error at this point on illegal
	pragma placement, as this is checked later on when analyzing
	the corresponding pragma.
	* sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
	similar to Error_Pragma_Arg, except the source name of the
	aspect/pragma to use in warnings may be equal to parameter
	Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
	message to distinguish source name of pragma/aspect, and whether
	the illegality resides in the type being public, or being private
	without a public declaration

2011-09-06  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
	size check (fd_set is implemented differently on that platform).

2011-09-06  Thomas Quinot  <quinot@adacore.com>

	* s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
	s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
	s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
	s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
	(ATCB_Allocation): New subpackage of
	System.Tasking.Primitive_Operations, shared across all targets
	with full tasking runtime.
	(ATCB_Allocation.New_ATCB): Moved there (from target specific
	s-taprop bodies).
	(ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
	taking care of establishing a local temporary ATCB if the one
	being deallocated is Self, to avoid a reference to the freed
	ATCB in Abort_Undefer.

2011-09-06  Thomas Quinot  <quinot@adacore.com>

	* s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
	terminated, mark it for deallocation upon termination.
	(Terminate_Task): Call Free_Task again if the task is marked
	for automatic deallocation upon termination.

From-SVN: r178582
2011-09-06 12:35:25 +02:00
Arnaud Charlet
516785cc7f [multiple changes]
2011-09-06  Robert Dewar  <dewar@adacore.com>

	* g-socket.adb: Minor reformatting

2011-09-06  Javier Miranda  <miranda@adacore.com>

	* ali.adb (Scan_ALI): Add missing support to load references of
	entities imported from other languages.
	* ali.ads (Xref_Record): Adding new fields to store the language and
	name of an imported entity.
	* lib-xref.adb (Output_Import_Export_Info): Fix typo
	in comment.

2011-09-06  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
	is allowed on a full type declaration if it is the completion of
	a private declarations.
	* sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
	aspect is allowed on a full type declaration in the private part
	of a package.

From-SVN: r178577
2011-09-06 11:32:56 +02:00
Arnaud Charlet
9669194386 [multiple changes]
2011-09-06  Robert Dewar  <dewar@adacore.com>

	* sem_ch8.ads: Minor reformatting

2011-09-06  Thomas Quinot  <quinot@adacore.com>

	* s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
	Guard against socket values that are not in [0;FD_SETSIZE[

From-SVN: r178576
2011-09-06 11:28:33 +02:00
Arnaud Charlet
607d0635d8 [multiple changes]
2011-08-01  Arnaud Charlet  <charlet@adacore.com>

	* g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
	g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
	s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
	g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
	g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
	g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
	g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
	g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
	g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
	g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
	g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
	s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
	g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
	s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
	g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
	g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
	g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
	g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
	g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
	g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
	s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
	s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
	a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
	s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
	s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
	g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
	g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
	g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
	g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
	g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
	g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
	s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
	s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
	g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
	g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
	s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
	s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
	g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
	g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
	g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
	s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
	g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
	g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
	g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
	s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
	g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
	g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
	g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
	s-osinte-mingw.ads: Update to GPLv3 run-time license.
	Use GNAT instead of GNARL.

2011-08-01  Bob Duff  <duff@adacore.com>

	* a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
	a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
	a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
	reformatting.

2011-08-01  Yannick Moy  <moy@adacore.com>

	* debug.adb (d.D) reverve flag for the SPARK mode
	(d.E) reverve flag for SPARK generation mode
	(d.F) reverve flag for Why generation mode
	* opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode, 
	ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
	functions which return True when the corresponding modes are set
	(Formal_Language): return "spark" or "alfa" when in formal verification
	mode.
	* sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
	Error_Msg to prefix the error message with a tag giving the formal
	language
	(Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
	message with a tag giving the formal language
	* sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
	block statement
	(Analyze_Case_Statement): issue error in formal mode on case statement
	with a single "others" case alternative
	(Analyze_Exit_Statement): issue errors in formal mode on exit
	statements which do not respect SPARK restrictions
	(Analyze_Goto_Statement): issue error in formal mode on goto statement
	(Check_Unreachable_Code): always issue an error (not a warning) in
	formal mode on unreachable code (concerns both code after an infinite
	loop and after an unconditional jump, both not allowed in SPARK)
	* sem_ch6.adb (Analyze_Return_Statement): add call to
	Set_Return_Present for a procedure containing a return statement
	(already done for functions in Analyze_Function_Return)
	(Analyze_Function_Return): issue error in formal mode on extended
	return or if return is not last statement in function
	(Check_Missing_Return): issue error in formal mode if function does
	not end with return or if procedure contains a return
	* sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
	function to detect if there is an inner scope of its parameter S which
	is a loop.

2011-08-01  Thomas Quinot  <quinot@adacore.com>

	* sem_ch6.ads: Minor reformatting.

From-SVN: r177040
2011-08-01 17:05:02 +02:00
Ralf Wildenhues
308e6f3a18 Fix typos in gcc/ada.
gcc/ada/:
	* projects.texi: Fix typos.
	* gnat_rm.texi: Likewise.
	* gnat_ugn.texi: Likewise.
	* sem_util.adb: Fix typo in variable, typos in comments.
	* a-btgbso.adb: Fix typos in comments.
	* a-cbdlli.adb, a-cbhase.ads, a-cdlili.adb, a-cobove.adb,
	a-coinve.adb, a-convec.adb, a-direct.ads, a-strunb-shared.adb,
	a-strunb-shared.ads, a-stuten.ads, a-stwiun-shared.adb,
	a-stwiun-shared.ads, a-stzunb-shared.adb, a-stzunb-shared.ads,
	a-suenco.adb, a-suenst.adb, a-suewst.adb, a-suezst.adb, ali.ads,
	aspects.ads, atree.ads, binde.adb, bindgen.adb, checks.adb,
	checks.ads, einfo.ads, err_vars.ads, errout.adb, errout.ads,
	exp_aggr.adb, exp_attr.adb, exp_cg.adb, exp_ch3.adb,
	exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb,
	exp_dbug.ads, exp_disp.adb, exp_fixd.ads, freeze.adb,
	g-altive.ads, g-comlin.ads, g-excact.ads, g-mbdira.adb,
	g-sechas.ads, g-sehash.ads, g-sha1.ads, g-sha224.ads,
	g-sha256.ads, g-sha384.ads, g-sha512.ads, g-shsh32.ads,
	g-shsh64.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
	gcc-interface/decl.c, gcc-interface/trans.c,
	gcc-interface/utils2.c, gnat1drv.adb, init.c, inline.adb,
	link.c, locales.c, make.adb, mingw32.h, namet.ads, osint.adb,
	par-ch12.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb,
	par-prag.adb, par.adb, par_sco.adb, prepcomp.adb,
	prj-conf.ads, prj-dect.adb, prj-env.adb, prj-env.ads,
	prj-nmsc.adb, prj-tree.ads, prj-util.ads, prj.adb, prj.ads,
	s-auxdec-vms-alpha.adb, s-auxdec-vms_64.ads, s-oscons-tmplt.c,
	s-osinte-vxworks.ads, s-osprim-mingw.adb, s-regexp.adb,
	s-stusta.adb, s-taprop-mingw.adb, s-taprop-solaris.adb,
	scn.adb, scos.ads, sem.adb, sem_aggr.adb, sem_attr.adb,
	sem_aux.adb, sem_aux.ads, sem_ch12.adb, sem_ch12.ads,
	sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
	sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb,
	sem_disp.ads, sem_eval.adb, sem_intr.adb, sem_prag.adb,
	sem_res.adb, sem_scil.adb, sem_util.ads, sem_warn.adb,
	sem_warn.ads, sinfo.ads, socket.c, styleg.adb, switch.ads,
	sysdep.c, tb-alvxw.c, xoscons.adb: Likewise.

From-SVN: r168082
2010-12-20 07:26:57 +00:00
Joel Sherrill
0eeccfa3ff g-socket.adb: Move pragma to disable warnings in case multiple errnos are not defined by target.
2010-09-28  Joel Sherrill <joel.sherrill@oarcorp.com>

	* g-socket.adb: Move pragma to disable warnings in case
	multiple errnos are not defined by target.

From-SVN: r164753
2010-09-30 16:01:30 +00:00
Arnaud Charlet
48b351d924 [multiple changes]
2010-06-18  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb, g-socket.ads (Null_Selector): New object.

2010-06-18  Pascal Obry  <obry@adacore.com>

	* gnat_ugn.texi: Minor clarification.

2010-06-18  Emmanuel Briot  <briot@adacore.com>

	* prj-nmsc.adb (Find_Source_Dirs): Minor refactoring to avoid duplicate
	code when using the project dir as the source dir.
	(Search_Directories): use the normalized name for the source directory,
	where symbolic names have potentially been resolved.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb (Expand_N_Conditional_Expression): Clear Actions field
	when we create N_Expression_With_Actions node.
	(Expand_Short_Circuit): Ditto.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb: Minor reformatting.

From-SVN: r160975
2010-06-18 12:07:36 +02:00
Thomas Quinot
e9672ebe5d g-socket.adb, [...] (Check_Selector): Make Selector an IN parameter rather than IN OUT.
2010-06-18  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb, g-socket.ads (Check_Selector): Make Selector an IN
	parameter rather than IN OUT.

From-SVN: r160965
2010-06-18 10:59:39 +02:00
Thomas Quinot
3a13e78582 socket.c: Fix wrong condition in #ifdef
2010-06-14  Thomas Quinot  <quinot@adacore.com>

	* socket.c: Fix wrong condition in #ifdef
	* g-socket.adb, g-sothco.ads: Functions imported from socket.c that
	take or return char* values can't use Interfaces.C.Strings.chars_ptr,
	because on VMS this type is a 32-bit pointer which is not compatible
	with the default for C pointers for code compiled with gcc on that
	platform.

From-SVN: r160735
2010-06-14 14:56:35 +02:00
Arnaud Charlet
001c7783c4 [multiple changes]
2010-06-14  Ed Schonberg  <schonberg@adacore.com>

	* sem_util (Is_VMS_Operator): New predicate to determine whether an
	operator is an intrinsic operator declared in the DEC system extension.
	* sem_res.adb (Resolve_Logical_Op): operation is legal on signed types
	if the operator is a VMS intrinsic.
	* sem_eval.adb (Eval_Logical_Op): Operation is legal and be
	constant-folded if the operands are signed and the operator is a VMS
	intrinsic.

2010-06-14  Robert Dewar  <dewar@adacore.com>

	* g-socket.adb, gnatcmd.adb: Minor reformatting

From-SVN: r160734
2010-06-14 14:51:24 +02:00
Arnaud Charlet
4a214958d1 [multiple changes]
2010-06-14  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (End_Use_Type): Before indicating that an operator is not
	use-visible, check whether it is a primitive for more than one type.

2010-06-14  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb (Copy_And_Swap): Copy Has_Pragma_Unmodified flag.

	* sem_ch7.adb (Preserve_Full_Attributes): Preserve
	Has_Pragma_Unmodified flag.

2010-06-14  Thomas Quinot  <quinot@adacore.com>

	* g-sttsne-locking.adb, g-sttsne-locking.ads, g-sttsne.ads,
	g-sttsne-vxworks.adb, g-sttsne-dummy.ads: Removed. Mutual exclusion is
	now done in GNAT.Sockets if necessary.
	* gsocket.h, g-socket.adb, g-sothco.ads (GNAT.Sockets.Get_XXX_By_YYY):
	Ensure mutual exclusion for netdb operations if the target platform
	requires it.
	(GNAT.Sockets.Thin_Common): New binding for getXXXbyYYY, treating struct
	hostent as an opaque type to improve portability.
	* s-oscons-tmplt.c, socket.c: For the case of Vxworks, emulate
	gethostbyYYY using proprietary VxWorks API so that a uniform interface
	is available for the Ada side.
	* gcc-interface/Makefile.in: Remove g-sttsne-*
	* gcc-interface/Make-lang.in: Update dependencies.

2010-06-14  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (Mapping_File): New function.

From-SVN: r160731
2010-06-14 14:39:55 +02:00
Joel Sherrill
8c70969598 g-socket.adb: A target can have multiple missing errno's.
2010-04-15  Joel Sherrill <joel.sherrill@oarcorp.com>

	* g-socket.adb: A target can have multiple missing errno's.  This
	will result in multiple errno's being defined as -1.  Because of this
	we can not use a case but must use a series of if's to avoid 
	a duplicate case error in GNAT.Sockets.Resolve_Error.

From-SVN: r158382
2010-04-15 15:39:47 +00:00
Arnaud Charlet
b7d5e87b07 [multiple changes]
2009-12-01  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads: Clarify use of Is_Private_Primitive.
	* sem_ch6.adb (Analyze_Subprogram_Declaration): An operation is a
	private primitive operation only if it is declared in the scope of the
	private controlling type.
	* exp_ch9.adb (Build_Wrapper_Spec): Build wrappers for private
	protected operations as well.

2009-12-01  Arnaud Charlet  <charlet@adacore.com>

	* gnat1drv.adb (Adjust_Global_Switches): Disable front-end
	optimizations in CodePeer mode, to keep the tree as close to the source
	code as possible, and also to avoid inconsistencies between trees when
	using different optimization switches.

2009-12-01  Thomas Quinot  <quinot@adacore.com>

	* scos.ads: Updated specification of source coverage obligation
	information.

2009-12-01  Thomas Quinot  <quinot@adacore.com>

	* g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb,
	a-ststio.adb, s-commun.adb, s-commun.ads, g-socket.adb,
	g-socket.ads (System.Communications.Last_Index): For the case where no
	element has been transferred and Item'First =
	Stream_Element_Offset'First, raise CONSTRAINT_ERROR.

2009-12-01  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Install_Siblings): A private with_clause on some child
	unit U in an ancestor of the current unit must be ignored if the
	current unit has a regular with_clause on U.

From-SVN: r154868
2009-12-01 10:52:51 +01:00
Arnaud Charlet
1dfddbb4d3 [multiple changes]
2009-11-30  Thomas Quinot  <quinot@adacore.com>

	* s-crtl.ads, g-stseme.adb, s-fileio.adb (System.CRTL.strerror): Change
	return type to Interfaces.C.Strings.chars_ptr to eliminate need for
	dubious unchecked conversion at call sites.
	* s-errrep.adb, s-errrep.ads, Makefile.rtl (System.Error_Reporting):
	Remove obsolete, unused runtime unit.
	* gcc-interface/Make-lang.in: Update dependencies.
	* gcc-interface/Makefile.in: Remove VMS specialization of s-crtl, not
	required anymore.

2009-11-30  Vincent Celier  <celier@adacore.com>

	* gnatlink.adb: Delete an eventual existing executable file, in case it
	is a symbolic link, to avoid modifying the target of the symbolic link.

2009-11-30  Bob Duff  <duff@adacore.com>

	* socket.c: Add accessor functions for struct servent.
	* g-sothco.ads (Servent): Declare interfaces to C accessor functions
	for struct servent.
	* g-socket.adb (To_Service_Entry): Use accessor functions for struct
	servent.

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* g-arrspl.adb: Minor reformatting
	* g-dyntab.adb: Add missing pragma Compiler_Unit

From-SVN: r154769
2009-11-30 11:07:32 +01:00
Thomas Quinot
5da0f2d96b s-commun.adb, [...]: New internal support unit...
2009-11-30  Thomas Quinot  <quinot@adacore.com>

	* s-commun.adb, s-commun.ads: New internal support unit,
	allowing code sharing between GNAT.Sockets and
	GNAT.Serial_Communication.
	* g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb,
	g-socket.adb (GNAT.Sockets.Last_Index): Move to System.Communication.
	(GNAT.Serial_Communication.Read): Handle correctly the case where no
	data was read, and Buffer'First = Stream_Element_Offset'First.
	* Makefile.rtl: Add entry for s-commun
	* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-stseme.adb, g-socthi-mingw.ads,
	g-socthi.adb, g-socthi.ads (GNAT.Sockets.Thin.Socket_Error_Message):
	Reimplement in terms of System.CRTL.strerror.

From-SVN: r154758
2009-11-30 10:31:28 +01:00
Arnaud Charlet
f5e976a5b5 [multiple changes]
2009-09-18  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Is_Open): New function indicating whether a
	Selector_Type object is open.

2009-09-18  Vincent Celier  <celier@adacore.com>

	* osint-c.adb (Create_Output_Library_Info): Make sure that the ALI file
	is deleted before creating it.

2009-09-18  Robert Dewar  <dewar@adacore.com>

	* bindgen.adb: Minor reformatting

From-SVN: r151842
2009-09-18 15:50:26 +02:00
Bob Duff
0714aafa1f g-socket.ads: Document the fact that Close_Selector has no effect on a closed selector.
2009-09-17  Bob Duff  <duff@adacore.com>

	* g-socket.ads: Document the fact that Close_Selector has no effect on
	a closed selector.
	* g-socket.adb: Raise an exception when a Selector that should be open
	is closed.
	(Check_Selector): Declare RSig as a constant rather than a renames,
	less confusing.

From-SVN: r151798
2009-09-17 12:58:39 +02:00
Arnaud Charlet
a73734f5f5 [multiple changes]
2009-07-29  Robert Dewar  <dewar@adacore.com>

	* exp_atag.ads, exp_atag.adb, s-tasini.adb, s-soflin.ads,
	exp_disp.adb, g-socket.adb: Minor reformatting

2009-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch7.adb (New_Private_Type): Create class-wide type after other
	attributes have been established, so that they are all inherited by the
	class-wide type.
	* sem_cat.adb (Validate_Remote_Access_Object_Type_Declaration): Handle
	properly named subtypes of class-wide types.

From-SVN: r150201
2009-07-29 10:51:53 +02:00
Arnaud Charlet
53b10ce921 [multiple changes]
2009-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Check_Overriding_Indicator): Handle properly overriding
	indicators on user-defined operators.

2009-07-29  Vadim Godunko  <godunko@adacore.com>

	* g-socket.adb (Receive_Vector): Add comment.

From-SVN: r150200
2009-07-29 10:44:57 +02:00
Arnaud Charlet
056b0f6f80 [multiple changes]
2009-07-28  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Add section about gnatcheck rule exemption.

2009-07-28  Vadim Godunko  <godunko@adacore.com>

	* s-oscons-tmplt.c: Define _XOPEN_SOURCE on Linux, otherwise IOV_MAX is
	not defined by limits.h.

	* g-socket.adb (Receive_Vector): Use minimum length from user's vector
	length and maximum supported length of data vector.

2009-07-28  Gary Dismukes  <dismukes@adacore.com>

	* usage.adb: Inhibit printing gcc-specific switches for AAMP target.
	* make.adb: Call Get_Target_Parameters before calling Usage so that
	VM_Target and AAMP_On_Target will be set.

From-SVN: r150147
2009-07-28 10:15:44 +02:00
Arnaud Charlet
e1aca34380 [multiple changes]
2009-07-22  Ed Falis  <falis@adacore.com>

	* s-vxwext-kernel.adb, s-vxwext-kernel.ads: Replace use of taskStop
	with taskSuspend.

2009-07-22  Arnaud Charlet  <charlet@adacore.com>

	* adadecode.c: Make this file compilable outside of GCC.

2009-07-22  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb, g-socket.ads (Check_Selector): Make sure that
	(partially) default-initialized socket sets are handled properly by
	clearing their Set component.

2009-07-22  Bob Duff  <duff@adacore.com>

	* gnat_ugn.texi: Clarify the -gnatVx (validity checking) switches.

From-SVN: r149939
2009-07-22 17:13:23 +02:00
Arnaud Charlet
9d0c37619f [multiple changes]
2009-07-22  Thomas Quinot  <quinot@adacore.com>

	* sem_util.adb, sem_ch10.adb: Minor reformatting

	* g-socket.adb (Receive_Socket, recvfrom(2) variant): Apply required
	special handling for the case of no data received and Item'First =
	Stream_Element_Offset'First.
	(Last_Index): New subprogram factoring the above special handling
	over the various locations where it is required.

2009-07-22  Arnaud Charlet  <charlet@adacore.com>

	* gnat1drv.adb (Gnat1drv): Also disable division by zero and alignment
	checks in CodePeer_Mode.
	* gcc-interface/Make-lang.in: Update dependencies.

2009-07-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb: Improve error message.

	* sem_ch13.adb: If Ignore_Rep_Clauses is enabled, do a minimal analysis
	of an address representation clause.
	* freeze.adb (Freeze_Static_Object): An local imported object is legal
	if it has an address clause.

From-SVN: r149926
2009-07-22 12:39:30 +02:00
Arnaud Charlet
019578498e [multiple changes]
2009-07-13  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: The gnatf switch no longer is needed to get full
	details on unsupported constructs.

	* rtsfind.adb: Remove references to All_Errors_Mode, give errors
	unconditionally.

	* s-trafor-default.adb: Correct some warnings

	* s-valwch.adb, a-calend.adb, freeze.adb, prj.ads, s-vmexta.adb,
	sem.adb, sem_ch10.adb, sem_ch6.adb, sem_disp.adb, vxaddr2line.adb:
	Minor reformatting.

	* par-ch4.adb (Conditional_Expression): Capture proper location for
	conditional expression, should point to IF.

	* s-tassta.adb, a-wtdeau.adb, s-tasren.adb, s-arit64.adb, s-imgdec.adb,
	s-direio.adb, s-tpobop.adb, g-socket.adb, s-tposen.adb, s-taskin.adb,
	g-calend.adb, s-regpat.adb, s-scaval.adb, g-catiio.adb: Minor code
	reorganization (use conditional expressions).

2009-07-13  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.adb (Remove_Side_Effects): If the expression is a call to a
	build-in-place function that returns an inherently limited type (not
	just a task type) create proper object declaration so that extra
	build-in-place actuals are properly added to the call.

From-SVN: r149551
2009-07-13 10:39:28 +02:00
Arnaud Charlet
7a5debc9fc [multiple changes]
2009-07-09  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Check_Selector): Do not create local copies of the
	socket sets on the stack.

2009-07-09  Vasiliy Fofanov  <fofanov@adacore.com>

	* gnat_ugn.texi: Add missing VMS translations.

From-SVN: r149414
2009-07-09 12:32:08 +02:00
Robert Dewar
d6533e74c2 exp_ch6.adb, [...]: Minor reformatting
2009-06-25  Robert Dewar  <dewar@adacore.com>

	* exp_ch6.adb, g-socket.ads, g-socket.adb, sem_ch3.adb: Minor
	reformatting

From-SVN: r148928
2009-06-25 10:17:18 +02:00
Arnaud Charlet
e1f3cb584d [multiple changes]
2009-06-24  Robert Dewar  <dewar@adacore.com>

	* prj-nmsc.adb, prj-nmsc.ads, prj-proc.adb, prj.adb: Minor reformatting

	* a-strsea.adb (Count): Avoid local copy on stack, speed up unmapped
	case.
	(Index): Ditto.

2009-06-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_One_Call): Check that at least one actual is
	present when checking whether a call may be interpreted as an indexing
	of the result of a call.

	* exp_ch9.adb (Expand_N_Subprogram_Declaration): Place the generated
	body for a null procedure on the freeze actions for the procedure, so
	that it will be analyzed at the proper place without premature freezing
	of actuals.

	* sem_ch3.adb (Check_Completion): Code cleanup. 
	Do not diagnose a null procedure without a body, if previous errors
	have disabled expansion.

2009-06-24  Doug Rupp  <rupp@adacore.com>

	* init.c [VMS] Resignal C$_SIGKILL

2009-06-24  Ed Falis  <falis@adacore.com>

	* s-vxwext.adb, s-vxwext-kernel.adb: Add s-vxwext body for VxWorks 5
	Define ERROR in body for VxWorks 6 kernel

2009-06-24  Pascal Obry  <obry@adacore.com>

	* g-socket.adb, g-socket.ads: Fix possible unexpected constraint error
	in [Send/Receive]_Socket.

From-SVN: r148905
2009-06-24 12:11:52 +02:00
Arnaud Charlet
f26d5cd3cb [multiple changes]
2009-06-19  Thomas Quinot  <quinot@adacore.com>

	* i-vxwoio.ads: Add comments

2009-06-19  Thomas Quinot  <quinot@adacore.com>

	* socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
	g-socthi.adb, g-socthi.ads, g-socket.adb, g-sothco.ads
	(GNAT.Sockets.Thin.C_Ioctl): Rename to Socket_Ioctl.
	(GNAT.Sockets.Thin.Socket_Ioctl): Use new function
	Thin_Common.Socket_Ioctl.
	(GNAT.Sockets.Thin_Common.Socket_Ioctl): Binding to new C wrapper
	__gnat_socket_ioctl.
	(__gnat_socket_ioctl): Wrapper for ioctl(2) called with a single int*
	argument after the file descriptor and request code.

2009-06-19  Robert Dewar  <dewar@adacore.com>

	* checks.adb: Minor reformatting

From-SVN: r148694
2009-06-19 12:47:49 +02:00
Arnaud Charlet
3743d5bde6 [multiple changes]
2009-05-06  Gary Dismukes  <dismukes@adacore.com>

	* sem_aggr.adb (Resolve_Record_Aggregate): In step 5, get the
	Underlying_Type before retrieving the type definition for gathering
	components, to account for the case where the type is private.

2009-05-06  Tristan Gingold  <gingold@adacore.com>

	* g-comlin.ads: Fix minor typos (Getopt instead of Get_Opt).

2009-05-06  Thomas Quinot  <quinot@adacore.com>

	* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-socthi-mingw.adb g-socthi-mingw.ads,
	g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, g-socket.adb
	(GNAT.Sockets.Thin.C_Sendmsg, GNAT.Sockets.Thin.C_Recvmsg,
	Windows versions): Fix incorrect base
	address of Iovec (it's Msg_Iov, not Msg_Iov'Address).
	(GNAT.Sockets.Thin.C_Sendto, GNAT.Sockets.Thin.C_Recvfrom): Use a
	System.Address for the To parameter instead of a Sockaddr_In_Access, to
	achieve independance from AF_INET family, and also to allow this
	parameter to be retrieved from a Msghdr for the Windows case where
	these routines are used to implement C_Sendmsg and C_Recvmsg.

2009-05-06  Bob Duff  <duff@adacore.com>

	* g-expect.adb, g-expect.ads: Minor reformatting

	* sdefault.ads: Minor comment fix

	* g-expect-vms.adb: Minor reformatting

	* table.ads, table.adb (Append_All): New convenience procedure for
	appending a whole array.

	* comperr.adb (Compiler_Abort): Mention the -gnatd.n switch in the bug
	box message. Call Osint.Dump_Source_File_Names to print out the file
	list, instead of rummaging around in various data structures.

	* debug.adb: New switch -gnatd.n, to print source file names as they
	are read.

	* alloc.ads: Add parameters for Osint.File_Name_Chars.

	* osint.ads, osint.adb (Dump_Source_File_Names): New procedure to print
	out source file names during a "bug box".
	(Include_Dir_Default_Prefix): Use memo-izing to avoid repeated new/free.
	(Read_Source_File): Print out the file name, if requested via -gnatd.n.
	If it's not part of the runtimes, store it for later printing by
	Dump_Source_File_Names.

2009-05-06  Javier Miranda  <miranda@adacore.com>

	* gnat_rm.texi (CPP_Constructor): Avoid duplication of the
	documentation and add reference to the GNAT user guide for further
	details.

2009-05-06  Javier Miranda  <miranda@adacore.com>

	* gnat_ugn.texi: Complete documentation for CPP_Constructor and remove
	also wrong examples that use extension aggregates.

2009-05-06  Albert Lee  <lee@adacore.com>

	* s-oscons-tmplt.c (System.OS_Constants): Do not use special definition
	of Msg_Iovlen_T for VMS.

From-SVN: r147148
2009-05-06 10:11:41 +02:00
Arnaud Charlet
107b023cee [multiple changes]
2009-04-29  Vincent Celier  <celier@adacore.com>

	* prj-part.adb: Minor comment update

2009-04-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb (Resolve_Record_Aggregate): handle properly
	box-initialized records with discriminated subcomponents that are
	constrained by discriminants of enclosing components. New subsidiary
	procedures Add_Discriminant_Values, Propagate_Discriminants.

2009-04-29  Arnaud Charlet  <charlet@adacore.com>

	* g-socket.adb: Code clean up.

From-SVN: r146976
2009-04-29 17:25:01 +02:00
Arnaud Charlet
51ec70b8be [multiple changes]
2009-04-29  Arnaud Charlet  <charlet@adacore.com>

	* gnat_ugn.texi: Update some documentation about interfacing with C++
	Mention -fkeep-inline-functions.

	* gnat_ugn.texi: Minor edits

2009-04-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb (Resolve_Record_Aggregate): When building an aggregate
	for a defaulted component of an enclosing aggregate, inherit the type
	from the component declaration of the enclosing type. 

2009-04-29  Albert Lee  <lee@adacore.com>

	* g-socthi-vms.ads, g-socthi-vxworks.ads, s-oscons-tmplt.c,
	g-socthi-mingw.ads, g-socthi.ads, g-socket.adb, g-sothco.ads
	(System.OS_Constants): New type Msg_Iovlen_T which follows whether the
	msg_iovlen field in struct msghdr is 32 or 64 bits wide.
	Relocate the Msghdr record type from GNAT.Sockets.Thin to
	GNAT.Sockets.Common, and use System.OS_Constants.Msg_Iovlen_T as the
	type for the Msg_Iovlen field.

From-SVN: r146969
2009-04-29 15:47:42 +02:00
Arnaud Charlet
ac72c9c537 [multiple changes]
2009-04-29  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch3.adb (Stream_Operation_OK): Return True for limited interfaces
	(other conditions permitting), so that abstract stream subprograms will
	be declared for them.

2009-04-29  Bob Duff  <duff@adacore.com>

	* g-expect.adb (Expect_Internal): Fix check for overfull buffer.

	* g-expect.ads: Minor comment fixes.

2009-04-29  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb, lib-xref.adb (Check_Dispatching_Operation): if the
	dispatching operation is a body without previous spec, update the list
	of primitive operations to ensure that cross-reference information is
	up-to-date.

2009-04-29  Albert Lee  <lee@adacore.com>

	* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
	g-socthi.adb, g-socthi.ads, g-socket.adb, g-socket.ads
	(GNAT.Sockets.Thin.C_Readv,
	GNAT.Sockets.Thin.C_Writev): Remove unused subprograms.
	(GNAT.Sockets.Thin.C_Recvmsg,
	GNAT.Sockets.Thin.C_Sendmsg): New bindings to call recvmsg(2) and
	sendmsg(2).  
	(GNAT.Sockets.Receive_Vector, GNAT.Sockets.Send_Vector): Use
	C_Recvmsg/C_Sendmsg rather than Readv/C_Writev.

From-SVN: r146949
2009-04-29 12:49:15 +02:00
Arnaud Charlet
9013065bc0 [multiple changes]
2009-04-20  Javier Miranda  <miranda@adacore.com>

	* einfo.ads, einfo.adb (Is_Underlying_Record_View): New subprogram
	(Set_Is_Underlying_Record_View): New subprogram

	* sem_aggr.adb (Discr_Present, Resolve_Record_Aggregate): In case of
	private types with unknown discriminants use the underlying record view
	if available.

	* sem_ch3.adb (Build_Derived_Private_Type): Enable construction of the
	underlying record view in the full view of private types whose parent
	has unknown discriminants.
	(Build_Derived_Record_Type): Avoid generating the class-wide entity
	associated with an underlying record view.
	(Derived_Type_Declaration): Avoid deriving parent primitives in
	underlying record views.

	* sem_ch6.adb (Check_Return_Subtype_Indication): Add support for
	records with unknown discriminants.

	* sem_type.adb (Covers): Handle underlying record views.
	(Is_Ancestor): Add support for underlying record views.

	* exp_attr.adb (Expand_Attribute): Expand attribute 'size into a
	dispatching call if the type of the target object is tagged and has
	unknown discriminants.

	* exp_aggr.adb (Resolve_Record_Aggregate): Add support for records with
	unknown discriminants.

	* exp_disp.adb (Build_Dispatch_Tables): Avoid generating dispatch
	tables for internally built underlying record views.

	* sprint.adb (sprint_node_actual): Improve output of aggregates with an
	empty list of component associations.

2009-04-20  Thomas Quinot  <quinot@adacore.com>

	* sem_ch10.adb: Minor reformatting

	* socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.ads,
	g-socthi-mingw.ads, g-socthi.ads, g-socket.adb
	(GNAT.Sockets.Inet_Addr): Do not use non-portable inet_aton, instead use
	standard inet_pton API (and emulate it on platforms that do not
	support it).
	(GNAT.Sockets.Thin.Inet_Pton, VMS case): Implement in terms of
	DECC$INET_ADDR, imported in Ada.
	(GNAT.Sockets.Thin.Inet_Pton, VxWorks and Windows cases): Use C
	implementation provided by GNAT runtime.
	(__gnat_inet_pton): C implementation of inet_pton(3) for VxWorks and
	Windows.

From-SVN: r146391
2009-04-20 12:18:48 +02:00
Arnaud Charlet
c09a557e3a [multiple changes]
2009-04-20  Thomas Quinot  <quinot@adacore.com>

	* sem_type.adb, ali.adb, erroutc.adb: Minor code reorganization
	(no behaviour change): Use Append instead of Increment_Last followed
	by assignment.

2009-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate the
	declarations of all primitives associated with dispatching asynchronous,
	conditional and timed selects when dispaching calls are forbidden and
	select statements are not allowed (such as in Ravenscar).
	(Predefined_Primitive_Bodies): Ditto for bodies.

	* exp_disp.ad (Make_DT): Do not create and populate the
	Select_Specific_Data of the dispatch table when dispatching calls are
	forbidden and select statements are not allowed (such as in Ravenscar).

2009-04-20  Robert Dewar  <dewar@adacore.com>

	* a-tifiio.adb: Minor reformatting

2009-04-20  Thomas Quinot  <quinot@adacore.com>

	* g-socthi-vms.adb, g-socket.adb, g-socket.ads: inet_aton(3), unlike
	other C library functions, report *failure* with a zero status, and
	success with a non-zero status.

2009-04-20  Bob Duff  <duff@adacore.com>

	* sem.ads, sem.adb (Walk_Library_Items): New generic procedure.
	(Semantics): After analyzing each unit, Append it to the
	Comp_Unit_List, if appropriate.

	* gnat1drv.adb (Check_Library_Items): New procedure for debugging
	purposes.
	(Gnat1drv): Correct comment regarding Back_End_Mode.

2009-04-20  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat_ugn.texi: Add documentation for -fno-inline-small-functions.

From-SVN: r146389
2009-04-20 12:04:20 +02:00
Thomas Quinot
5e39baa64c 2009-04-20 Thomas Quinot <quinot@adacore.com>
* g-socket.adb, g-socket.ads, g-socthi-mingw.ads, g-socthi-vms.adb,
	g-socthi-vms.ads, g-socthi-vxworks.ads, g-socthi.ads
	(GNAT.Sockets.Thin.C_Inet_Addr): Remove.
	(GNAT.Sockets.Thin.Inet_Aton): New function, imported from C library
	except for VMS where it is reimplemented in Ada using DECC$INET_ADDR.
	(GNAT.Sockets.Inet_Addr): Use inet_aton(3) instead of inet_addr(3).

	* debug.adb: Fix typo

	* gnat_rm.texi: Minor doc fix.

	* sem_ch7.adb, freeze.adb: Minor reformatting

From-SVN: r146387
2009-04-20 11:42:48 +02:00
Arnaud Charlet
d7f9440126 [multiple changes]
2009-04-20  Bob Duff  <duff@adacore.com>

	* rtsfind.adb: Minor comment fix

2009-04-20  Robert Dewar  <dewar@adacore.com>

	* exp_aggr.adb: Minor reformatting
	Minor code reorganization (use Nkind_In)

	* g-socket.adb: Minor reformatting

	* g-socket.ads: Minor comment fix

	* s-auxdec.ads: Minor comment and organization update.

	* s-auxdec-vms_64.ads: Minor comment and organization update.

	* sem_ch10.adb: Minor addition of ??? comment

	* sem_disp.adb: Minor reformatting

From-SVN: r146375
2009-04-20 10:55:51 +02:00
Arnaud Charlet
3f25c54d81 [multiple changes]
2009-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* a-calend.adb: Remove types char_Pointer, int, tm and tm_Pointer.
	(localtime_tzoff): This routine no longer accepts an actual of type
	tm_Pointer.
	(UTC_Time_Offset): Remove local variable Secs_TM.

	* sysdep.c (__gnat_localtime_tzoff): This routine no longer accepts an
	actual of type struct tm*. Add local variable of type struct tm for all
	targets that provide localtime_r and need to invoke it.

2009-04-20  Thomas Quinot  <quinot@adacore.com>

	* s-oscons-tmplt.c, g-socket.adb, g-socket.ads
	(GNAT.Sockets.Resolve_Error): Add case of EPIPE
	Add case of EAGAIN for platforms where it is not equal to EWOULDBLOCK

From-SVN: r146369
2009-04-20 10:26:13 +02:00
Thomas Quinot
aed6fda81b re PR ada/35953 (Socket stream subprograms incorrectly handling null arrays)
2009-04-17  Thomas Quinot  <quinot@adacore.com>

	PR ada/35953

	* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
	g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads, g-socket.adb,
	g-socket.ads (GNAT.Sockets.Thin.C_Send,
	GNAT.Sockets.Thin.Syscall_Send): Remove unused subprograms.
	Replace calls to send(2) with equivalent sendto(2) calls.
	(GNAT.Sockets.Send_Socket): Factor common code in inlined subprogram.
	(GNAT.Sockets.Write): Account for the case of hyper-empty arrays, do not
	report an error in that case. Factor code common to the two versions
	(datagram and stream) in common routine Stream_Write.

From-SVN: r146267
2009-04-17 15:39:10 +02:00
Arnaud Charlet
95b89f1bf9 [multiple changes]
2009-04-09  Robert Dewar  <dewar@adacore.com>

	* sem_attr.adb (Check_Stream_Attribute): Check violation of
	restriction No_Streams

	* gnat_rm.texi: Clarify No_Streams restriction

	* g-socket.adb: Minor reformatting.

2009-04-09  Thomas Quinot  <quinot@adacore.com>

	* g-socket.ads: Mark Initialize and Finalize as obsolesent interfaces.

2009-04-09  Geert Bosch  <bosch@adacore.com>

	* exp_fixd.adb (Build_Conversion): Accept new optional Trunc argument.
	(Set_Result): Likewise.
	(Expand_Convert_Float_To_Fixed): Have Set_Result truncate the
	conversion, as required by RM 4.6(31).

From-SVN: r145801
2009-04-09 10:15:14 +02:00
Arnaud Charlet
3d5952be50 [multiple changes]
2009-04-08  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Enable_Overflow_Check): Do not enable if overflow checks
	suppressed.
	
	* exp_ch4.adb (Expand_Concatenate): Make sure checks are off for all
	resolution steps.

2009-04-08  Robert Dewar  <dewar@adacore.com>

	* sem_ch12.adb (Analyze_Package_Instantiation): Remove test for
	No_Local_Allocators restriction preventing local instantiation.

2009-04-08  Thomas Quinot  <quinot@adacore.com>

	* sem_eval.adb: Minor comment fix

2009-04-08  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb, g-socket.ads (GNAT.Sockets.Sockets_Library_Controller):
	New limited controlled type used to automate the initialization and
	finalization of the sockets implementation.
	(GNAT.Sockets.Initialize, Finalize): Make these no-ops

2009-04-08  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: New read-only project-level attribute Project_Dir

	* prj-proc.adb (Add_Attributes): New parameter Project_Dir, value of
	read-only attribute of the same name.
	(Process_Declarative_Items): Call Add_Attributes with Project_Dir
	(Recursive_Process): Ditto

	* snames.adb: Add new standard name Project_Dir

	* snames.ads: Add new standard name Project_Dir

From-SVN: r145766
2009-04-08 20:03:10 +02:00
Arnaud Charlet
f16d05d913 [multiple changes]
2009-04-07  Thomas Quinot  <quinot@adacore.com>

	* g-sothco.ads (Int_Access): Remove extraneous access type (use
	anonymous access instead).
	(Get_Socket_From_Set): Fix incorrectly reverted formals
	Last and Socket to match the underlying C routine.

	* g-socket.adb
	(Get): Use named parameter associations instead of positional ones in
	call go Get_Socket_From_Set, since this routine has two formals of the
	same type.

	* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-socthi-mingw.ads, g-socthi.adb, g-socthi.ads:
	(C_Ioctl, Syscall_Ioctl): use "access C.int" instead of "Int_Access"
	for type of Arg formal.

	* sem_warn.adb: Minor reformatting

2009-04-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Has_Tagged_Component): Fix typo in loop that iterates
	over record components.

2009-04-07  Nicolas Roche  <roche@adacore.com>

	* gsocket.h:
	Don't include resolvLib.h on VxWorks 6 (kernel and rtp). This library
	has disappeared between VxWorks 6.4 and VxWorks 6.5
	In RTP mode use time.h instead of times.h

2009-04-07  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb (Expand_N_Op_Concat): Improve lower bound handling

2009-04-07  Kevin Pouget  <pouget@adacore.com>

	* exp_dist.adb: Modify Build_From_Any_Fonction procedure to correct
	expanded code for constrained types.

2009-04-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Overloaded_Selected_Component): implement
	AI05-105: in an object renaming declaration, anonymousness is a name
	resolution rule.

	sem_ch8.adb (Analyze_Object_Renaming): Ditto.

2009-04-07  Arnaud Charlet  <charlet@adacore.com>

	* g-comlin.adb (Expansion): Fix old regression: also return directory
	names when matching.

From-SVN: r145689
2009-04-07 18:15:57 +02:00
Arnaud Charlet
df46b832b0 [multiple changes]
2009-04-07  Robert Dewar  <dewar@adacore.com>

	* g-socket.adb: Minor reformatting.

	* g-socthi-mingw.adb: Minor reformatting

	* g-sothco.ads: Minor reformatting

	* exp_ch4.adb:
	(Expand_Concatenate_String): Complete rewrite to generate efficient code
	inline instead of relying on external library routines.

	* s-strops.ads, s-sopco5.ads, s-sopco5.adb, s-sopco4.ads, s-sopco4.adb,
	s-sopco3.ads, s-sopco3.adb, s-strops.adb: Note that this unit is now
	obsolescent

2009-04-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb:
	(Eval_Attribute): for attributes of array objects that are not strings,
	attributes are not static if nominal subtype of object is unconstrained.

2009-04-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (New_Overloaded_Entity): If two implicit homonym
	operations for a type T in an instance do not override each other,
	when T is derived from a formal private type, the corresponding
	operations inherited by a type derived from T outside
	of the instance do not override each other either.

From-SVN: r145679
2009-04-07 17:10:30 +02:00
Arnaud Charlet
3dd9959c81 [multiple changes]
2009-04-07  Robert Dewar  <dewar@adacore.com>

	(Osint.Fail): Change calling sequence to have one string arg
	(Make.Make_Failed): Same change
	All callers are adjusted to use concatenation

2009-04-07  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Fix documentation typo

2009-04-07  Robert Dewar  <dewar@adacore.com>

	* tbuild.ads: Minor reformatting

2009-04-07  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Make_DT): Avoid the generation of the OSD_Table
	when compiling under ZFP runtime.

2009-04-07  Robert Dewar  <dewar@adacore.com>

	* g-comlin.adb: Minor reformatting

2009-04-07  Thomas Quinot  <quinot@adacore.com>

	* socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
	g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
	g-socthi.adb, g-socthi.ads, g-socket.adb, g-socket.ads, g-sothco.ads:
	Remove dynamic allocation of Fd_Set in Socket_Set_Type objects.

From-SVN: r145678
2009-04-07 17:01:27 +02:00
Robert Dewar
6bfee0770f g-socket.adb: Minor reformatting
2008-08-20  Robert Dewar  <dewar@adacore.com>

	* g-socket.adb: Minor reformatting

From-SVN: r139274
2008-08-20 14:07:22 +02:00
Thomas Quinot
62b7afe926 g-soccon.ads: New file.
2008-08-08  Thomas Quinot  <quinot@adacore.com>

	* g-soccon.ads: New file.

	* g-stheme.adb, g-socthi-vms.adb, g-socthi-vxworks.adb,
	g-socthi-mingw.adb, g-sttsne-vxworks.adb, g-socthi.adb,
	g-stsifd-sockets.adb, g-socket.adb, g-socket.ads,
	g-sothco.adb, g-sothco.ads: Add back GNAT.Sockets.Constants as a child
	unit, to allow building software that depends on this internal unit
	with both older and newer compilers.

From-SVN: r138877
2008-08-08 14:59:28 +02:00
Arnaud Charlet
ef9e1eff51 Makefile.in, [...]: Remove GNAT.Sockets.Constants.
2008-08-06  Thomas Quinot  <quinot@adacore.com>

	* gcc-interface/Makefile.in,
	g-socthi-vxworks.adb, g-socthi-mingw.adb, g-sttsne-vxworks.adb,
	g-socthi.adb, g-socket.adb, g-socket.ads, g-sothco.ads,
	g-soccon-linux-x86.ads, g-soccon-vxworks.ads, g-soccon-mingw.ads,
	g-soccon-hpux-ia64.ads, g-soccon-irix.ads, g-soccon-linux-64.ads,
	g-soccon-aix.ads, g-soccon-solaris.ads, g-soccon-lynxos.ads,
	g-soccon-vms.ads, g-soccon.ads, g-soccon-freebsd.ads,
	g-soccon-linux-ppc.ads, g-soccon-tru64.ads, g-soccon-hpux.ads,
	g-soccon-solaris-64.ads, gen-oscons.c, g-soccon-darwin.ads,
	g-soccon-mingw-64.ads, g-soccon-linux-mips.ads, g-soccon-rtems.ads:
	Remove GNAT.Sockets.Constants. This internal package is replaced by
	System.OS_Constants.

From-SVN: r138792
2008-08-06 12:08:09 +02:00
Thomas Quinot
f983388f04 Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.
2008-05-20  Thomas Quinot  <quinot@adacore.com>

	* Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.

	* g-sttsne-vxworks.adb: Add missing dependency on Sockets.Constants.
	Add missing "with" of Ada.Unchecked_Conversion

	* g-soccon-linux-ppc.ads, g-soccon-linux-64.ads, g-soccon-lynxos.ads, 
	g-soccon-linux-x86.ads, g-soccon-hpux-ia64.ads, 
	g-soccon-solaris-64.ads, g-soccon-tru64.ads, g-soccon-aix.ads, 
	g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads, 
	g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-vxworks.ads, 
	g-socthi-vxworks.adb, g-soccon-freebsd.ads, g-soccon.ads: 
	Move common code out of GNAT.Sockets.Thin implementations and into
	Thin_Common.
	New constant SIZEOF_fd_set
	New flag Has_Sockaddr_Len
	New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6

	* g-stsifd-sockets.adb
	(Create): Remove call to Set_Length; use Set_Family to set the family
	and (on appropriate platforms) length fields in struct sockaddr.

	* g-socthi.adb, g-socthi.ads, g-socthi-vms.ads, g-socthi-vms.adb, 
	g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.adb, 
	g-soccon-darwin.ads, g-soccon-darwin.ads: New constant SIZEOF_fd_set
	Move common code out of GNAT.Sockets.Thin implementations and into
	Thin_Common.

	* g-socket.ads, g-socket.adb: 
	Move common code out of GNAT.Sockets.Thin implementations and into
	Thin_Common.
	(Connect_Socket, Accept_Socket): Provide new versions of these two
	routines that operate with a user specified timeout.
	(Bind_Socket, Connect_Socket, Send_Socket): Remove calls to Set_Length,
	this is now handled automatically by Set_Family on platforms that
	require it.

	* gen-soccon.c: 
	Move common code out of GNAT.Sockets.Thin implementations and into
	Thin_Common.
	(SIZEOF_sockaddr_in6): On platforms where IPv6 is not supported, define
	this constant to 0 (not -1) because we use it to initialize an
	unsigned_char value.
	Align values for numeric constants only.
	Handle the case of systems that do not support AF_INET6.
	New constant SIZEOF_fd_set
	New flag Has_Sockaddr_Len
	New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6

	* gsocket.h: New flag Has_Sockaddr_Len
	New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6

From-SVN: r135612
2008-05-20 14:43:29 +02:00
Samuel Tardieu
35485e124c g-socket.ads, [...] (Get_Address): Make Stream a "not null" parameter.
gcc/ada/
	* g-socket.ads, g-socket.adb (Get_Address): Make Stream a
	"not null" parameter.

From-SVN: r134386
2008-04-17 09:28:55 +00:00
Samuel Tardieu
111c1cd945 g-socket.adb: Add a message "IPv6 not supported" to the Socket_Error exception.
gcc/ada/
	* g-socket.adb: Add a message "IPv6 not supported" to the
	Socket_Error exception.

From-SVN: r134385
2008-04-17 09:22:29 +00:00
Thomas Quinot
64f7d845ef g-socket.ads, [...]: Improve documentation of GNAT.Sockets...
2008-04-08  Thomas Quinot  <quinot@adacore.com>

	* g-socket.ads, g-socket.adb: Improve documentation of GNAT.Sockets:
	add a pointer to generic sockets literature
	do not mention that the given example is "typical" usage.
	Remove obsolete comment about multicast not being supported on Windows.
	(Connect_Socket): Make Server mode IN rather than IN OUT
	since this formal is never modified.

From-SVN: r134036
2008-04-08 08:52:09 +02:00