unistd.h文件
unistd.h 源码
- #ifndef _UNISTD_H
- #define _UNISTD_H
- #include <features.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <_ansi.h>
- #include <sys/types.h>
- #include <sys/_types.h>
- #define __need_size_t
- #define __need_ptrdiff_t
- #include <stddef.h>
- extern char **environ;
- void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
- int _EXFUN(access,(const char *__path, int __amode ));
- unsigned _EXFUN(alarm, (unsigned __secs ));
- int _EXFUN(chdir, (const char *__path ));
- int _EXFUN(chmod, (const char *__path, mode_t __mode ));
- int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
- int _EXFUN(chroot, (const char *__path ));
- int _EXFUN(close, (int __fildes ));
- char _EXFUN(*ctermid, (char *__s ));
- char _EXFUN(*cuserid, (char *__s ));
- int _EXFUN(dup, (int __fildes ));
- int _EXFUN(dup2, (int __fildes, int __fildes2 ));
- int _EXFUN(execl, (const char *__path, const char *, ... ));
- int _EXFUN(execle, (const char *__path, const char *, ... ));
- int _EXFUN(execlp, (const char *__file, const char *, ... ));
- int _EXFUN(execv, (const char *__path, char * const __argv[] ));
- int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
- int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
- int _EXFUN(fchdir, (int __fildes));
- int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
- int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group ));
- pid_t _EXFUN(fork, (void ));
- long _EXFUN(fpathconf, (int __fd, int __name ));
- int _EXFUN(fsync, (int __fd));
- int _EXFUN(ftruncate, (int __fd, off_t __length));
- char _EXFUN(*getcwd, (char *__buf, size_t __size ));
- int _EXFUN(getdomainname ,(char *__name, size_t __len));
- gid_t _EXFUN(getegid, (void ));
- uid_t _EXFUN(geteuid, (void ));
- gid_t _EXFUN(getgid, (void ));
- int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
- int _EXFUN(__gethostname, (char *__name, size_t __len));
- char _EXFUN(*getlogin, (void ));
- #if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
- int _EXFUN(getlogin_r, (char *name, size_t namesize) );
- #endif
- char _EXFUN(*getpass, (__const char *__prompt));
- int _EXFUN(getpagesize, (void));
- pid_t _EXFUN(getpgid, (pid_t));
- pid_t _EXFUN(getpgrp, (void ));
- pid_t _EXFUN(getpid, (void ));
- pid_t _EXFUN(getppid, (void ));
- uid_t _EXFUN(getuid, (void ));
- char * _EXFUN(getusershell, (void));
- char _EXFUN(*getwd, (char *__buf ));
- int _EXFUN(isatty, (int __fildes ));
- int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group ));
- int _EXFUN(link, (const char *__path1, const char *__path2 ));
- int _EXFUN(nice, (int __nice_value ));
- off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
- long _EXFUN(pathconf, (const char *__path, int __name ));
- int _EXFUN(pause, (void ));
- int _EXFUN(pipe, (int __fildes[2] ));
- ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset));
- ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset));
- _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
- int _EXFUN(readlink, (const char *path, char *buf, size_t bufsiz));
- int _EXFUN(rmdir, (const char *__path ));
- void * _EXFUN(sbrk, (ptrdiff_t __incr));
- int _EXFUN(setegid, (gid_t __gid ));
- int _EXFUN(seteuid, (uid_t __uid ));
- int _EXFUN(setgid, (gid_t __gid ));
- int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
- int _EXFUN(setpgrp, (void ));
- pid_t _EXFUN(setsid, (void ));
- int _EXFUN(setuid, (uid_t __uid ));
- unsigned _EXFUN(sleep, (unsigned int __seconds ));
- void _EXFUN(swab, (const void *, void *, ssize_t));
- int _EXFUN(symlink, (const char *oldpath, const char *newpath));
- long _EXFUN(sysconf, (int __name ));
- pid_t _EXFUN(tcgetpgrp, (int __fildes ));
- int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
- int _EXFUN(truncate, (const char *, off_t __length));
- char * _EXFUN(ttyname, (int __fildes ));
- int _EXFUN(ttyname_r, (int __fildes, char *__buf, size_t __len));
- int _EXFUN(unlink, (const char *__path ));
- int _EXFUN(usleep, (__useconds_t __useconds));
- int _EXFUN(vhangup, (void ));
- _READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
- extern char *optarg; /** getopt(3) external variables */
- extern int optind, opterr, optopt;
- int getopt(int, char * const [], const char *);
- extern int optreset; /** getopt(3) external variable */
- #ifndef _POSIX_SOURCE
- pid_t _EXFUN(vfork, (void ));
- extern char *suboptarg; /** getsubopt(3) external variable */
- int getsubopt(char **, char * const *, char **);
- #endif /** _POSIX_SOURCE */
- /** Provide prototypes for most of the _<systemcall> names that are
- provided in newlib for some compilers. */
- int _EXFUN(_close, (int __fildes ));
- pid_t _EXFUN(_fork, (void ));
- pid_t _EXFUN(_getpid, (void ));
- int _EXFUN(_link, (const char *__path1, const char *__path2 ));
- off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
- _READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte ));
- void * _EXFUN(_sbrk, (size_t __incr));
- int _EXFUN(_unlink, (const char *__path ));
- _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte ));
- int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
- #define F_OK 0
- #define R_OK 4
- #define W_OK 2
- #define X_OK 1
- # define SEEK_SET 0
- # define SEEK_CUR 1
- # define SEEK_END 2
- #include <sys/features.h>
- #define STDIN_FILENO 0 /** standard input file descriptor */
- #define STDOUT_FILENO 1 /** standard output file descriptor */
- #define STDERR_FILENO 2 /** standard error file descriptor */
- #include <bits/environments.h>
- #include <bits/confname.h>
- # define MAXPATHLEN 1024
- #ifdef __cplusplus
- }
- #endif
- #endif /** _SYS_UNISTD_H */
unistd.h文件的更多相关文章
- Python 安装zbar-py时出现 无法打开包括文件: “unistd.h” no such file or directory
问题 途中使用的命令是cl.exe,在执行命令的时候找不到对应的unistd.h文件. unistd.h是Unix系统的文件,因此,十有八九,使用的是Windows系统.下面的代码可以修复,但是如果修 ...
- vc编程时说“Cannot open include file: 'unistd.h': No such file or directory”
本文专自http://blog.csdn.net/mangobar/article/details/6314700 unistd.h是unix standard header之意,因此,Linux下开 ...
- #include<unistd.h>头文件的理解
1.百度百科定义 unistd.h 是 C 和 C++ 程序设计语言中提供对 POSIX 操作系统 API 的访问功能的头文件的名称.该头文件由 POSIX.1 标准(单一UNIX规范的基础)提出,故 ...
- sys/types.h fcntl.h unistd.h sys/stat.h
sys/types.h 是Unix/Linux系统的基本系统数据类型的头文件,含有size_t,time_t,pid_t等类型. 在应用程序源文件中包含 <sys/types.h> 以访问 ...
- #include<unistd.h>存在linux中,含有系统服务的函数
#include<unistd.h> linux标准库#include <unistd.h>与windows的#include <windows.h>(C语言开发) ...
- unistd.h
unistd.h是unix std的意思,是POSIX标准定义的unix类系统定义符号常量的头文件, 包含了许多UNIX系统服务的函数原型 unistd.h在unix中类似于window中的windo ...
- VS 2015 报错 " 'unistd.h': No such file or directory" 的解决办法
使用 Visual Studio 2015 进行程序开发工作时,如果编译的是来自于Linux平台的源文件,该源文件可能会包含头文件 uninstd.h,这样会产生报错信息: "fatal e ...
- #include <unistd.h> 的作用
原文:http://blog.csdn.net/ybsun2010/article/details/24832113 由字面意思,unistd.h是unix std的意思,是POSIX标准定义的uni ...
- <unistd.h>的close(0)导致std::cout被关闭
代码如下:其中ZJ::open_max返回系统允许的打开的文件的最大个数 #include "util.h" #include <unistd.h> // int cl ...
随机推荐
- LinkedList简要分析
LinkedList概述 LinkedList 实现List接口,底层是双向链表,非线程安全.LinkedList还可以被当作堆栈.队列或双端队列进行操作.在JDK1.7/8 之后取消了循环,修改为双 ...
- 洛谷 P1273 有线电视网(树形背包)
洛谷 P1273 有线电视网(树形背包) 干透一道题 题面:洛谷 P1273 本质就是个背包.这道题dp有点奇怪,最终答案并不是dp值,而是最后遍历寻找那个合法且最优的\(i\)作为答案.dp值存的是 ...
- OAuth2.0认证和授权以及单点登录
https://www.cnblogs.com/shizhiyi/p/7754721.html OAuth2.0认证和授权机制讲解 2017-10-30 15:33 by shizhiyi, 2273 ...
- SpringMVC初写(二)映射类型、限制和数据绑定
映射路径 a)映射路径的概述 所谓的映射路径,就是匹配请求路径和执行方法关系的路径 请求路径:http://localhost:8080/springmvc-demo-cofig/say.do 映射路 ...
- (7.0 version)当销售单中包含service或phantom类型的产品时,销售单不能完成的原因分析及解决方案
首先说一下service类型的产品,由于该类型的产品不需要发货,所以当在销售订单确认了后,销售单直接变成了等待开票的状态,但当开票的流程结束后,订单却还是停在销售单的状态上,该问题的解决方案是安装Ta ...
- SpringBoot 整合 Logback
Logback is intended as a successor to the popular log4j project, picking up where log4j leaves off.L ...
- Linux C笔记
<Linux C编程一站式学习>笔记 gcc编译 直接编译 gcc main.c a.out 指定可执行文件名 gcc main.c -o main main 提示所有的警告信息 gcc ...
- python 四种单例模式
1 使用__new__方法 Python class Singleton(object): def __new__(cls, *args, **kw): if not hasattr(cls, '_i ...
- C#泛型设计的一个小陷阱.
距离上次发表博客已经有几年了. 对于没能坚持更新博客,实在是感觉到甚是惭愧. 闲言少叙, 直接切入主题. 背景 最近一直在对于公司一个网络通信服务程序使用.net core 进行重构.重构的目的有两个 ...
- ios碎片小记
一.UIImageView 1.图片形状设为圆形时可能会由于图片的宽高比例导致显示出来的效果不是圆形 解决:设置UIImageView的contentMode为UIViewContentModeSca ...