times.h

来自「UNIX、linux密码的破密程序源代码实现」· C头文件 代码 · 共 33 行

H
33 行
字号
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-98 by Solar Designer *//* * Workaround a DJGPP time functions problem which could cause the system * date not to advance at midnight when a BIOS time query function resets * the overflow flag before DOS has a chance to see it. Note that there's * still a race condition in the code below, it's just far less likely to * cause any harm. The real fix would be more complicated... */#if !defined(_JOHN_TIMES_H) && defined(__DJGPP__)#define _JOHN_TIMES_H#include <sys/times.h>#include <dpmi.h>static inline clock_t safe_times(struct tms *buffer){	__dpmi_regs r;	r.h.ah = 0x2C;	__dpmi_int(0x21, &r);	return times(buffer);}#define times				safe_times#endif

⌨️ 快捷键说明

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