﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-MyVirgo</title><link>http://www.cppblog.com/future0906/</link><description>&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&amp;nbsp&lt;B&gt;/ASM/C++/JAVA/JSP/SQL/逆向工程/密码学/&lt;/B&gt;</description><language>zh-cn</language><lastBuildDate>Thu, 23 Apr 2026 10:09:41 GMT</lastBuildDate><pubDate>Thu, 23 Apr 2026 10:09:41 GMT</pubDate><ttl>60</ttl><item><title>编译/usr/ports/chinese/firefox_zh_CN无法通过的解决办法</title><link>http://www.cppblog.com/future0906/archive/2005/12/04/1525.html</link><dc:creator>SkyFuture</dc:creator><author>SkyFuture</author><pubDate>Sun, 04 Dec 2005 05:07:00 GMT</pubDate><guid>http://www.cppblog.com/future0906/archive/2005/12/04/1525.html</guid><wfw:comment>http://www.cppblog.com/future0906/comments/1525.html</wfw:comment><comments>http://www.cppblog.com/future0906/archive/2005/12/04/1525.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/future0906/comments/commentRss/1525.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/future0906/services/trackbacks/1525.html</trackback:ping><description><![CDATA[今天在FreeBSD 5.4 Release中安装Firefox， 先更新ports tree到最新版本：<br>
    <br>
    FreeBSD# cvsup -g -L 2 /root/ports-supfile<br>
    <br>
    然后到Firefox的目录中去执行make:<br>
    <br>
    FreeBSD# cd /usr/ports/www/firefox<br>
    FreeBSD# make<br>
    <br>
    没多久，系统就爆出了编译错误：<br>
    <br>
    nsHostResolver.h:95: error: ISO C++ forbids declaration of `PRAddrInfo' with no type<br>
    nsHostResolver.h:95: error: expected `;' before '*' token<br>
    nsHostResolver.h: In member function `PRBool nsHostRecord::HasResult() const':<br>
    nsHostResolver.h:99: error: `addr_info' undeclared (first use this function)<br>
    nsHostResolver.h:99: error: (Each undeclared identifier is reported only once for each function it appears in.)<br>
    nsHostResolver.h: At global scope:<br>
    nsHostResolver.h:209: error: `PRAddrInfo' has not been declared<br>
    nsHostResolver.h:209: error: ISO C++ forbids declaration of `parameter' with no type<br>
    nsDNSService2.cpp: In member function `virtual nsresult nsDNSRecord::GetCanonicalName(nsACString&amp;)':<br>
    nsDNSService2.cpp:95: error: 'class nsDerivedSafe' has no member named 'addr_info'<br>
    nsDNSService2.cpp:96: error: 'class nsDerivedSafe' has no member named 'addr_info'<br>
    nsDNSService2.cpp:96: error: `PR_GetCanonNameFromAddrInfo' undeclared (first use this function)<br>
    nsDNSService2.cpp: In member function `virtual nsresult nsDNSRecord::GetNextAddr(PRUint16, PRNetAddr*)':<br>
    nsDNSService2.cpp:112: error: 'class nsDerivedSafe' has no member named 'addr_info'<br>
    nsDNSService2.cpp:113: error: 'class nsDerivedSafe' has no member named 'addr_info'<br>
    nsDNSService2.cpp:113: error: `PR_EnumerateAddrInfo' undeclared (first use this function)<br>
    nsDNSService2.cpp: In member function `PRUint16 nsDNSService::GetAFForLookup(const nsACString&amp;)':<br>
    nsDNSService2.cpp:528: error: `PR_AF_UNSPEC' undeclared (first use this function)<br>
    gmake[4]: *** [nsDNSService2.o] Error 1<br>
    gmake[4]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk/dns/src'<br>
    gmake[3]: *** [libs] Error 2<br>
    gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk/dns'<br>
    gmake[2]: *** [libs] Error 2<br>
    gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla/netwerk'<br>
    gmake[1]: *** [tier_9] Error 2<br>
    gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla'<br>
    gmake: *** [default] Error 2<br>
    *** Error code 2<br>
    <br>
    引起这个问题的原因是Firefox在老版本的nspr上会存在问题，无法通过编译！<br>
需要安装<br>
Port:　 nspr-4.4.1_1<br>
    Path:　 /usr/ports/devel/nspr<img src ="http://www.cppblog.com/future0906/aggbug/1525.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/future0906/" target="_blank">SkyFuture</a> 2005-12-04 13:07 <a href="http://www.cppblog.com/future0906/archive/2005/12/04/1525.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于Big-Endian 和Little-Endian</title><link>http://www.cppblog.com/future0906/archive/2005/11/19/1193.html</link><dc:creator>SkyFuture</dc:creator><author>SkyFuture</author><pubDate>Sat, 19 Nov 2005 02:09:00 GMT</pubDate><guid>http://www.cppblog.com/future0906/archive/2005/11/19/1193.html</guid><wfw:comment>http://www.cppblog.com/future0906/comments/1193.html</wfw:comment><comments>http://www.cppblog.com/future0906/archive/2005/11/19/1193.html#Feedback</comments><slash:comments>14</slash:comments><wfw:commentRss>http://www.cppblog.com/future0906/comments/commentRss/1193.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/future0906/services/trackbacks/1193.html</trackback:ping><description><![CDATA[<P>今天在看微软关于fat格式的白皮书的时候看到了一个名词:Little-Endian</P>
<P>什么是Big?什么是Little?要理解这个问题,必须要知道数据在机器中存储的规则.....</P>
<P>&nbsp;&nbsp;&nbsp; 所谓的Little-Endian,就是我们在学习汇编时候的高高低低原则,而Bit-Endian就是刚刚相反,例如:12345678h这个数据,在不同机器中存储是不同的</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big-Endian&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 34h</P>
<P>3字节&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;78h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21h</P>
<P>Little-Endian主要用在我们现在的PC的CPU中,Big-Endian则应用在目前的Mac机器中(注意:是指Power系列 处理器)</P>
<P>关于优点和缺点,网上讨论的很多， 自己去看一下吧...</P>
<P>&nbsp;</P>
<P>PS:关于Endian这个词语,我在网上看到其意思和起源</P>
<P>以下内容来自Pconline:</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 5px; BACKGROUND: #f3f3f3; PADDING-BOTTOM: 5px; MARGIN: 5px 20px; BORDER-LEFT: #cccccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #cccccc 1px solid">
<P>“endian”这个词出自《格列佛游记》。小人国的内战就源于吃鸡蛋时是究竟从大头(Big-Endian)敲开还是从小头(Little-Endian)敲开，由此曾发生过六次叛乱，其中一个皇帝送了命，另一个丢了王位。</P>我们一般将endian翻译成“字节序”，将big endian和little endian称作“大尾”和“小尾”。</DIV><img src ="http://www.cppblog.com/future0906/aggbug/1193.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/future0906/" target="_blank">SkyFuture</a> 2005-11-19 10:09 <a href="http://www.cppblog.com/future0906/archive/2005/11/19/1193.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>