diff --git a/core/c/c.odin b/core/c/c.odin index 3dfc19ffc..73727d8d5 100644 --- a/core/c/c.odin +++ b/core/c/c.odin @@ -114,3 +114,5 @@ CHAR_BIT :: 8 va_list :: struct #align(16) { _: [4096]u8, } + +FILE :: struct {} diff --git a/core/c/libc/stdio.odin b/core/c/libc/stdio.odin index a94a53696..56e4e8f66 100644 --- a/core/c/libc/stdio.odin +++ b/core/c/libc/stdio.odin @@ -1,5 +1,6 @@ package libc +import "core:c" import "core:io" when ODIN_OS == .Windows { @@ -15,7 +16,7 @@ when ODIN_OS == .Windows { // 7.21 Input/output -FILE :: struct {} +FILE :: c.FILE Whence :: enum int { SET = SEEK_SET, diff --git a/vendor/commonmark/cmark.odin b/vendor/commonmark/cmark.odin index 2fdf1387c..6b07f157f 100644 --- a/vendor/commonmark/cmark.odin +++ b/vendor/commonmark/cmark.odin @@ -7,7 +7,6 @@ package vendor_commonmark import "core:c" -import "core:c/libc" import "base:runtime" COMMONMARK_SHARED :: #config(COMMONMARK_SHARED, false) @@ -450,7 +449,7 @@ foreign lib { // Called `parse_from_libc_file` so as not to confuse with Odin's file handling. @(link_name = "parse_from_file") - parse_from_libc_file :: proc(file: ^libc.FILE, options: Options) -> (root: ^Node) --- + parse_from_libc_file :: proc(file: ^c.FILE, options: Options) -> (root: ^Node) --- } parser_feed_from_string :: proc "c" (parser: ^Parser, s: string) { diff --git a/vendor/stb/image/stb_image.odin b/vendor/stb/image/stb_image.odin index e74c825b8..1ba63dc47 100644 --- a/vendor/stb/image/stb_image.odin +++ b/vendor/stb/image/stb_image.odin @@ -1,6 +1,6 @@ package stb_image -import c "core:c/libc" +import "core:c" @(private) LIB :: (