-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdoublecmd-qt5.patch
More file actions
28 lines (25 loc) · 992 Bytes
/
doublecmd-qt5.patch
File metadata and controls
28 lines (25 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Index: src/platform/unix/uqt5workaround.pas
===================================================================
--- src/platform/unix/uqt5workaround.pas (revision 8267)
+++ src/platform/unix/uqt5workaround.pas (working copy)
@@ -10,12 +10,12 @@
InitC, CTypes, BaseUnix;
procedure _exit(status: cint); cdecl; external clib;
-function atexit(func: pointer): cint; cdecl; external clib;
+function on_exit(func, arg: pointer): cint; cdecl; external clib;
function setenv(const name, value: pchar; overwrite: cint): cint; cdecl; external clib;
-procedure DoExit; cdecl;
+procedure DoExit(status: cint; arg: pointer); cdecl;
begin
- _exit(ExitCode);
+ _exit(status);
end;
initialization
@@ -26,7 +26,7 @@
// Workaround: https://doublecmd.sourceforge.io/mantisbt/view.php?id=2079
if (UpCase(fpGetEnv(PAnsiChar('XDG_CURRENT_DESKTOP'))) = 'KDE') then
begin
- atexit(@DoExit);
+ on_exit(@DoExit, nil);
WriteLn('Warning: Skip libKF5IconThemes exit handler');
end;