- 论坛徽章:
- 0
|
[起因]\r\n\r\n大家有没有类似用法:\r\n\r\n 在一个.pc程序中,既用嵌入式SQL语句操作数据库,又用ipc相关函数(shmget, shmat, shmxx)操作共享内存?\r\n\r\n[问题]\r\n\r\n 以前在aix的vac5.0版本上用,是没有问题的,运行也正常。\r\n\r\n 最近升级到vac6.0以上的版本(vac6.0,vac8.0都试过),用proc预编译总是报头文件错,错误节选如下\r\n\r\nPro*C/C++: Release 9.2.0.8.0 - Production on Fri Oct 31 15:18:15 2008\r\n\r\nCopyright (c) 1982, 2002, Oracle Corporation. All rights reserved.\r\n\r\nSystem default option values taken from: /oracle/app/oracle/product/9.2/precomp/admin/pcscfg.cfg\r\n\r\nSyntax error at line 256, column 29, file /usr/include/sys/ras.h:\r\nError at line 256, column 29 in file /usr/include/sys/ras.h\r\nRAS_FILE_ASSERT( baddomain, RASC_COMMAND(0x100, 0x1) == -1LL );\r\n............................1\r\nPCC-S-02201, Encountered the symbol \"L\" when expecting one of the following:\r\n\r\n , = : ( [ * ? | & < > + - / % . ^ *= /= %= += -= <<= >>= &&=\r\n ||= ^= | & == != <= >= << >> ++ -- ->\r\nThe symbol \",\" was substituted for \"L\" to continue.\r\n\r\nSyntax error at line 256, column 60, file /usr/include/sys/ras.h:\r\nError at line 256, column 60 in file /usr/include/sys/ras.h\r\nRAS_FILE_ASSERT( baddomain, RASC_COMMAND(0x100, 0x1) == -1LL );\r\n...........................................................1\r\nPCC-S-02201, Encountered the symbol \"L\" when expecting one of the following:\r\n\r\n , ( ) [ * ? | & < > + - / % . ^ | & == != <= >= << >> ++ --\r\n ->\r\nThe symbol \",\" was substituted for \"L\" to continue.\r\n。。。。。。\r\n\r\n[分析]\r\n\r\n oracle的proc/c预编译器对vac6.0以上版本支持的问题?bug或刻意禁止此类操作?\r\n(尚无法证实!)\r\n\r\n[目前处理]\r\n\r\n 1. 方法一 \r\n 降低vac的版本(原始做法)\r\n\r\n 2. 方法二\r\n 将pc程序中的共享内存相关操作剥离出来, 以另一个.c程序的形式存在,待proc将不含共享内存操作的.pc编译成.c后. 将其与共享内存操作的.c一起编译成目标,通过\r\n\r\n[总结]\r\n\r\n 方法一,比较简单,但是现在低版本的东西不好找\r\n 方法二,曲线救国,但是需要改代码,工作量比较大\r\n\r\n[提问]\r\n \r\n 有没有人知道,是否可以通过打补丁或改配置类似的方式,既不用改程序,又不用降vac版本来满足需要??? (欢迎讨论,多谢了先!) |
|