From e52809aeccb0ffcea47e8febe5352e26983c4386 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Mon, 8 Mar 2021 18:43:12 +0500 Subject: [PATCH] Removed crt dependency --- mff/Application.bas | 7 ++++++- mff/Application.bi | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mff/Application.bas b/mff/Application.bas index a2ef2f6a..0cda9f68 100644 --- a/mff/Application.bas +++ b/mff/Application.bas @@ -93,6 +93,9 @@ Namespace My Dim As Integer L, i, k #ifdef __FB_WIN32__ L = GetModuleFileName(GetModuleHandle(NULL), Tx, 255) + #else + Tx = Command(0) + L = Len(Tx) #endif s = Left(Tx, L) For i = 0 To Len(s) @@ -111,7 +114,9 @@ Namespace My Dim As Integer L #ifndef __FB_WIN32__ Dim As ZString * 255 Tx - L = readlink("/proc/self/exe", @Tx, 255 - 1) + 'L = readlink("/proc/self/exe", @Tx, 255 - 1) + Tx = Command(0) + L = Len(Tx) #else Dim As WString * 255 Tx L = GetModuleFileName(GetModuleHandle(NULL), @Tx, 255 - 1) diff --git a/mff/Application.bi b/mff/Application.bi index 876db628..b02646c0 100644 --- a/mff/Application.bi +++ b/mff/Application.bi @@ -13,9 +13,6 @@ #include once "WStringList.bi" #include once "Control.bi" -#ifndef __FB_WIN32__ - #include once "crt/linux/unistd.bi" -#endif #ifdef __USE_GTK__ #include once "gmodule.bi" #else