Make pas2jni use cthreads on Unices
authorArtur Frenszek-Iwicki <fedora@svgames.pl>
Fri, 17 Mar 2023 12:45:28 +0000 (12:45 +0000)
committerAbou Al Montacir <abou.almontacir@sfr.fr>
Fri, 17 Mar 2023 12:45:28 +0000 (12:45 +0000)
Forwarded: https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/185
Origin: vendor, https://src.fedoraproject.org/rpms/fpc/c/9c5c41eb5df798f8967c0c384a4c28aa52b250a3
Last-Update: 2022-03-16

The "pas2jni" util program shipped with FPC uses threads,
but is compiled without thread support and fails to
actually do anything useful when run.

Gbp-Pq: Name pas2jni-cthreads.patch

fpcsrc/utils/pas2jni/pas2jni.pas

index c0a8d67917220d78d355d07463034d6f132d467b..c89fe92791a382ddf4a3e11ef82787aa2244214f 100644 (file)
@@ -22,7 +22,9 @@
 {$mode objfpc}{$H+}
 program pas2jni;
 
-uses SysUtils, Classes, writer, ppuparser;
+uses
+  {$IFDEF UNIX}cthreads,{$ENDIF}
+  SysUtils, Classes, writer, ppuparser;
 
 var
   w: TWriter;