[Ada] Fix simple C interfacing issues

Eric Botcazou ebotcazou@adacore.com
Mon Nov 30 12:05:00 GMT 2015

This fixes the simple C interfacing issues recently reported by Jan (the 
signedness issue of char will probably be fixed for GCC 6, the duality 
pointer/System.Address probably _not_ unfortunately).

Tested on x86_64-suse-linux, applied on the mainline.

2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>

	* osint.adb: Add use type clause for CRTL.size_t.
	(C_String_Length): Return CRTL.size_t instead of Integer.
	(To_Path_String_Access): Take CRTL.size_t instead of Integer.
	(Get_Libraries_From_Registry): Use CRTL throughout.
	(To_Canonical_Dir_Spec): Use CRTL.size_t instead of Integer.
	(To_Canonical_File_List): Likewise.
	(To_Canonical_File_Spec): Likewise.
	(To_Canonical_Path_Spec): Likewise.
	(To_Host_Dir_Spec): Likewise.
	(To_Host_File_Spec): Likewise.
	(Update_Path): Use CRTL throughout.
	* s-shasto.adb: Add with clause for System.CRTL.
	(Initialize): Rename CRTL.strncpy instead of importing it manually.

Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 8320 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151130/0325696e/attachment.bin>

More information about the Gcc-patches mailing list