From 07d8e335db1526c9bb51621736e6c1b7985cb64e Mon Sep 17 00:00:00 2001 From: Andrea Cornell Date: Tue, 27 Dec 2022 14:12:22 -0500 Subject: [PATCH] Make make file, comment out icky code --- _src/Makefile | 2 ++ _src/compiler/stdutil.cpp | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 _src/Makefile diff --git a/_src/Makefile b/_src/Makefile new file mode 100644 index 0000000..52abc57 --- /dev/null +++ b/_src/Makefile @@ -0,0 +1,2 @@ +bcc: compiler/*.cpp codegen/*.cpp + g++ -Wno-narrowing -g compiler/*.cpp codegen/*.cpp -o bcc diff --git a/_src/compiler/stdutil.cpp b/_src/compiler/stdutil.cpp index 2ab5758..22fd027 100644 --- a/_src/compiler/stdutil.cpp +++ b/_src/compiler/stdutil.cpp @@ -66,13 +66,14 @@ static void init_env(){ pid=getpid(); sprintf(linkname, "/proc/%i/exe", pid); ret=readlink(linkname, path,1024); - if (ret<1 || ret>1022) abort(); - path[ret]=0; - - string t=path; - int n=t.rfind( "/bin/" ); - if( n==string::npos ) abort(); - env_blitzpath=t.substr(0,n); +// if (ret<1 || ret>1022) abort(); +// path[ret]=0; + +// string t=path; +// int n=t.rfind( "/bin/" ); +// if( n==string::npos ) abort(); +// env_blitzpath=t.substr(0,n); + env_blitzpath="/nonexistent"; env_platform="linux"; } -- 2.30.2