fix an error while building native gdb via ct-ng

来源:互联网 发布:java语言的特点有哪些 编辑:程序博客网 时间:2024/06/03 04:51

Build ERROR:

[ERROR]  ../ncurses/lib_gen.c:889:15: error: expected ')' before 'int'[ERROR]  make[3]: *** [../objects/lib_gen.o] Error 1[ERROR]  ../ncurses/lib_gen.c:889:15: error: expected ')' before 'int'[ERROR]  make[3]: *** [../obj_g/lib_gen.o] Error 1[ERROR]  make[2]: *** [all] Error 2

Fix Method:

step 1: modify MKlib_gen.sh

MKlib_gen.sh440 $preprocessor $TMP 2>/dev/null \441 | sed \442         -e 's/  / /g' \443         -e 's/^ //' \444         -e 's/_Bool/NCURSES_BOOL/g' \445 | $AWK -f $AW2 \446 | sed -f $ED3 \447 | sed \448         -e 's/^.*T_CALLED.*returnCode( \([a-z].*) \));/ return \1;/' \449         -e 's/^.*T_CALLED.*returnCode( \((wmove.*) \));/        return \1;/' \450         -e 's/gen_//' \451         -e 's/^[        ]*#/#/' \452         -e '/#ident/d' \453         -e '/#line/d' \454         -e '/# [0-9]* .*/d' \455 | sed -f $ED4456 

Step 2: rebuild 
Step 3: modify lib_gen.c
lib_gen.c888 NCURSES_BOOL889 NCURSES_EXPORT() (mouse_trafo) (int * a1, int * a2,  NCURSES_BOOL  z)890 {891         T((T_CALLED("mouse_trafo(%p,%p,%#lx)"), (const void *)a1, (const void *)a2, (long)z)); returnBool(wmouse_trafo(stdscr,a1,a2,z));892 }




0 0
原创粉丝点击