- 論壇徽章:
- 1
|
作者:sunlan 出處:Unix愛好者家園unix-cd.com
前段時間發(fā)了一個帖子介紹在SCO OpenServer下如何編譯及使用CVS,現(xiàn)在再補充一下UnixWare下CVS的編譯方法。
在UnixWare下如不對代碼進(jìn)行修改直接編譯,會產(chǎn)生一堆下面的錯誤信息:
UX:acomp: ERROR: "buffer.c", line 65: undefined struct/union member: _shutdown
UX:acomp: WARNING: "buffer.c", line 65: improper pointer/integer combination: op "="
UX:acomp: ERROR: "buffer.c", line 1244: undefined struct/union member: _shutdown
UX:acomp: WARNING: "buffer.c", line 1245: improper member use: _shutdown
UX:acomp: ERROR: "buffer.c", line 1245: cannot dereference non-pointer type
UX:acomp: ERROR: "buffer.c", line 1245: function designator is not of function type
UX:acomp: WARNING: "buffer.c", line 1245: improper pointer/integer combination:op "="
UX:acomp: ERROR: "buffer.c", line 1300: undefined struct/union member: _shutdown
UX:acomp: WARNING: "buffer.c", line 1300: improper pointer/integer combination:op "=="
這是由于在struct buffer中定義了一個函數(shù)指針int (*shutdown) PROTO((struct buffer *))引起的。根據(jù)判斷,這可能是由于UnixWare的編譯器將shutdown作為保留關(guān)鍵字引起的。我們的解決辦法是將struct buffer中的shutdown更名,例如改成buffer_shutdown。具體的做法如下:
1.修改src/buffer.h第78行:
int (*shutdown) PROTO((struct buffer *));
改為
int (*buffer_shutdown) PROTO((struct buffer *));
2.修改src/buffer.c,將其中對buffer成員函數(shù)指針shutdown的引用改為buffer_shutdown。采用的辦法是全文替換:
:1,$ s/->shutdown/->buffer_shutdown/g
在完成上述操作后,重新執(zhí)行make,即可順利完成編譯。
其他的安裝及配置與OpenServer下的一致。
本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/31/showart_509078.html |
|