diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-06-13 12:59:19 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-06-13 12:59:19 -0400 |
| commit | 5757a5023c4c4b252c6a0440e14e8efacaa2668b (patch) | |
| tree | ebeca25fcfef82e133d0893f21bc94ddfa25afcc /compile.c | |
| parent | 217eb51280dc6e1caf3e393066a9fd084e125190 (diff) | |
Support loading shared libraries
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2330,10 +2330,10 @@ CORD compile_statement_header(env_t *env, ast_t *ast) case Use: { auto use = Match(ast, Use); const char *path = use->raw_path; - if (strncmp(path, "./", 2) == 0 || strncmp(path, "../", 3) == 0) { - return CORD_all("#include \"", path, ".h\"\n"); + if (strncmp(path, "./", 2) == 0 || strncmp(path, "../", 3) == 0 || strncmp(path, "~/", 2) == 0 || strncmp(path, "/", 1) == 0) { + return CORD_all("#include \"", path, ".tm.h\"\n"); } else { - return CORD_all("#include <", path, ".h>\n"); + return CORD_all("#include <tomo/lib", path, ".h>\n"); } } default: |
