|
161 | 161 | # define _WINCON_ |
162 | 162 | # include <windows.h> |
163 | 163 | # include <direct.h> |
| 164 | +# include <io.h> |
164 | 165 | # include <shellapi.h> |
165 | 166 | #else |
166 | 167 | # ifdef __APPLE__ |
@@ -659,6 +660,8 @@ NOBDEF char *nob_temp_running_executable_path(void); |
659 | 660 | # define nob_cc(cmd) nob_cmd_append(cmd, "clang") |
660 | 661 | # elif defined(_MSC_VER) |
661 | 662 | # define nob_cc(cmd) nob_cmd_append(cmd, "cl.exe") |
| 663 | +# elif defined(__TINYC__) |
| 664 | +# define nob_cc(cmd) nob_cmd_append(cmd, "tcc") |
662 | 665 | # endif |
663 | 666 | # else |
664 | 667 | # define nob_cc(cmd) nob_cmd_append(cmd, "cc") |
@@ -699,6 +702,8 @@ NOBDEF char *nob_temp_running_executable_path(void); |
699 | 702 | # define NOB_REBUILD_URSELF(binary_path, source_path) "clang", "-o", binary_path, source_path |
700 | 703 | # elif defined(_MSC_VER) |
701 | 704 | # define NOB_REBUILD_URSELF(binary_path, source_path) "cl.exe", nob_temp_sprintf("/Fe:%s", (binary_path)), source_path |
| 705 | +# elif defined(__TINYC__) |
| 706 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "tcc", "-o", binary_path, source_path |
702 | 707 | # endif |
703 | 708 | # else |
704 | 709 | # define NOB_REBUILD_URSELF(binary_path, source_path) "cc", "-o", binary_path, source_path |
@@ -2083,7 +2088,7 @@ NOBDEF bool nob_read_entire_file(const char *path, Nob_String_Builder *sb) |
2083 | 2088 | #ifndef _WIN32 |
2084 | 2089 | m = ftell(f); |
2085 | 2090 | #else |
2086 | | - m = _ftelli64(f); |
| 2091 | + m = _telli64(_fileno(f)); |
2087 | 2092 | #endif |
2088 | 2093 | if (m < 0) nob_return_defer(false); |
2089 | 2094 | if (fseek(f, 0, SEEK_SET) < 0) nob_return_defer(false); |
@@ -2543,6 +2548,8 @@ NOBDEF char *nob_temp_running_executable_path(void) |
2543 | 2548 |
|
2544 | 2549 | 2.0.1 ( ) Fix Walk_Entry naming (by @Sinha-Ujjawal) |
2545 | 2550 | Using single String Builder in nob__walk_dir_opt_impl (by @Sinha-Ujjawal) |
| 2551 | + Add tcc to nob_cc_*() and NOB_REBUILD_URSELF() macros (by @vylsaz) |
| 2552 | + Fix building nob_read_entire_file() with tcc on windows (by @vylsaz) |
2546 | 2553 | 2.0.0 (2026-01-06) Remove minirent.h (by @rexim) |
2547 | 2554 | BACKWARD INCOMPATIBLE CHANGE!!! If you were using minirent.h from this library |
2548 | 2555 | just use it directly from https://github.com/tsoding/minirent |
|
0 commit comments