各位大哥,今天编了个bu.sybox,源代码是在
www.busybox.net/download网上下的b.usybox-1.10.1电影
make出现以下错.误,这些错误都怎么.改啊......域名
都怎么分析 呢?
root@localho.st busybox-1.10.1]# .make 外汇
CC.. miscutils/taskset.o虚拟主机
miscutils/taskset.c:15: parse. error before '*' toke.n--------------彩票
miscutils/taskset.c:16: .warning: function de.claration isn't a prototype 鲜花
miscutils/taskset..c: In function `__f.rom_cpuset':.
miscutils/taskset.c:20: `CPU_SETSIZE' unde..clared .(first use in this function).
miscuti.ls/taskset.c:20: (Each undeclared id.entifier is reported only once
miscutils/tasks.et.c:20: for each function it .appears in.)虚拟主机
miscutils/taskset.c:24: .warning: implicit declaration of fun.ction `CPU._ISSET'.
miscutils/task.set.c:24: `mask' undeclared (first use i.n this function)投资
miscutils/tasks.et..c: In function `taskset_main':健康
miscutils/taskset.c:44: `cpu_set_t' undecl.ared .(first use in this function)--------------彩票
miscutils/taskset.c:44: parse error ..before "mask".
miscuti.ls/taskset.c:77: `mask' undeclared (first use in this .function)域名
miscut.ils/task.set.c:95: wa.rning: implicit declaration of function `CPU_ZERO'.
miscutils/t.askset.c:96: `CPU_SETSIZE' undeclared (f..irst use in this function)域名
miscutils/taskset.c:99: warning: implicit declaration of fu.nction. `CPU_SET'电脑
make[1]: *** [.miscutils/taskset.o] Error. 1健康
make: *** [m.is.cutils] Error 2 电子
[.root@local.host busybox-1.10.1]#.
taskset.c源.文件如下:.
/* vi: set. sw=4 ts=4: */ 乙肝
/*
* taskset - retrieve or s.e.t a processes' CPU affinity.
* Copyright (c.) 2.006 Bernhard Fischer.
*
* Licensed und.er GPLv.2 or later, see file LICENSE in this tarbal.l for details.
*/
#include. <sched.h>教育
#in.clude <getopt.h> /.* optind */服务器
#include "libbb.h.".
#if ENABLE_FEA.TURE_TASK.SET_FANCY.
#define TASKSET_PRIN.T.F_MASK "%s"教育
#define fro.m_cpuset(x) __from_cpu.set(&x) 建材
/* craft a strin.g from the. mask */.
static c.har *__fro.m_cpuset(cpu_set_t *mask) 电子
{
int i;
. .char *ret = 0, *str = xzalloc(9);.
for (i = CPU_SETSIZE - 4; i >=. .0; i -= 4) {投资
. c.har val = 0; 外汇
. int off;.
for (off = 0; off .<= .3; ++off).
. if (CPU_ISSET(i+off, mas.k))服务器
. . val |= 1<<off;电影
. if (!ret && v.al) 外汇
. . ret = str; 外汇
. . *str++ = (val-'0'<=9) ? (val+48 ) : (val+87);[成人用品]
}
. return ret;( 游戏 )
}
#else
#define T.A.SKSET_PRINTF_MASK "%x".
/* (voi.d*) cast is for battling gcc: *./( 游戏 )
/* "dereferenc.ing type-punned pointer will. break strict-aliasing rules" */投资
#define from_cp.uset(mask) (*(unsigned*)(vo.id*)&(mask)) 电子
#endif
int tasks.et_main(int .argc, char **argv) MAIN_EXTERNALLY_VISIBLE;投资
in.t taskset_main(int argc ATTRIBUTE_UNUSED, char **arg.v).
{
cp.u_set_t mask;电脑
pid_.t pid = 0; 婚庆
. unsigned opt_p;学习
.. const char *current_new;外贸
.char *pid_str;<性病>
. .char *aff = aff; /* for compiler */--- 印刷
/* NB: we mimic util.-linux.'s taskset: -p does not take 健康
* .an argument, i.e., "-p.N" is NOT valid, only "-p N"!(广告)
. * .Indeed, util-linux-2.13-pre7 uses:教育
* getopt_long(argc, argv,. "+pchV", ...),. not "...p:..." */--------------彩票
opt_complemen.tary = "-1"; /* at leas.t 1 arg */[成人用品]
op.t_p = getopt32(argv, ."+p");健康
argv +=. optind;<性病>
if (opt_.p) { 外汇
. pid_st.r = *argv++;虚拟主机
if (*argv) { /* "-.p <aff> <pid> ...re.st.is.ignored..." */学习
. . aff = pid_str;--- 印刷
pid_str =. *argv;. /* NB: *argv != NU.LL in this case */ 婚庆
. }虚拟主机
/* else it was jus.t "-p <pid>", and *argv == NULL *./.
. pid = xatoul_range(.pid_str, 1, ((unsigned)(pid_t)ULONG_MAX.) >> 1);.
. } else {.
a.ff = *argv++; /*. <aff> <cmd...> */.
. if (!*argv.)--------------彩票
. b.b_show_usage();.
}
current_new = "current\0new.."; 乙肝
if (opt_.p) {服务器
print_aff:
. if (sched_getaf.finity(pid, sizeof(mask), &mask) < 0)( 游戏 )
. bb_perror_msg_and._die("ca.n't %cet pid %d's affinity", 'g', pid); 建材
. pr.intf("pid %d's %s affinity mask: "TASKSET_PRINTF._MASK"\n", 电子
. . pid, current_new, from_cpuset(mask));--- 印刷
if. (!*argv). { 电子
. /* Eithe.r it was just "-p <pid>", 建材
* or it was "-p <aff> <pid>" and we came. he.re 婚庆
* for the second time .(see. goto below) */虚拟主机
return EXIT_.SUCCES.S; 乙肝
. }服务器
. *argv .= NULL;.
current_new .+= 8; /* ."new" */ 女人
}
{ /* Affinity was sp.ecified, translate it into c.pu_set_t */教育
..unsigned i;.
. /* Do not allow ze.ro mask: */
. .unsigned long long m = xstrt.oull_range(aff, 0, 1, ULLONG_MAX);.
. CPU_ZERO(&m.ask); 女人
. for (i = 0; i < CPU_SETS.IZE; i++) {( 游戏 )
unsigned. l.ong long bit = (1ULL << i);--- 印刷
if. (bi.t & m)<性病>
. . CPU_SET(i, &mask);.
. } 汽车
}
/* Set pid's or our own (pid==0) af.finity .*/ 鲜花
. . if (sched_setaffinity(pid, sizeof(mask), &mask))健康
. bb_.p.error_msg_and_die("can't %cet pid %d's affinity", 's', pid); 汽车
. if (!*argv) /* "-p <aff> <pid> [...ign.ored...]" */ 健康
. goto print_aff; /* print new affinity. and exit */电影
. BB_.EXECVP(*argv, argv);学习
. bb_simp.le_perror_msg_and_die(*argv);.
}
[ 本帖最后由 waveson-.linux 于. 2009-4-26 20:46 编辑 ] 女人