锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品久久久久久国产潘金莲,香蕉久久一区二区不卡无毒影院 ,久久最新免费视频http://www.shnenglu.com/sscchh-2000/category/1673.html涓庡ぇ瀹朵竴璧峰垎浜煡璇?/description>zh-cnMon, 19 May 2008 21:15:11 GMTMon, 19 May 2008 21:15:11 GMT60姣嶄翰鑺傚揩鍒頒簡錛屽啓鐐逛笢瑗塊佺粰姣嶄翰http://www.shnenglu.com/sscchh-2000/archive/2006/05/12/7011.html鍙蹭紶綰?/dc:creator>鍙蹭紶綰?/author>Fri, 12 May 2006 06:10:00 GMThttp://www.shnenglu.com/sscchh-2000/archive/2006/05/12/7011.htmlhttp://www.shnenglu.com/sscchh-2000/comments/7011.htmlhttp://www.shnenglu.com/sscchh-2000/archive/2006/05/12/7011.html#Feedback18http://www.shnenglu.com/sscchh-2000/comments/commentRss/7011.htmlhttp://www.shnenglu.com/sscchh-2000/services/trackbacks/7011.html聽聽聽聽聽聽2000騫撮偅騫達紝鎴戣冧笂浜嗗悏鏋楀ぇ瀛︼紝姣嶄翰鍝簡銆傛垜鎯蟲瘝浜蹭篃鏄拰鎴戜竴鏍鳳紝鏈熷緟鐫榪欎釜姊︽兂錛岃岀湡姝e疄鐜頒簡鐨勬椂鍊欙紝鎴戜滑閮芥姂鍒朵笉浜嗛偅涓枩鎮︾殑蹇冩儏銆傛垜鎯蟲瘝浜蹭竴瀹氭劅鍒板緢騫哥錛屽ス浼氭劅鍒板緢楠勫偛鐨勩傚彲鑳芥湁浜涗漢浼氭兂錛岃冧簡澶у鏈変粈涔堜簡涓嶈搗鐨勶紝鐜板湪鐨勫ぇ瀛︾敓璺熸皯宸ヤ竴鏍鳳紝鍒板閮芥槸銆備篃娌℃湁浠涔堝ソ楠勫偛鐨勫惂銆傚彲鏄紝鍦ㄨ繖閲屾垜瑕佸憡璇変綘錛屾垜浠偅涓潙錛岀敋鑷抽偅涓埂錛屽湪鎴戠殑璁板繂涓紝灝卞嚭鏉ヨ繖鏍蜂竴涓ぇ瀛︾敓錛岄偅宸茬粡鏄笂涓笘綰叚涓冨崄騫翠唬鐨勪簨鎯呬簡錛屼篃灝辨槸鍦ㄤ腑闂撮殧浜嗚繎30騫翠簡銆備綘鍙互鎯寵薄閭f牱鐨勫満鏅傛瘝浜茶兘涓嶉獎鍌插槢錛熷叾瀹炴瘝浜茬殑綆℃暀鐜板湪鎯蟲潵錛屼笉鏄肩潃璁╂垜瀛︿範錛岃屾槸璁╂垜鑷敱鐨勫彂灞曪紝璇磋搗鏉ヤ篃鎬紝灝忔椂鍊欐垜鍙槸涓涓潪甯歌皟鐨殑瀛╁瓙錛屾暣澶╁拰浼欎即浠帺鐨勫緢鐤傚埌澶勪笅娌蟲崏楸鹼紝涓婃爲鎺忛笩紿濄傚嚒鏄兘鐜╃殑閮界帺浜嗐傝繖鍙兘璺熸瘝浜茬殑璦浼犺韓鏁欐湁鍏崇郴鐨勩傝〃濮愪篃鏇鵑棶榪囨垜錛氣滃皬鏃跺欏ぇ瀹墮兘鏄竴璧風帺鐨勶紝鐢氳嚦姣旀垜榪樼敤鍔燂紝鎬庝箞鎴戞病鏈夎冧笂澶у浣犲幓鑰冧笂浜嗗憿錛熲濇垜涔熷紑鐜╃瑧鐨勫洖絳旓細鍏跺疄鎴戠帺鐨勬椂鍊欙紝澶磋剳榪樻槸鍦ㄦ濊冧笢瑗垮憿銆傚叾瀹炶〃濮愪篃鏄竴涓緢浼樼鐨勶紝鍙槸鐢變簬瀹跺涵鐨勫師鍥狅紝瀹炲湪澶┓浜嗭紝涓婂畬浜嗗垵涓氨娌℃湁涓婂浜嗐傝鍒拌繖閲岋紝鍏跺疄鍦ㄦ垜浠潙閲岋紝鎴栬呬換浣曚竴涓傳絀風殑鍐滄潙錛屾垜浠繖浜涘瀛愪笉鏄錛岃屾槸鐪熸鐢變簬瀹墮噷瀛╁瓙澶氾紝鍙堥潪甯歌傳絀鳳紝鍙堣璁╂瘡涓瀛愰兘鑳借鐐逛功錛岃涓婂嚑涓瓧銆傛墍浠ュぇ閮ㄥ垎鐨勪漢閮藉彧鑳借鍒板垵涓敋鑷沖皬瀛︽病鏈夋瘯涓氬氨杈嶅浜嗐傛墍浠ユ垜瑙夊緱姣嶄翰闅捐兘鍙吹鐨勶紝灝辨槸濂圭殑鍧氭寔錛屽洜涓哄湪鎴戝垵涓夐偅騫存瘯涓氱殑鏃跺欙紝鐢變簬鑰冭瘯鎴愮嘩涓嶇悊鎯籌紝瑕佽楂樹腑榪橀渶瑕佷氦浜斿崈鍧楅挶鐨勬墿鎷涜垂銆傞偅涓椂鍊欑湡鏄潪甯歌壈闅劇殑涓姝ャ傜湡鍙互鐢ㄦ憯閿呭崠閾佹潵褰㈠銆傛墍浠ユ垜寰堟劅璋㈡瘝浜插湪閭d箞鍥伴毦鐨勬椂鍊欒兘澶熷挰鐗欐拺榪囨潵浜嗐傚綋鐒跺湪榪欓噷榪樿鎰熻阿鎴戠殑騫茬埜騫插銆傛病鏈変粬浠殑澶у姏鏀寔鎴戜篃寰堥毦璧板埌榪欎竴姝ャ?br />聽聽聽聽聽聽9鏈堜喚錛屾垜紱誨紑浜嗙敓鎴戝吇鎴戠殑閭d釜璐槧鐨勫啘鏉戯紝涓磋蛋鐨勬椂鍊欙紝鎴戞鎻g潃鍏崈鍧楅挶韙忓線闀挎槬鐨勫垪杞︿笂銆傚叓鍗冨潡閽遍噷闈㈢幇鍦ㄨ繕娓呮鐨勮寰楋細鍙斿彅鍊熺殑涓ゅ崈錛岃垍鑸呭熺殑涓鍗冿紝琛ㄥ摜鍊熺殑涓鍗冧簲錛岃繕鏈夊Ж鍝ュ熺殑涓鍧楀拰濮ㄥ鍊熺殑浜旂櫨銆傚墿涓嬬殑涓ゅ崈鏄翰鏈嬪ソ鍙嬫潵鍜屽枩閰掔粰鐨勩備粠姝ゅ紑濮嬩簡鎴戝湪闀挎槬鐨勬眰瀛︿箣璺備篃灝辨槸鎴戞潵鍒伴暱鏄ヤ箣鍚庣殑涓や釜鏈堝乏鍙籌紝鐖朵翰鍜屾瘝浜蹭篃鍘諱簡涓婃搗銆傜洰鐨勫氨鏄墦宸ョ粰鎴戞專鏉ュ勾鐨勫璐廣傝鐭ラ亾浜叉垰瀹墮噷鐨勭敓媧諱篃騫朵笉濂斤紝鑳芥敮鍔╂垜榪欎箞澶氶挶璇諱功瀹炲湪涓嶆槗浜嗐備笅涓騫寸殑瀛﹁垂褰撶劧涓嶅彲鑳斤紝涔熶笉濂芥剰鎬濆紶鍙d簡銆傚厛寮濮嬭璇存垜鐨勭埗姣嶅惂錛屾潵鍒頒簡涓婃搗錛屼粬浠湡鐨勪笉瀹規槗銆傚湪鑰佷埂鐨勫府鍔╀笅錛屽緢蹇埗姣嶄究寮濮嬩簡絎竴浠藉伐浣溿傛瘝浜插湪涓涓彍甯傚満閲岄潰甯埆浜哄崠楦¢腑錛屽紱界瓑錛屼竴涓湀500鍧楅挶銆傝璧鋒潵榪欎釜鍙兘鐪嬩笂鍘誨茍涓嶆庝箞澶緵鑻︺備絾鏄垜瑕佽榪欎釜宸ヤ綔鎴戞瘝浜插挰鐗欏潥鎸佷簡涓や釜鏈堟渶緇堣緸鍘諱簡銆備負浠涔堝憿錛熸瘝浜叉瘡澶╂棭涓?鐐瑰氨璧峰簥錛岀劧鍚庡埌鑿滃競鍦哄幓錛岃繖涓椂鍊欐湁涓杞﹁揣錛岀敱浜庤彍甯傚満鏄湪浜屾ゼ錛屾瘝浜詫紙榪樻湁鍙﹀涓涓樋濮紝鐢熸椿涔熶竴瀹氫笉鏄擄紝鍚﹀垯鏍規湰涓嶅彲鑳芥潵榪欎釜鍦版柟錛変粬浠咯灝變竴涓張涓涓弧杞藉紱界殑綃瓙寰浜屾ゼ涓婇潰鐖傝繖鏍蜂竴涓灝忔椂鍊欎箣鍚庡氨寮濮嬬粰搴椾富鍗栵紝鐒跺悗鎶婁竴鍙張涓鍙殑瀹剁瀹版潃錛岀劧鍚庡幓鐨紝媧楀共鍑銆傚氨榪欐牱涓孌墊椂闂達紝姣嶄翰鏁翠釜浜鴻偪鐨勪笉鎴愭牱瀛愪簡錛屾墜鐨浜嗕竴灞傚張涓灞傘傚洜涓哄疄鍦ㄦ尯涓嶄綇浜嗭紝鍘誨尰闄㈡不鐤椼傜粨鏋滆緵鑻︽專浜嗕竴鐐歸挶鍑犱箮閮界敤鍦ㄤ簡鍖葷枟璐逛笂闈簡銆傚啀鏉ヨ璇寸埗浜插惂錛岀埗浜茬殑絎竴浠藉伐浣滄槸閫佽揣錛屽氨鏄偅涓剼韞笁杞濺錛屾瘡澶╅佸ソ鍑犳錛屾瘡嬈℃湁濂藉嚑鐧炬枻錛屾湁鏃跺欒兘杈懼埌涓婂崈鏂ゃ備竴涓湀涔熷氨鍏竷鐧懼潡閽便傚氨榪欐牱涔熸尯浜嗗嚑涓湀渚胯緸浜嗐傛垜榪樻湁涓涓濡癸紝鐖舵瘝榪欐澶栧嚭鎵撳伐錛屼笉浠呬粎鏄負浜嗘垜涓涓漢鐨勬眰瀛︺傚洜涓烘垜濡瑰涔熼珮涓浜嗭紝鐖舵瘝涓嶄粎浠呰渚涙垜涓涓漢銆?br />聽聽聽聽聽聽鏉ュ埌浜嗛暱鏄ワ紝涓鍒囬兘鏄偅涔堟柊濂囷紝鐪嬪埌浜嗗ぇ瀛︾敓媧葷湡鐨勬槸澶嚜鐢變簡銆傛病鏈夎佸笀鐨勭鏉熴備篃璁告槸鎴戠殑鐞嗘兂錛屼篃璁告槸榪欐潵涔嬫槗鐨勬眰瀛︽満浼氾紝鎴戜粛鐒舵兂鍦ㄩ珮涓偅鏍鳳紝鍔姏瀛︿範錛屽洜涓烘垜鐨勭悊鎯蟲槸瑕佽鐖舵瘝榪囦笂騫哥鐨勭敓媧伙紝涓嶅啀閭d箞鎿嶅姵銆傝涔℃潙浠兘鑳藉榪囦笂騫哥鐨勭敓媧匯傛墍浠ユ垜蹇呴』鍔姏瀛︿範錛屾潵瀛︿範鍒扮湡姝g殑鏈錛岃繖鏍鋒墠鏈夊笇鏈涖傝鎴戞剰澶栫殑鏄紝絎竴騫寸粨鏉熶箣鍚庯紝鎴戠珶鐒惰幏寰椾簡濂栧姪瀛﹂噾鍏?700鍧楅挶銆傝繕璁板緱褰撴椂鎴戠畝鐩翠笉鏁㈢浉淇¤繖鏄湡鐨勩傝繖鍙槸闇瑕佹瘝浜叉棩鏃ュ澶滄嫾鍛芥專涓婁竴騫村晩錛佹垜涓嶇煡閬撹璇翠粈涔堝ソ錛屽彧鑳芥劅璋㈠鏍″鎴戠殑鍏蟲銆傚氨榪欐牱錛屾垨璁告槸鍙楀埌浜嗘縺鍔憋紝鎴栬鎴戠湡鐨勫緢浼樼銆傛暣涓ぇ瀛﹀洓騫存垜涓鍏辮幏寰椾簡濂栧姪瀛﹂噾鍏?6錛?00鍧楅挶錛堝叾涓瀛﹂噾12錛?00錛夈傚啀鍔犱笂涓浗宸ュ晢閾惰璐鋒14錛?00銆備嬌鎴戦『鍒╃殑瀹屾垚浜嗗ぇ瀛﹀洓騫寸殑瀛︿笟銆傞櫎浜嗗涓氫箣澶栥傛垜榪樼敤涓閮ㄥ垎閽辨敮鍔╂垜濡瑰璇諱功銆傚彟澶栫敱浜庣埛鐖峰ザ濂跺勾綰ぇ浜嗭紝鐖稿浠栦滑鍙堜笉鍦ㄨ韓杈廣傛垜涔熺粰浠栦滑瀵勮繃鍑犳鐢熸椿璐廣傝繕璁扮潃鏈澶氫竴嬈℃槸500錛岄偅鏃跺欑埛鐖風敓鐥呬簡錛岄渶瑕佷綇闄€傛澶栫敱浜庣埜濡堝湪澶栨墦宸ワ紝澶у浠栦滑緇欐垜瀹剁鍦般傛垜涔熷瘎榪囧嚑鐧懼潡閽便傚悓鏃朵篃綆楁槸鍑忚交浜嗙埜濡堜粬浠殑涓鐐硅礋鎷呭惂銆傛暣涓ぇ瀛︾敓媧昏繃寰楀緢鍏呭疄錛屾洿璁╂垜騫歌繍鐨勬槸錛岄亣鍒頒簡涓涓鎴戞湁鐭ラ亣涔嬫仼鐨勮佸笀錛屼篃灝辨槸鎴戠幇鍦ㄧ殑瀵煎笀闄堣佸笀錛屼粬瀵規垜鐢熸椿鍜屽涔犱笂鐨勫府鍔╄鎴戞劅嬋涓嶅敖錛涜屼笖鎴戣繕閬囧埌浜嗕竴涓氭儏杈劇悊錛岃壈鑻︽湸绱犺屽張鍗佸垎婕備寒鐨勫コ瀛╋紝涔熷氨鏄垜鐨勫コ鏈嬪弸闇栭湒錛岃繖鍑犲勾鏉ョ湡鐨勫緢鎰熻阿濂圭殑鐞嗚В鍜屾敮鎸併?br />聽聽聽聽聽聽涓嶄絾鎴戣幏寰椾簡榪欎箞澶氱殑騫歌繍銆傛垜鐨勫濡逛篃鏄垢榪愮殑銆傜敱浜庢垜鍦ㄥ鏍″拰鍥藉鐨勬敮鍔╀笅瀹屾垚浜嗗涓氾紝鎴戠埜濡堣緵鑻︽專鐨勯挶灝辮兘澶熶緵鎴戝濡硅涔︿簡銆傜幇鍦ㄦ垜濡瑰宸茬粡蹇瘯涓氫簡錛岀洰鍓嶅湪瀹炰範涓紝铏界劧姣忔湀900鍧楅挶錛屼絾涔熸槸鐩稿綋涓嶉敊浜嗐傝屾槸鐜板湪榪樻湁涓騫村氨姣曚笟浜嗭紝鐢變簬姣旇緝騫歌繍錛岃鐨勬槸鍏垂銆傛瘡涓湀榪樿兘鏈夊叓涔濈櫨鍧楅挶鐨勭敓媧昏ˉ鍔┿備粠鑰岃兘璁╃埗姣嶄粬浠笉瑕侀偅涔堟搷鍔充簡銆?br />聽聽聽聽聽聽鍙槸錛屽氨鍦ㄥ墠涓ゅぉ錛屾垜鐖哥埜璺熸垜璇存垜姣嶄翰鍙堝幓浠嬬粛鎵鑺變簡100鍧楅挶鎵句簡涓浠藉伐浣溿傛瘝浜茬殑宸ヤ綔鏄粰涓瀹跺尰闄㈡礂鑿滐紝鍒風錛屾墦鏉備粈涔堢殑銆備竴涓湀700鍧楅挶錛屾瘡澶╂棭涓婂叚鐐瑰埌鏅氫笂涔濈偣銆傛垜鏄ㄥぉ鏅氫笂緇欐瘝浜叉墦浜嗕竴涓數璇濓紝絳夊埌蹇節鐐瑰崐鎵嶆壘鍒版瘝浜茬殑銆傛垜鍧氬喅瑕佹眰姣嶄翰杈炴帀宸ヤ綔錛屽彲鏄瘝浜插氨璇撮棽鐫嫻戣韓涔熸槸鐤鹼紝榪樹笉濡傚繖鐐瑰憿銆備竴涓皬鏃惰繕涓嶅埌2鍧楅挶錛屾瘝浜茶繕鏄偅鏍風殑涔愯銆傛垜鐪熺殑涓嶇煡閬撴庝箞鏍峰姖鎵嶈兘鍔濆ス杈炴帀榪欎喚宸ヤ綔銆?br />聽聽聽聽聽聽鍏跺疄姣嶄翰鐨勮韓浣撳茍涓嶅ソ錛屽湪鎴戜笂楂樹腑鐨勬椂鍊欙紝姣嶄翰涓嬪湴騫叉椿绱嚭浜嗚倽鐐庯紝鏈鍚庢葷畻娌誨ソ浜嗭紝浣嗘槸涔熶笉鑳藉お鍔崇瘡銆傝屼笖姣嶄翰鐜板湪榪樻湁瀛愬鑲岀槫錛岃櫧鐒舵槸鑹х殑錛屼絾鏄篃鎬誨嚭琛甯︽潵浜嗚韓浣撶殑涓ラ噸璐銆傛垜濠跺┒璺熸垜璇達細鈥滀綘濡堟湁鐥呬綘鍜屼綘濡瑰鎬庝箞涓嶈濂規不鍟婏紝鍒漢鏈夌梾閮芥不錛屽ス鏈夌梾鐣欑潃錛岀湡鏄鎬傗濆叾瀹炴垜濡堜篃鎯蟲不錛屼笉榪囧嵈璇達細鈥滅瓑浣犱咯涓婄彮鎸i挶浜嗗啀娌伙紝鐜板湪鍘誨尰闄篃媯鏌ヤ簡錛岃涓嶈绱э紝鑰屼笖鎵嬫湳璐逛篃寰楀叚涓冨崈錛屾牴鏈篃娌℃湁閽辨不銆傗濓紝涓涓漢鐨勫姏閲忕湡鐨勬槸閭d箞鐨勫井寮卞晩銆傛垜鍙兘鐩兼湜鎴戞棭鐐規瘯涓氾紝鍘繪專閽辯粰姣嶄翰娌葷梾銆傛垜鍦ㄨ繖閲岃璇達細鈥滃錛屾垜鐖變綘錛屾槸浣犵殑鍧氬己鏀拺浜嗚繖涓搴紝璁╂垜浠劅鍒頒簡鎮ㄤ紵澶х殑姣嶇埍錛佲濄?br />聽聽聽聽聽聽鐪嬪埌浜嗘垜鐨勬晠浜嬶紝鎴戝笇鏈涙瘡涓涓悜鎴戣繖鏍風殑絀蜂埂濞冮兘鑳藉鏈変竴棰楀鏂楃殑蹇冿紝鏉ユ敼鍙樻垜浠殑鐢熸椿銆傞兘鑳藉娣辯埍鐫鑷繁鐨勬瘝浜詫紝鑳藉鏈熷緟鐫鏄庡ぉ緹庡ソ鐨勭敓媧?..

]]>
err_寮澶寸殑鑷畾涔夊嚱鏁?/title><link>http://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6838.html</link><dc:creator>鍙蹭紶綰?/dc:creator><author>鍙蹭紶綰?/author><pubDate>Tue, 09 May 2006 13:39:00 GMT</pubDate><guid>http://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6838.html</guid><wfw:comment>http://www.shnenglu.com/sscchh-2000/comments/6838.html</wfw:comment><comments>http://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6838.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sscchh-2000/comments/commentRss/6838.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sscchh-2000/services/trackbacks/6838.html</trackback:ping><description><![CDATA[ <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr> <td valign="top"> <h3 class="docSection1Title" id="162666-841">D.3 Standard Error Functions</h3> <p class="docText">We define our own set of error functions that are used throughout the text to<br />聽handle error conditions. The reason for using our own error functions is to <br />let us write our error handling with a single line of C code, as in</p> <pre> </pre> <pre>if <span id="iwscqey" class="docEmphasis">(error condition)</span> err_sys <span id="eacmgqk" class="docEmphasis">(printf format with any number of arguments)</span>; </pre> <pre> </pre> <p class="docText">instead of</p> <pre> </pre> <pre>if <span id="iiuqsuc" class="docEmphasis">(error condition)</span> { char buff [2002]; snprintf(buff, sizeof (buff), <span id="gequwwc" class="docEmphasis">printf format <br />聽聽聽 with any number of arguments)</span>; perror(buff); exit (1); } </pre> <pre> </pre> <p class="docText">Our error functions use the variable-length argument list facility from <tt>ANSI C</tt>. <br />See Section 7.3 of [Kernighan and Ritchie 1988] for additional details.</p> <p class="docText"> <a class="docLink" href="mk:@MSITStore:E:\study_magizine\UNIX%20Network%20Programming%20Volume[1].1%20The%20Sockets%20Networking%20API.chm::/0131411551_app04lev1sec3.html#app04fig03"> <font color="#002c99">Figure D.3</font> </a>lists the differences between the various error functions. <br />If the global integer <tt>daemon_proc</tt> is nonzero, the message is passed to<br /><tt>syslog</tt> with the indicated level; otherwise, the error is output to standard error.<br />Figure D.3. Summary of our standard error functions.<br /><img id="132235130214" height="138" alt="graphics/xdfig03.gif" src="mk:@MSITStore:E:\study_magizine\UNIX%20Network%20Programming%20Volume[1].1%20The%20Sockets%20Networking%20API.chm::/FILES/xdfig03.gif" width="367" border="0" /></p> <p class="docText"> <a class="docLink" href="mk:@MSITStore:E:\study_magizine\UNIX%20Network%20Programming%20Volume[1].1%20The%20Sockets%20Networking%20API.chm::/0131411551_app04lev1sec3.html#app04fig04"> <font color="#002c99">Figure D.4</font> </a>shows the first five functions from <a class="docLink" href="mk:@MSITStore:E:\study_magizine\UNIX%20Network%20Programming%20Volume[1].1%20The%20Sockets%20Networking%20API.chm::/0131411551_app04lev1sec3.html#app04fig03"><font color="#002c99">Figure D.3</font></a>.</p> <h5 class="docExampleTitle"> <a name="app04fig04"> </a>Figure D.4 Our standard error functions.</h5> <p class="docText"> <span id="oeqsmus" class="docEmphasis">lib/error.c</span> </p> <pre> 1 #include "unp.h" 2 #include <stdarg.h> /* ANSI C header file */ 3 #include <syslog.h> /* for syslog() */ 4 int daemon_proc; /* set nonzero by daemon_init() */ 5 static void err_doit(int, int, const char *, va_list); 6 /* Nonfatal error related to system call 7 * Print message and return */ 8 void 9 err_ret(const char *fmt, ...) 10 { 11 va_list ap; 12 va_start(ap, fmt); 13 err_doit(1, LOG_INFO, fmt, ap); 14 va_end(ap); 15 return; 16 } 17 /* Fatal error related to system call 18 * Print message and terminate */ 19 void 20 err_sys(const char *fmt, ...) 21 { 22 va_list ap; 23 va_start(ap, fmt); 24 err_doit(1, LOG_ERR, fmt, ap); 25 va_end(ap); 26 exit(1); 27 } 28 /* Fatal error related to system call 29 * Print message, dump core, and terminate */ 30 void 31 err_dump(const char *fmt, ...) 32 { 33 va_list ap; 34 va_start(ap, fmt); 35 err_doit(1, LOG_ERR, fmt, ap); 36 va_end(ap); 37 abort(); /* dump core and terminate */ 38 exit(1); /* shouldn't get here */ 39 } 40 /* Nonfatal error unrelated to system call 41 * Print message and return */ 42 void 43 err_msg(const char *fmt, ...) 44 { 45 va_list ap; 46 va_start(ap, fmt); 47 err_doit(0, LOG_INFO, fmt, ap); 48 va_end(ap); 49 return; 50 } 51 /* Fatal error unrelated to system call 52 * Print message and terminate */ 53 void 54 err_quit(const char *fmt, ...) 55 { 56 va_list ap; 57 va_start(ap, fmt); 58 err_doit(0, LOG_ERR, fmt, ap); 59 va_end(ap); 60 exit(1); 61 } 62 /* Print message and return to caller 63 * Caller specifies "errnoflag" and "level" */ 64 static void 65 err_doit(int errnoflag, int level, const char *fmt, va_list ap) 66 { 67 int errno_save, n; 68 char buf[MAXLINE + 1]; 69 errno_save = errno; /* value caller might want printed */ 70 #ifdef HAVE_VSNPRINTF 71 vsnprintf(buf, MAXLINE, fmt, ap); * safe */ 72 #else 73 vsprintf(buf, fmt, ap); /* not safe */ 74 #endif 75 n = strlen(buf); 76 if (errnoflag) 77 snprintf(buf + n, MAXLINE - n, ": %s", strerror(errno_save)); 78 strcat(buf, "\n"); 79 if (daemon_proc) { 80 syslog(level, buf); 81 } else { 82 fflush(stdout); /* in case stdout and stderr are the same */ 83 fputs(buf, stderr); 84 fflush(stderr); 85 } 86 return; 87 } </pre> <ul> </ul> </td> </tr> </tbody> </table> <td> </td> <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tbody> <tr> <td class="tt1"> <font color="#002c99"> </font> </td> <td class="tt1" valign="top" align="right"> </td> </tr> </tbody> </table> <img src ="http://www.shnenglu.com/sscchh-2000/aggbug/6838.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sscchh-2000/" target="_blank">鍙蹭紶綰?/a> 2006-05-09 21:39 <a href="http://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6838.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>unp.h鏂囦歡鍐呭http://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6836.html鍙蹭紶綰?/dc:creator>鍙蹭紶綰?/author>Tue, 09 May 2006 12:43:00 GMThttp://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6836.htmlhttp://www.shnenglu.com/sscchh-2000/comments/6836.htmlhttp://www.shnenglu.com/sscchh-2000/archive/2006/05/09/6836.html#Feedback2http://www.shnenglu.com/sscchh-2000/comments/commentRss/6836.htmlhttp://www.shnenglu.com/sscchh-2000/services/trackbacks/6836.html 1 /* Our own header. Tabs are set for 4 spaces, not 8 */ 2 #ifndef __unp_h 3 #define __unp_h 4 #include "../config.h" /* configuration options for current OS */ 5 /* "../config.h" is generated by configure */ 6 /* If anything changes in the following list of #includes, must change 7 acsite.m4 also, for configure's tests. */ 8 #include <sys/types.h> /* basic system data types */ 9 #include <sys/socket.h> /* basic socket definitions */ 10 #include <sys/time.h> /* timeval{} for select() */ 11 #include <time.h> /* timespec{} for pselect() */ 12 #include <netinet/in.h> /* sockaddr_in{} and other Internet defns */ 13 #include <arpa/inet.h> /* inet(3) functions */ 14 #include <errno.h> 15 #include <fcntl.h> /* for nonblocking */ 16 #include <netdb.h> 17 #include <signal.h> 18 #include <stdio.h> 19 #include <stdlib.h> 20 #include <string.h> 21 #include <sys/stat.h> /* for S_xxx file mode constants */ 22 #include <sys/uio.h> /* for iovec{} and readv/writev */ 23 #include <unistd.h> 24 #include <sys/wait.h> 25 #include <sys/un.h> /* for Unix domain sockets */ 26 #ifdef HAVE_SYS_SELECT_H 27 # include <sys/select.h> /* for convenience */ 28 #endif 29 #ifdef HAVE_SYS_SYSCTL_H 30 # include <sys/sysctl.h> 31 #endif 32 #ifdef HAVE_POLL_H 33 # include <poll.h> /* for convenience */ 34 #endif 35 #ifdef HAVE_SYS_EVENT_H 36 # include <sys/event.h> /* for kqueue */ 37 #endif 38 #ifdef HAVE_STRINGS_H 39 # include <strings.h> /* for convenience */ 40 #endif 41 /* Three headers are normally needed for socket/file ioctl's: 42 * <sys/ioctl.h>, <sys/filio.h>, and <sys/sockio.h>. 43 */ 44 #ifdef HAVE_SYS_IOCTL_H 45 # include <sys/ioctl.h> 46 #endif 47 #ifdef HAVE_SYS_FILIO_H 48 # include <sys/filio.h> 49 #endif 50 #ifdef HAVE_SYS_SOCKIO_H 51 # include <sys/sockio.h> 52 #endif 53 #ifdef HAVE_PTHREAD_H 54 # include <pthread.h> 55 #endif 56 #ifdef HAVE_NET_IF_DL_H 57 # include <net/if_dl.h> 58 #endif 59 #ifdef HAVE_NETINET_SCTP_H 60 #include <netinet/sctp.h> 61 #endif 62 /* OSF/1 actually disables recv() and send() in <sys/socket.h> */ 63 #ifdef __osf__ 64 #undef recv 65 #undef send 66 #define recv(a,b,c,d) recvfrom(a,b,c,d,0,0) 67 #define send(a,b,c,d) sendto(a,b,c,d,0,0) 68 #endif 69 #ifndef INADDR_NONE 70 #define INADDR_NONE 0xffffffff /* should have been in <netinet/in.h> */ 71 #endif 72 #ifndef SHUT_RD /* these three POSIX names are new */ 73 #define SHUT_RD 0 /* shutdown for reading */ 74 #define SHUT_WR 1 /* shutdown for writing */ 75 #define SHUT_RDWR 2 /* shutdown for reading and writing */ 76 #endif 77 #ifndef INET_ADDRSTRLEN 78 #define INET_ADDRSTRLEN 16 /* "ddd.ddd.ddd.ddd\0" 79 1234567890123456 */ 80 #endif 81 /* Define following even if IPv6 not supported, so we can always allocate 82 an adequately sized buffer without #ifdefs in the code. */ 83 #ifndef INET6_ADDRSTRLEN 84 #define INET6_ADDRSTRLEN 46 /* max size of IPv6 address string: 85 "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx" or 86 "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:ddd.ddd.ddd.ddd\0" 87 1234567890123456789012345678901234567890123456 */ 88 #endif 89 /* Define bzero() as a macro if it's not in standard C library. */ 90 #ifndef HAVE_BZERO 91 #define bzero(ptr,n) memset (ptr, 0, n) 92 #endif 93 /* Older resolvers do not have gethostbyname2() */ 94 #ifndef HAVE_GETHOSTBYNAME2 95 #define gethostbyname2(host,family) gethostbyname((host)) 96 #endif 97 /* The structure returned by recvfrom_flags() */ 98 struct unp_in_pktinfo { 99 struct in_addr ipi_addr; /* dst IPv4 address */ 100 int ipi_ifindex; /* received interface index */ 101 }; 102 /* We need the newer CMSG_LEN() and CMSG_SPACE() macros, but few 103 implementations support them today. These two macros really need 104 an ALIGN() macro, but each implementation does this differently. */ 105 #ifndef CMSG_LEN 106 #define CMSG_LEN(size) (sizeof(struct cmsghdr) + (size)) 107 #endif 108 #ifndef CMSG_SPACE 109 #define CMSG_SPACE(size) (sizeof(struct cmsghdr) + (size)) 110 #endif 111 /* POSIX requires the SUN_LEN() macro, but not all implementations define 112 it (yet). Note that this 4.4BSD macro works regardless whether there is 113 a length field or not. */ 114 #ifndef SUN_LEN 115 # define SUN_LEN (su) \ 116 (sizeof (*(su)) - sizeof ((su)->sun_path) + strlen((su)->sun_path)) 117 #endif 118 /* POSIX renames "Unix domain" as "local IPC." 119 Not all systems define AF_LOCAL and PF_LOCAL (yet). */ 120 #ifndef AF_LOCAL 121 #define AF_LOCAL AF_UNIX 122 #endif 123 #ifndef PF_LOCAL 124 #define PF_LOCAL PF_UNIX 125 #endif 126 /* POSIX requires that an #include of <poll.h> define INFTIM, but many 127 systems still define it in <sys/stropts.h>. We don't want to include 128 all the STREAMS stuff if it's not needed, so we just define INFTIM here. 129 This is the standard value, but there's no guarantee it is -1. */ 130 #ifndef INFTIM 131 #define INFTIM (-1) /* infinite poll timeout */ 132 #ifdef HAVE_POLL_H 133 #define INFTIM_UNPH /* tell unpxti.h we defined it */ 134 #endif 135 #endif 136 /* Following could be derived from SOMAXCONN in <sys/socket.h>, but many 137 kernels still #define it as 5, while actually supporting many more */ 138 #define LISTENQ 1024 /* 2nd argument to listen () */ 139 /* Miscellaneous constants */ 140 #define MAXLINE 4096 /* max text line length */ 141 #define BUFFSIZE 8192 /* buffer size for reads and writes */ 142 /* Define some port number that can be used for our examples */ 143 #define SERV_PORT 9877 /* TCP and UDP */ 144 #define SERV_PORT_STR "9877" /* TCP and UDP */ 145 #define UNIXSTR_PATH "/tmp/unix.str" /* Unix domain stream */ 146 #define UNIXDG_PATH "/tmp/unix.dg" /* Unix domain datagram */ 147 /* Following shortens all the typecasts of pointer arguments: */ 148 #define SA struct sockaddr 149 #define HAVE_STRUCT_SOCKADDR_STORAGE 150 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE 151 /* 152 * RFC 3493: protocol-independent placeholder for socket addresses 153 */ 154 #define __SS_MAXSIZE 128 155 #define __SS_ALIGNSIZE (sizeof(int64_t)) 156 #ifdef HAVE_SOCKADDR_SA_LEN 157 #define __SS_PAD1SIZE (__SS_ALIGNSIZE - sizeof(u_char) - sizeof(sa_family_t)) 158 #else 159 #define __SS_PAD1SIZE (__SS_ALIGNSIZE - sizeof(sa_family_t)) 160 #endif 161 #define __SS_PAD2SIZE (__SS_MAXSIZE - 2*__SS_ALIGNSIZE) 162 struct sockaddr_storage { 163 #ifdef HAVE_SOCKADDR_SA_LEN 164 u_char ss_len; 165 #endif 166 sa_family_t ss_family; 167 char __ss_pad1[__SS_PAD1SIZE]; 168 int64_t __ss_align; 169 char __ss_pad2[__SS_PAD2SIZE]; 170 }; 171 #endif 172 #define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) 173 /* default file access permissions for new files */ 174 #define DIR_MODE (FILE_MODE | S_IXUSR | S_IXGRP | S_IXOTH) 175 /* default permissions for new directories */ 176 typedef void Sigfunc (int); /* for signal handlers */ 177 #define min(a,b) ((a) < (b) ? (a) : (b)) 178 #define max(a,b) ((a) > (b) ? (a) : (b)) 179 #ifndef HAVE_ADDRINFO_STRUCT 180 # include "../lib/addrinfo.h" 181 #endif 182 #ifndef HAVE_IF_NAMEINDEX_STRUCT 183 struct if_nameindex { 184 unsigned int if_index; /* 1, 2, ... */ 185 char *if_name; /* null-terminated name: "le0", ... */ 186 }; 187 #endif 188 #ifndef HAVE_TIMESPEC_STRUCT 189 struct timespec { 190 time_t tv_sec; /* seconds */ 191 long tv_nsec; /* and nanoseconds */ 192 }; 193 #endif

]]>
77777亚洲午夜久久多人| 国产ww久久久久久久久久| 热久久最新网站获取| 99久久综合国产精品免费| 日日躁夜夜躁狠狠久久AV| 7777久久亚洲中文字幕| 狠狠综合久久综合中文88| 国产精品久久久久蜜芽| 日本三级久久网| 思思久久好好热精品国产| a高清免费毛片久久| 思思久久99热只有频精品66| 色综合久久久久综合体桃花网| 国产99久久久国产精品~~牛| 久久精品国产久精国产果冻传媒| 丁香久久婷婷国产午夜视频| 久久精品国产亚洲αv忘忧草 | 午夜不卡久久精品无码免费| 999久久久免费国产精品播放| 欧美精品丝袜久久久中文字幕 | 国产精品九九久久精品女同亚洲欧美日韩综合区 | 69久久精品无码一区二区| 伊人情人综合成人久久网小说 | 久久91精品国产91久| 大美女久久久久久j久久| 国内精品久久久久伊人av| 波多野结衣久久| 三级韩国一区久久二区综合| 久久久久免费精品国产| 东京热TOKYO综合久久精品| 久久亚洲AV成人无码软件| 亚洲国产成人精品91久久久 | AA级片免费看视频久久| 九九99精品久久久久久| 国内精品伊人久久久久AV影院| 性高湖久久久久久久久| 久久婷婷五月综合国产尤物app| 性高湖久久久久久久久AAAAA| 色婷婷噜噜久久国产精品12p| 亚洲人AV永久一区二区三区久久| 久久久综合香蕉尹人综合网|