diff --git a/README.md b/README.md index 2ddb79974..68f9a7333 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ A `c3c` executable will be found under `bin/`. #### Installing on OS X using Homebrew 2. Install CMake: `brew install cmake` -3. Install LLVM 11: `brew install llvm` +3. Install LLVM 13: `brew install llvm` 4. Clone the C3C github repository: `git clone https://github.com/c3lang/c3c.git` 5. Enter the C3C directory `cd c3c`. 6. Create a build directory `mkdir build` diff --git a/src/compiler/source_file.c b/src/compiler/source_file.c index 57613b0c1..18d408154 100644 --- a/src/compiler/source_file.c +++ b/src/compiler/source_file.c @@ -29,11 +29,8 @@ File *source_file_load(const char *filename, bool *already_loaded) if (already_loaded) *already_loaded = false; if (!source_files.files) source_files.files = VECNEW(File *, LEXER_FILES_START_CAPACITY); -#ifdef _MSC_VER - char* full_path = malloc_arena(MAX_PATH + 1); -#else char* full_path = malloc_arena(PATH_MAX + 1); -#endif + if (!realpath(filename, full_path)) { error_exit("Failed to resolve %s", filename);