MyVirgo

            /ASM/C++/JAVA/JSP/SQL/逆向工程/密码学/

  C++博客 :: 首页 :: 联系 :: 聚合  :: 管理
  2 Posts :: 2 Stories :: 14 Comments :: 0 Trackbacks

常用链接

留言簿

我参与的团队

搜索

  •  

最新评论

阅读排行榜

评论排行榜

2005年12月4日 #

今天在FreeBSD 5.4 Release中安装Firefox, 先更新ports tree到最新版本:

FreeBSD# cvsup -g -L 2 /root/ports-supfile

然后到Firefox的目录中去执行make:

FreeBSD# cd /usr/ports/www/firefox
FreeBSD# make

没多久,系统就爆出了编译错误:

nsHostResolver.h:95: error: ISO C++ forbids declaration of `PRAddrInfo' with no type
nsHostResolver.h:95: error: expected `;' before '*' token
nsHostResolver.h: In member function `PRBool nsHostRecord::HasResult() const':
nsHostResolver.h:99: error: `addr_info' undeclared (first use this function)
nsHostResolver.h:99: error: (Each undeclared identifier is reported only once for each function it appears in.)
nsHostResolver.h: At global scope:
nsHostResolver.h:209: error: `PRAddrInfo' has not been declared
nsHostResolver.h:209: error: ISO C++ forbids declaration of `parameter' with no type
nsDNSService2.cpp: In member function `virtual nsresult nsDNSRecord::GetCanonicalName(nsACString&)':
nsDNSService2.cpp:95: error: 'class nsDerivedSafe' has no member named 'addr_info'
nsDNSService2.cpp:96: error: 'class nsDerivedSafe' has no member named 'addr_info'
nsDNSService2.cpp:96: error: `PR_GetCanonNameFromAddrInfo' undeclared (first use this function)
nsDNSService2.cpp: In member function `virtual nsresult nsDNSRecord::GetNextAddr(PRUint16, PRNetAddr*)':
nsDNSService2.cpp:112: error: 'class nsDerivedSafe' has no member named 'addr_info'
nsDNSService2.cpp:113: error: 'class nsDerivedSafe' has no member named 'addr_info'
nsDNSService2.cpp:113: error: `PR_EnumerateAddrInfo' undeclared (first use this function)
nsDNSService2.cpp: In member function `PRUint16 nsDNSService::GetAFForLookup(const nsACString&)':
nsDNSService2.cpp:528: error: `PR_AF_UNSPEC' undeclared (first use this function)
gmake[4]: *** [nsDNSService2.o] Error 1
gmake[4]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk/dns/src'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk/dns'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk'
gmake[1]: *** [tier_9] Error 2
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla'
gmake: *** [default] Error 2
*** Error code 2

引起这个问题的原因是Firefox在老版本的nspr上会存在问题,无法通过编译!
需要安装
Port:  nspr-4.4.1_1
Path:  /usr/ports/devel/nspr
posted @ 2005-12-04 13:07 SkyFuture 阅读(356) | 评论 (0)编辑 收藏

2005年11月19日 #

今天在看微软关于fat格式的白皮书的时候看到了一个名词:Little-Endian

什么是Big?什么是Little?要理解这个问题,必须要知道数据在机器中存储的规则.....

    所谓的Little-Endian,就是我们在学习汇编时候的高高低低原则,而Bit-Endian就是刚刚相反,例如:12345678h这个数据,在不同机器中存储是不同的

                 Big-Endian                                      Little-Endian

0字节            12h                                                    78h

1字节            34h                                                    56h

2字节            56h                                                    34h

3字节            78h                                                    21h

Little-Endian主要用在我们现在的PC的CPU中,Big-Endian则应用在目前的Mac机器中(注意:是指Power系列 处理器)

关于优点和缺点,网上讨论的很多, 自己去看一下吧...

 

PS:关于Endian这个词语,我在网上看到其意思和起源

以下内容来自Pconline:

“endian”这个词出自《格列佛游记》。小人国的内战就源于吃鸡蛋时是究竟从大头(Big-Endian)敲开还是从小头(Little-Endian)敲开,由此曾发生过六次叛乱,其中一个皇帝送了命,另一个丢了王位。

我们一般将endian翻译成“字节序”,将big endian和little endian称作“大尾”和“小尾”。
posted @ 2005-11-19 10:09 SkyFuture 阅读(15414) | 评论 (14)编辑 收藏