|
|

楼主 |
发表于 2007-3-28 20:40:46
|
显示全部楼层
源里没有这个东西,它在sourceforge的网址是
http://sourceforge.net/projects/ptedit/
我拿gcc 3.4编译的结果是:
common.c:30: error: syntax error before "_llseek"
common.c:34: warning: return type defaults to `int'
common.c: In function `_syscall5':
common.c:35: error: syntax error before '{' token
common.c:37: error: parameter `bytes' is initialized
common.c:37: error: `starting_sector' undeclared (first use in this function)
common.c:37: error: (Each undeclared identifier is reported only once
common.c:37: error: for each function it appears in.)
common.c:37: confused by earlier errors, bailing out
拿gcc-4.1编译的结果是:
common.c:30: error: expected declaration specifiers or '...' before '_llseek'
common.c:30: error: expected declaration specifiers or '...' before 'fd'
common.c:30: error: expected declaration specifiers or '...' before 'hi'
common.c:30: error: expected declaration specifiers or '...' before 'lo'
common.c:30: error: expected declaration specifiers or '...' before 'res'
common.c:30: error: expected declaration specifiers or '...' before 'wh'
common.c:34: warning: return type defaults to 'int'
common.c: In function '_syscall5':
common.c:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:73: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:105: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:128: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:134: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:152: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:171: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:192: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:210: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:228: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
common.c:30: error: parameter name omitted
common.c:30: error: parameter name omitted
common.c:30: error: parameter name omitted
common.c:30: error: parameter name omitted
common.c:30: error: parameter name omitted
common.c:30: error: parameter name omitted
common.c:256: error: expected '{' at end of input
问题是这个声明行好像可能有问题,下面的倒数第二行是30行,就是出错的行
#include <stdio.h>
#include <string.h>
#include "common.h"
extern uint sector_size;
extern _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh)
/* warning: ISO C does not allow extra `;' outside of a function */ |
|