freebsd-ports/lang/gnat/files/patch-al
Daniel Eischen 95df74e9ba Update to the latest public release 3.13p.
Thanks to Samuel Tardieu <sam@inf.enst.fr> for instigating this
update and providing some of the changes.
2000-11-01 18:57:03 +00:00

35 lines
1.0 KiB
Plaintext

*** ada/i-cstrea.adb Fri Sep 24 08:42:42 1999
--- ada/i-cstrea.adb Sat Nov 6 18:33:57 1999
***************
*** 108,111 ****
--- 108,136 ----
return C_setvbuf (stream, buffer, mode, size);
end setvbuf;
+ procedure strcpy (dst : chars; src : chars);
+ pragma Import (C, strcpy);
+
+ function C_mktemp (template : chars) return chars;
+ pragma Import (C, C_mktemp, "mktemp");
+
+ procedure tmpnam (tname : chars) is
+ use type System.Address;
+ Template : String (1 .. 18) := "/var/tmp/tmp.XXXX" & ASCII.Nul;
+ Name : chars;
+ begin
+ Name := C_mktemp (Template'Address);
+ if Name /= System.Null_Address then
+ strcpy (tname'Address, Name);
+ end if;
+ end tmpnam;
+
+ function tmpfile return FILEs is
+ Name : String (1 .. L_tmpnam) := (others => ASCII.Nul);
+ Mode : String (1 .. 3) := "w+" & ASCII.Nul;
+ begin
+ tmpnam (Name'Address);
+ return (fopen (Name'Address, Mode'Address));
+ end tmpfile;
+
end Interfaces.C_Streams;