os.c
1.0.3
OS.C :小C库知道您的操作系统。
使用CLIB安装
$ clib install abranhe/os.c #include <stdio.h>
#include "os.h"
int main ()
{
printf ( "%sn" , operating_system ());
// macOS
return 0 ;
}char *operating_system(void);返回您使用的操作系统。
void :不需要参数| 操作系统 | operating_system() |
|---|---|
| macos | macOS |
| 窗口32 | win32 |
| 窗口64 | win64 |
| Unix | unix |
| Linux | linux |
| 免费的BSD | freeBSD |
| 其他 | other |
| 卡洛斯·亚伯拉罕(Carlos Abraham) |
麻省理工学院许可©Carlos Abraham