From f527d42d1c9a94d1cdac4f1bb167d1493c683305 Mon Sep 17 00:00:00 2001 From: skalogryz Date: Fri, 13 Mar 2009 15:24:10 +0000 Subject: [PATCH] adding run-time initialization unit git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@738 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- bindings/objc/MacOSobjcrtl.pas | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 bindings/objc/MacOSobjcrtl.pas diff --git a/bindings/objc/MacOSobjcrtl.pas b/bindings/objc/MacOSobjcrtl.pas new file mode 100644 index 000000000..df5f46e83 --- /dev/null +++ b/bindings/objc/MacOSobjcrtl.pas @@ -0,0 +1,29 @@ +unit MacOSobjcrtl; + +{$mode objfpc}{$H+} + +interface + +uses + MacOSAll, objcrtl, objcrtl10, objcrtl20; + +implementation + +procedure InitObjCRunTime; +var + MacVersion : SInt32; +begin + if (Gestalt(gestaltSystemVersionMinor, MacVersion) = noErr) then begin + if MacVersion >= 5 + then InitializeObjcRtl20(DefaultObjCLibName) + else InitializeObjcRtl10(DefaultObjCLibName); + end else + InitializeObjcRtl20(DefaultObjCLibName); +end; + + +initialization + InitObjCRuntime; + +end. +