From 5c2a1eb50a7054972955182477e619ac50c54705 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 8 Jul 2014 20:27:07 +0400 Subject: fpc (2.6.4+dfsg-3~dyson2) unstable; urgency=medium * Added dyson-execpathstr.patch: paramstr(0) should return abs path as on linux --- debian/patches/dyson-execpathstr.patch | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 debian/patches/dyson-execpathstr.patch (limited to 'debian/patches/dyson-execpathstr.patch') diff --git a/debian/patches/dyson-execpathstr.patch b/debian/patches/dyson-execpathstr.patch new file mode 100644 index 00000000..843f1cbb --- /dev/null +++ b/debian/patches/dyson-execpathstr.patch @@ -0,0 +1,48 @@ +Description: ParamStr(0) should return abs path as on linux +Bug-Dyson: http://osdyson.org/issues/178 +Index: fpc/fpcsrc/rtl/solaris/system.pp +=================================================================== +--- fpc.orig/fpcsrc/rtl/solaris/system.pp 2014-07-05 08:42:27.480906242 +0400 ++++ fpc/fpcsrc/rtl/solaris/system.pp 2014-07-07 21:39:54.477572186 +0400 +@@ -106,11 +106,11 @@ + begin + { stricly conforming POSIX applications } + { have the executing filename as argv[0] } +-// if l=0 then +-// begin +-// paramstr := execpathstr; +-// end +-// else ++ if l=0 then ++ begin ++ paramstr := execpathstr; ++ end ++ else + if (l < argc) then + paramstr:=strpas(argv[l]) + else +@@ -184,6 +184,16 @@ + FpSigAction(SIGILL,@oldsigill,nil); + end; + ++procedure SysInitExecPath; ++var ++ i : longint; ++begin ++ execpathstr[0]:=#0; ++ i:=Fpreadlink('/proc/self/path/a.out',@execpathstr[1],high(execpathstr)); ++ if (i>0) and (execpathstr[1]='/') then ++ execpathstr[0]:=char(i); ++end; ++ + + procedure SetupCmdLine; + var +@@ -283,6 +293,7 @@ + { Reset IO Error } + InOutRes:=0; + { Arguments } ++ SysInitExecPath; + SetupCmdLine; + InitSystemThreads; + initvariantmanager; -- cgit v1.2.3