Use CONSOLE entry points consistently

This commit is contained in:
Philipp Oppermann
2018-04-09 01:20:11 +02:00
parent 2a00afaab5
commit 5f12cd8fea

View File

@@ -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 {}
} }