Skip to content

Make pas2jni use cthreads on Unices

suve requested to merge suvepl/fpc-src:pas2jni-thread-support into main

The utility program pas2jni uses threads, but does not include the cthreads unit, causing the program to fail at runtime on Linux.

$ pas2jni ./hello.ppu
This binary has no thread support compiled in.
Recompile the application with a thread-driver in the program uses clause before other units using thread.
Runtime error 232 at $000000000041AEFD
  $000000000041AEFD
  $000000000048AE28
  $000000000048B161
  $000000000048AA9A
  $0000000000401BB0

This patch adds the standard "use cthreads if UNIX is defined" clause to pas2jni code.

Merge request reports

Loading