资源简介
glibc-2.16.0.tar.gz源码包,用于Centos6.X编译环境。
代码片段和文件信息
/* Skeleton for test programs.
Copyright (C) 19982000-2004 2005 2009 Free Software Foundation Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not see
. */
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* The test function is normally called ‘do_test‘ and it is called
with argc and argv as the arguments. We nevertheless provide the
possibility to overwrite this name. */
#ifndef TEST_FUNCTION
# define TEST_FUNCTION do_test (argc argv)
#endif
#ifndef TEST_DATA_LIMIT
# define TEST_DATA_LIMIT (64 << 20) /* Data limit (bytes) to run with. */
#endif
#define OPT_DIRECT 1000
#define OPT_TESTDIR 1001
static struct option options[] =
{
#ifdef CMDLINE_OPTIONS
CMDLINE_OPTIONS
#endif
{ “direct“ no_argument NULL OPT_DIRECT }
{ “test-dir“ required_argument NULL OPT_TESTDIR }
{ NULL 0 NULL 0 }
};
/* PID of the test itself. */
static pid_t pid;
/* Directory to place temporary files in. */
static const char *test_dir;
/* List of temporary files. */
struct temp_name_list
{
struct qelem q;
const char *name;
} *temp_name_list;
/* Add temporary files in list. */
static void
__attribute__ ((unused))
add_temp_file (const char *name)
{
struct temp_name_list *newp
= (struct temp_name_list *) calloc (sizeof (*newp) 1);
if (newp != NULL)
{
newp->name = name;
if (temp_name_list == NULL)
temp_name_list = (struct temp_name_list *) &newp->q;
else
insque (newp temp_name_list);
}
}
/* Delete all temporary files. */
static void
delete_temp_files (void)
{
while (temp_name_list != NULL)
{
remove (temp_name_list->name);
temp_name_list = (struct temp_name_list *) temp_name_list->q.q_forw;
}
}
/* Create a temporary file. */
static int
__attribute__ ((unused))
create_temp_file (const char *base char **filename)
{
char *fname;
int fd;
fname = (char *) malloc (strlen (test_dir) + 1 + strlen (base)
+ sizeof (“XXXXXX“));
if (fname == NULL)
{
puts (“out of memory“);
return -1;
}
strcpy (stpcpy (stpcpy (
相关资源
- Linux设备驱动开发详解-基于最新的L
- Linux设备驱动开发详解:基于最新的
- 鸟哥的Linux私房菜-基础学习篇(第四
- 智能家居系统代码
- linux/unix系统编程手册下
- ARM Linux内核源码剖析高清+目录
- jdk-8u151-linux-arm64-vfp-hflt.tar.gz
- LINUX系统及编程基础.pdf
- DevOps故障排除:Linux服务器运维最佳实
- chrome linux 32 deb
- cmake-3.15.3-Linux-x86_64.tar.gz
- Linux多线程服务端编程 - 陈硕高清完整
- windows 访问LINUX 分区ExtFS for Windows 4.
-
Visual em
bedLinux Tools 0.2.9 - Linux程序设计(第4版) (图灵程序设
- tensorflow-1.2.1-cp35-cp35m-linux_x86_64.whl
- 奶瓶1.2.1linux
- 深入理解BOOTLOADER 胡尔佳 高清扫描p
- Linux 教程166249
- 红帽Linux9
- Xilinx Zynq SoC与嵌入式Linux设计实战指南
- linux centos7_64 gcc依赖安装包
- Linux内核探秘 深入解析文件系统和设
- 手把手教你构建自己的Linux系统.pdf
- 鸟哥的Linux私房菜 第四版
- prometheus linux 2.9.1
- Linux内核设计与实现(第三版中文高清
- secureCRT win64破解版
- 飞思卡尔L3.0.35 Linux资料全套
- linux多线程服务器编程
评论
共有 条评论