⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 openmax.c

📁 unix环境编程
💻 C
字号:
#include "apue.h"#include <errno.h>#include <limits.h>#ifdef	OPEN_MAXstatic long	openmax = OPEN_MAX;#elsestatic long	openmax = 0;#endif/* * If OPEN_MAX is indeterminate, we're not * guaranteed that this is adequate. */#define	OPEN_MAX_GUESS	256longopen_max(void){	if (openmax == 0) {		/* first time through */		errno = 0;		if ((openmax = sysconf(_SC_OPEN_MAX)) < 0) {			if (errno == 0)				openmax = OPEN_MAX_GUESS;	/* it's indeterminate */			else				err_sys("sysconf error for _SC_OPEN_MAX");		}	}	return(openmax);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -