博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux标准库#include <unistd.h>与windows的#include <windows.h>(C语言开发)
阅读量:6934 次
发布时间:2019-06-27

本文共 757 字,大约阅读时间需要 2 分钟。

#include    <unistd.h>

符号常量

是POSIX标准定义的unix类系统定义符号常量的头文件,包含了许多UNIX系统服务的函数原型,例如read函数、write函数和getpid函数
unistd.h在unix中类似于window中的windows.h!
#ifdef WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif

unistd.h含有的常量与函数:

ssize_t      read(int, void *, size_t);

int          unlink(const char *);
ssize_t      write(int, const void *, size_t);
int          usleep(useconds_t);
unsigned     sleep(unsigned);

int          access(const char *, int);

unsigned     alarm(unsigned);
int          chdir(const char *);
int          chown(const char *, uid_t, gid_t);
int          close(int);
size_t       confstr(int, char *, size_t);
void        _exit(int);
pid_t        fork(void);

 

NULL           // Null pointer

SEEK_CUR    // Set file offset to current plus offset.
SEEK_END    // Set file offset to EOF plus offset.
SEEK_SET    // Set file offset to offset.

 

windows.h的相关介绍:

转载地址:http://qegjl.baihongyu.com/

你可能感兴趣的文章
都老了
查看>>
RFM模型分析与客户细分
查看>>
user-select介绍
查看>>
src源代码生成html格式文档
查看>>
一道面试题:用多种方法实现两个数的交换
查看>>
网络之XML解析-原生
查看>>
Linux下安全扫描工具Nmap用法详解
查看>>
linux系统编程:线程原语
查看>>
MIDI Architecture
查看>>
设计中最常用的CSS选择器
查看>>
关于Cocos2d-x中增加暂停按钮的步骤
查看>>
Nginx的继续深入(日志轮询切割,重写,负载均衡等)
查看>>
hdoj:2083
查看>>
log4j(七)——log4j.xml简单配置样例说明
查看>>
用express-generator创建express项目骨架
查看>>
Waiting on Groups of Queued Tasks
查看>>
selenium 定制启动 chrome 的选项
查看>>
PHP MySQL Update
查看>>
强大的Vivado IP工具——自定义IP的使用
查看>>
PowerShell让系统可以执行.ps1文件
查看>>