|
|
我下载了 《UNIX网络编程 第2卷 进程间通信》中的源代码(包括unpipe.h等等),按照说明文档上使用./configure没有出现任何问题,可是在执行make时,出现了如下问题:
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -o daemon_inetd.o daemon_inetd.c
In file included from /usr/include/netinet/in.h:23,
from /usr/include/rpc/types.h:90,
from /usr/include/rpc/rpc.h:41,
from unpipc.h:115,
from daemon_inetd.c:1:
/usr/include/stdint.h:49: 错误:重复的 ‘unsigned’
/usr/include/stdint.h:49: 错误:声明指定了两个以上的数据类型
/usr/include/stdint.h:50: 错误:重复的 ‘unsigned’
/usr/include/stdint.h:50: 错误:重复的 ‘short’
/usr/include/stdint.h:52: 错误:重复的 ‘unsigned’
/usr/include/stdint.h:52: 错误:声明指定了两个以上的数据类型
make: *** [daemon_inetd.o] 错误 1
按照说明文档第六条:
(6. If configure runs OK but you encounter problems building the library,
the easiest fix is to change either of the files "src/Make.defines" or
"src/config.h" accordingly. These two files are generated by the
configure script and are used by all the programs. You may need to
change the CFLAGS variable in "Make.defines" or comment out certain
features in "config.h".)
我的Make.defines如下:
CC = gcc
CFLAGS = -g -O2 -D_REENTRANT -Wall
LIBS = ../libunpipc.a -lrt -lpthread
LIBS_RPC = -lnsl
RANLIB = ranlib
RPCGEN_OPTS = -C
# Following is the main library, built from all the object files
# in the lib/ directories.
LIBUNPIPC_NAME = ../libunpipc.a
# Following are all the object files to create in the lib/ directory.
LIB_OBJS = daemon_inetd.o daemon_init.o error.o gf_time.o lock_reg.o lock_test.o my_shm.o px_ipc_name.o readable_timeo.o readline.o readn.o set_concurrency.o set_nonblock.o signal.o signal_intr.o sleep_us.o signal_rt.o signal_rt_intr.o timing.o tv_sub.o wrappthread.o wrapsunrpc.o wrapstdio.o wrapunix.o writable_timeo.o writen.o
CLEANFILES = core core.* *.core *.o temp.* *.out typescript* \
*.[234]c *.[234]h *.bsdi *.sparc *.uw
请问我应该怎么办?
ps:我系统是ubuntu5.10 |
|