|
WENV 编译报错。
gcc -Wl,--build-id=none -m64 -mno-sse -nostdlib -fno-zero-initialized-in-bss -fno-function-cse -fno-jump-tables -Wl,-N -fPIE -Iinclude/ wenv.c -o wenv.o
wenv.c: In function ‘main’:
wenv.c:173:37: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define VAR ((char (*)[MAX_VAR_LEN])BASE_ADDR)
^
wenv.c:195:43: note: in definition of macro ‘strcmp_ex’
#define strcmp_ex(arg,string) grub_memcmp(arg,string,0)
^
wenv.c:304:21: note: in expansion of macro ‘VAR’
if( 0 != strcmp_ex(VAR[_WENV_], "?_WENV") )// 检查默认变量
^
wenv.c:173:37: note: each undeclared identifier is reported only once for each function it appears in
#define VAR ((char (*)[MAX_VAR_LEN])BASE_ADDR)
^
wenv.c:195:43: note: in definition of macro ‘strcmp_ex’
#define strcmp_ex(arg,string) grub_memcmp(arg,string,0)
^
wenv.c:304:21: note: in expansion of macro ‘VAR’
if( 0 != strcmp_ex(VAR[_WENV_], "?_WENV") )// 检查默认变量
^
wenv.c: In function ‘check_Brackets’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:321:18: note: in expansion of macro ‘QUOTE_CHAR’
else if (*p == QUOTE_CHAR)
^
wenv.c: In function ‘skip_next’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:359:15: note: in expansion of macro ‘QUOTE_CHAR’
if (*arg == QUOTE_CHAR)
^
wenv.c: In function ‘call_func’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:623:10: note: in expansion of macro ‘ENVI’
sprintf(ENVI[_WENV_], "0x%X", ret);
^
wenv.c: In function ‘reset_func’:
wenv.c:173:37: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define VAR ((char (*)[MAX_VAR_LEN])BASE_ADDR)
^
wenv.c:650:33: note: in expansion of macro ‘VAR’
for(j=0; j < MAX_USER_VARS && VAR[j][0] != '\0'; j++)
^
wenv.c: In function ‘check_func’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:682:14: note: in expansion of macro ‘QUOTE_CHAR’
if (*p2 == QUOTE_CHAR)
^
wenv.c: In function ‘trim_p’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:837:12: note: in expansion of macro ‘QUOTE_CHAR’
if (*p != QUOTE_CHAR || **p_str != QUOTE_CHAR)
^
wenv.c: In function ‘replace_str’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:1379:45: note: in expansion of macro ‘QUOTE_CHAR’
if ((flags & REPLACE_TRIM_QUOTE) && *in == QUOTE_CHAR)
^
In file included from wenv.c:161:0:
wenv.c: In function ‘show_config’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
include/grub4dos.h:234:35: note: in definition of macro ‘printf’
#define printf(...) sprintf(NULL, __VA_ARGS__)
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:2041:30: note: in expansion of macro ‘QUOTE_CHAR’
printf("QUOTE_CHAR:\t%c\n",QUOTE_CHAR);
^
wenv.c: In function ‘config_func’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:178:40: note: in expansion of macro ‘ENVI’
#define QUOTE_CHAR (*(unsigned long *)(ENVI[_WENV_]+0x30))
^
wenv.c:2054:4: note: in expansion of macro ‘QUOTE_CHAR’
QUOTE_CHAR = *arg;
^
wenv.c: In function ‘exec_func’:
wenv.c:175:39: error: ‘BASE_ADDR’ undeclared (first use in this function)
#define ENVI ((char (*)[MAX_ENV_LEN])(BASE_ADDR + MAX_VARS * MAX_VAR_LEN))
^
wenv.c:2161:10: note: in expansion of macro ‘ENVI’
sprintf(ENVI[_WENV_], "0x%X", ret);
^
Makefile:21: recipe for target 'wenv.o' failed
make: *** [wenv.o] Error 1
|
|