Make make file, comment out icky code master
authorAndrea Cornell <anders@acorn.pw>
Tue, 27 Dec 2022 19:12:22 +0000 (14:12 -0500)
committerAndrea Cornell <anders@acorn.pw>
Tue, 27 Dec 2022 19:12:22 +0000 (14:12 -0500)
_src/Makefile [new file with mode: 0644]
_src/compiler/stdutil.cpp

diff --git a/_src/Makefile b/_src/Makefile
new file mode 100644 (file)
index 0000000..52abc57
--- /dev/null
@@ -0,0 +1,2 @@
+bcc: compiler/*.cpp codegen/*.cpp
+       g++ -Wno-narrowing -g compiler/*.cpp codegen/*.cpp -o bcc
index 2ab5758eece048ec4266ffec6ccd19aca24afa64..22fd027ac0a1a935ae40fc5af966033b3f6a37f3 100644 (file)
@@ -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";
 }