当前时区 GMT+8, 现在时间是 2008-7-5 13:02 游客: 注册 登录 仅登录论坛 | 搜索 帮助


标题: 取消了宏 _ s y s c a LL N后,怎么声明函数
  本主题由 月下刀客 于 2008-4-28 09:01 移动 
zuorizhifeng
新手上路
Rank: 1



UID 248223
精华 0
积分 1
帖子 1
阅读权限 10
注册 2008-3-27
状态 离线
发表于 2008-4-27 14:34  资料  短消息  加为好友 
取消了宏 _ s y s c a LL N后,怎么声明函数

2.6.X中,已经取消了宏_syscallN的定义,如果想要调用自己添加的系统函数怎么声明?

_syscall2(int,mycopy,const char *,s_file,const char *,t_file) 应该修改成什么??

有些说法是 int syscall(5,mycopy,const char *,s_file,const char *,t_file)??

但是有报错信息:
Compiler executable checksum: 92efef273c2911dfe2bff20f05a618b3
mycopy.c:13: 错误:expected declaration specifiers or ‘...’ before numeric constant
mycopy.c:13: 错误:expected declaration specifiers or ‘...’ before ‘mycopy’
mycopy.c:13: 错误:expected declaration specifiers or ‘...’ before ‘s_file’
mycopy.c:13: 错误:expected declaration specifiers or ‘...’ before ‘t_file’
mycopy.c: 在函数 ‘syscall’ 中:
mycopy.c:16: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
mycopy.c:13: 错误:省略了形参的名字
mycopy.c:13: 错误:省略了形参的名字
mycopy.c:22: 错误:expected ‘{’ at end of input

[ 本帖最后由 zuorizhifeng 于 2008-4-27 14:39 编辑 ]

顶部
 


Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
清除 Cookies - 联系我们 - 中国Linux公社 - WAP