mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Use CONSOLE entry points consistently
This commit is contained in:
@@ -280,8 +280,6 @@ pub extern "C" fn main() -> ! {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
We just call `WinMain` from `WinMainCRTStartup` to avoid any ambiguity which function is called.
|
|
||||||
|
|
||||||
#### macOS
|
#### macOS
|
||||||
macOS [does not support statically linked binaries], so we have to link the `libSystem` library. The entry point is called `main`:
|
macOS [does not support statically linked binaries], so we have to link the `libSystem` library. The entry point is called `main`:
|
||||||
|
|
||||||
@@ -330,12 +328,12 @@ pub extern "C" fn _start() -> ! {
|
|||||||
|
|
||||||
// On Windows:
|
// On Windows:
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn WinMainCRTStartup() -> ! {
|
pub extern "C" fn mainCRTStartup() -> ! {
|
||||||
WinMain();
|
main();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn WinMain() -> ! {
|
pub extern "C" fn main() -> ! {
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user