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

📄 util_log.c

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻 C
字号:
/*- * See the file LICENSE for redistribution information. * * Copyright (c) 2000-2002 *	Sleepycat Software.  All rights reserved. */#include "db_config.h"#ifndef lintstatic const char revid[] = "$Id: util_log.c,v 1.11 2002/02/01 18:15:30 bostic Exp $";#endif /* not lint */#ifndef NO_SYSTEM_INCLUDES#include <sys/types.h>#include <stdlib.h>#if TIME_WITH_SYS_TIME#include <sys/time.h>#include <time.h>#else#if HAVE_SYS_TIME_H#include <sys/time.h>#else#include <time.h>#endif#endif#include <string.h>#include <unistd.h>#endif#include "db_int.h"/* * __db_util_logset -- *	Log that we're running. * * PUBLIC: int __db_util_logset __P((const char *, char *)); */int__db_util_logset(progname, fname)	const char *progname;	char *fname;{	FILE *fp;	time_t now;	u_int32_t id;	if ((fp = fopen(fname, "w")) == NULL)		goto err;	(void)time(&now);	__os_id(&id);	fprintf(fp, "%s: %lu %s", progname, (u_long)id, ctime(&now));	if (fclose(fp) == EOF)		goto err;	return (0);err:	fprintf(stderr, "%s: %s: %s\n", progname, fname, strerror(errno));	return (1);}

⌨️ 快捷键说明

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