pspp
14 years agomaintainer-makefile: allow customization of NEWS entry format
Alfred M. Szmidt [Sat, 5 Dec 2009 04:27:40 +0000 (21:27 -0700)]
maintainer-makefile: allow customization of NEWS entry format

* top/maint.mk (news-date-regexp): New overridable variable.
(news-date-check): Use it.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomgetgroups: add xgetgroups, and avoid ENOSYS failures
Eric Blake [Fri, 4 Dec 2009 15:26:23 +0000 (08:26 -0700)]
mgetgroups: add xgetgroups, and avoid ENOSYS failures

ENOSYS implies that there are no supplemental groups, so we can
treat it the same as a return of 0 from getgroups rather than
exposing failure to the user.  This in turn fixes a crash in
coreutils' id, which freed an uninitialized pointer.

* lib/mgetgroups.h (xgetgroups): New prototype.
* lib/mgetgroups.c (xgetgroups): New wrapper.
(mgetgroups): Handle ENOSYS.
* modules/mgetgroups (Depends-on): Add realloc.
Reported by Scott Harrison <scott.gnu.2009@scottrix.co.uk>.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomgetgroups: avoid argument promotion issues with -1
Eric Blake [Fri, 4 Dec 2009 21:37:32 +0000 (14:37 -0700)]
mgetgroups: avoid argument promotion issues with -1

On platforms where gid_t is equivalent to uint16_t, argument
promotion states that -1 != (gid_t) -1.

* lib/mgetgroups.c (mgetgroups): A cast is required when checking
for invalid gid_t.
* tests/test-chown.h (getegid, test_chown): Likewise.
* tests/test-lchown.h (getegid, test_lchown): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoexclude: Fix header file problems. 20100218131909/gnulib 20100219094430/gnulib 20100220042854/gnulib 20100221043013/gnulib 20100222042935/gnulib 20100223043106/gnulib 20100224042837/gnulib 20100225042841/gnulib 20100226043037/gnulib 20100227042904/gnulib 20100228043031/gnulib 20100301043017/gnulib 20100302042905/gnulib 20100303042934/gnulib 20100304042941/gnulib 20100305042438/gnulib 20100306042459/gnulib 20100307042432/gnulib 20100308042443/gnulib 20100309042515/gnulib 20100310042437/gnulib 20100311042448/gnulib 20100312042514/gnulib 20100313042512/gnulib 20100314042501/gnulib 20100315042558/gnulib 20100316042536/gnulib 20100317042439/gnulib 20100318042423/gnulib 20100319042428/gnulib 20100320042434/gnulib 20100321042521/gnulib 20100322042454/gnulib 20100323042535/gnulib 20100324042504/gnulib 20100326042718/gnulib 20100327042638/gnulib 20100328042559/gnulib 20100329042647/gnulib 20100330042709/gnulib 20100331042620/gnulib 20100401042611/gnulib 20100402042617/gnulib 20100403042613/gnulib 20100404042635/gnulib 20100405042635/gnulib 20100406042722/gnulib 20100407042652/gnulib 20100408042609/gnulib 20100409042702/gnulib 20100410042638/gnulib 20100411042812/gnulib 20100412042622/gnulib 20100413042644/gnulib 20100414042639/gnulib 20100415042645/gnulib 20100415133605/gnulib 20100416042623/gnulib 20100419042725/gnulib 20100420042610/gnulib 20100421042655/gnulib 20100422042613/gnulib 20100423042626/gnulib 20100424042622/gnulib 20100425042523/gnulib 20100426042559/gnulib 20100427042632/gnulib 20100428042627/gnulib 20100430042736/gnulib 20100501042642/gnulib 20100501193346/gnulib 20100502042600/gnulib 20100503042614/gnulib 20100504042743/gnulib 20100505042637/gnulib 20100506042616/gnulib 20100507042642/gnulib 20100508042736/gnulib 20100509042555/gnulib 20100510042527/gnulib 20100512042616/gnulib 20100513042530/gnulib 20100521041225/gnulib 20100521091416/gnulib 20100522041550/gnulib 20100523041559/gnulib 20100524041610/gnulib 20100525041248/gnulib 20100526041535/gnulib 20100527041522/gnulib 20100528041522/gnulib 20100529041534/gnulib 20100530041504/gnulib 20100531041536/gnulib 20100601041620/gnulib 20100602041534/gnulib 20100603041547/gnulib 20100605041552/gnulib 20100606041544/gnulib 20100607041548/gnulib 20100608041611/gnulib 20100609041548/gnulib 20100610041652/gnulib 20100611041634/gnulib 20100612041620/gnulib 20100613041621/gnulib 20100614041736/gnulib 20100615041649/gnulib 20100616041634/gnulib 20100617041556/gnulib 20100618041533/gnulib 20100619041533/gnulib 20100620041537/gnulib 20100621041557/gnulib 20100622041552/gnulib 20100623041555/gnulib 20100624041519/gnulib 20100625040617/gnulib 20100626041055/gnulib 20100627041020/gnulib 20100628041528/gnulib 20100629041110/gnulib 20100630041144/gnulib 20100701041615/gnulib 20100702041143/gnulib 20100703041618/gnulib 20100711041112/gnulib 20100712041116/gnulib 20100713041535/gnulib 20100714041130/gnulib 20100715041146/gnulib 20100716041532/gnulib 20100717041056/gnulib 20100718041608/gnulib 20100719041451/gnulib 20100720041111/gnulib 20100721041552/gnulib 20100722041118/gnulib 20100723041635/gnulib 20100724041102/gnulib 20100725041551/gnulib 20100726041541/gnulib 20100727041553/gnulib 20100728041141/gnulib 20100729041110/gnulib 20100730041051/gnulib 20100731041100/gnulib 20100801041042/gnulib 20100802041059/gnulib 20100803040608/gnulib 20100804041612/gnulib 20100805041620/gnulib 20100806041612/gnulib 20100807041107/gnulib 20100808041110/gnulib 20100809041608/gnulib 20100810041136/gnulib 20100811041612/gnulib 20100812041836/gnulib 20100813042446/gnulib 20100814041753/gnulib 20100816041530/gnulib 20100817041735/gnulib 20100819041710/gnulib 20100820041529/gnulib 20100821041124/gnulib 20100822041134/gnulib 20100823041126/gnulib 20100824041139/gnulib 20100825041154/gnulib 20100826041614/gnulib 20100827041134/gnulib 20100828041143/gnulib 20100829041128/gnulib 20100830041116/gnulib 20100831041146/gnulib 20100901041138/gnulib 20100902040644/gnulib 20100904041453/gnulib 20100905041109/gnulib 20100906041433/gnulib 20100907041042/gnulib 20100908041130/gnulib 20100909040655/gnulib 20100910041109/gnulib 20100911040530/gnulib 20100912041115/gnulib 20100913041129/gnulib 20100914041133/gnulib 20100915041535/gnulib 20100916041629/gnulib 20100917041120/gnulib 20100918041133/gnulib 20100919041540/gnulib 20100920041555/gnulib 20100921041501/gnulib 20100922041532/gnulib 20100923041557/gnulib 20100924041103/gnulib 20100925041139/gnulib 20100926040703/gnulib 20100927041238/gnulib 20100928041549/gnulib 20100929041133/gnulib 20100930041139/gnulib 20101003041054/gnulib 20101004041406/gnulib 20101005041104/gnulib 20101006041207/gnulib 20101007041630/gnulib 20101008041557/gnulib 20101009041631/gnulib 20101010041644/gnulib 20101011041614/gnulib 20101012041641/gnulib 20101013040717/gnulib 20101014041722/gnulib 20101015041724/gnulib 20101016041724/gnulib 20101017040815/gnulib 20101018041718/gnulib 20101019041746/gnulib 20101020041720/gnulib 20101021041737/gnulib 20101022041639/gnulib 20101023041659/gnulib 20101025041530/gnulib 20101026041642/gnulib 20101027041639/gnulib 20101028041637/gnulib 20101029041644/gnulib 20101030041656/gnulib 20101031041554/gnulib 20101101041534/gnulib 20101102041658/gnulib 20101103041554/gnulib 20101104041646/gnulib 20101105041640/gnulib 20101106041650/gnulib 20101107041610/gnulib 20101108041611/gnulib 20101109041719/gnulib 20101110041717/gnulib 20101111041723/gnulib 20101112041734/gnulib 20101113041729/gnulib 20101114041833/gnulib 20101115031810/gnulib 20101116031826/gnulib 20101117031914/gnulib 20101118031739/gnulib 20101119031628/gnulib 20101120031735/gnulib 20101121031614/gnulib 20101122031607/gnulib 20101123031720/gnulib 20101124031711/gnulib 20101125031735/gnulib 20101126031730/gnulib 20101127031717/gnulib 20101202031726/gnulib 20101203031758/gnulib 20101204031721/gnulib 20101205031706/gnulib 20101206031713/gnulib 20101207031701/gnulib 20101208031644/gnulib 20101209031739/gnulib 20101210031714/gnulib 20101211031712/gnulib 20101212031630/gnulib 20101213031641/gnulib 20101214031733/gnulib 20101215031731/gnulib 20101216030723/gnulib 20101217031736/gnulib 20101218031744/gnulib 20101219031739/gnulib 20101220031702/gnulib 20101221031650/gnulib 20101222031745/gnulib 20101223031821/gnulib 20101224031749/gnulib 20101225031758/gnulib 20101226031707/gnulib 20101227030652/gnulib 20101228031744/gnulib 20101229031808/gnulib 20101230031752/gnulib 20101231031744/gnulib 20110101031816/gnulib 20110102031716/gnulib 20110103031649/gnulib 20110104031715/gnulib 20110105031812/gnulib 20110106031749/gnulib 20110107031812/gnulib 20110110031707/gnulib 20110111031744/gnulib 20110116031720/gnulib 20110117031715/gnulib 20110118031800/gnulib 20110119031753/gnulib 20110121031906/gnulib 20110122031857/gnulib 20110123031931/gnulib 20110124031917/gnulib 20110125031844/gnulib 20110126031846/gnulib 20110127031817/gnulib 20110128031830/gnulib 20110129031832/gnulib 20110130031814/gnulib 20110131031804/gnulib 20110201031746/gnulib 20110202031753/gnulib 20110203031711/gnulib 20110204031758/gnulib 20110205031747/gnulib 20110206031630/gnulib 20110207030645/gnulib 20110208031822/gnulib 20110212030805/gnulib 20110213030757/gnulib 20110214030738/gnulib 20110215030738/gnulib 20110216031552/gnulib 20110217031539/gnulib 20110218031555/gnulib 20110219031618/gnulib 20110220031600/gnulib 20110221031653/gnulib 20110222031614/gnulib 20110223030636/gnulib 20110224031103/gnulib 20110225032456/gnulib 20110225071819/gnulib 20110226031634/gnulib 20110227031601/gnulib 20110228031553/gnulib 20110301031600/gnulib 20110302031556/gnulib 20110303031547/gnulib 20110304031610/gnulib 20110305031630/gnulib 20110306031631/gnulib 20110307031623/gnulib 20110308031619/gnulib 20110309031621/gnulib 20110310031601/gnulib 20110311031533/gnulib 20110312031538/gnulib 20110313031612/gnulib 20110314031604/gnulib 20110315031549/gnulib 20110316031608/gnulib 20110318031557/gnulib 20110319031612/gnulib 20110320030624/gnulib 20110321031532/gnulib 20110322031526/gnulib 20110323031530/gnulib 20110324031603/gnulib 20110325031532/gnulib 20110326031556/gnulib 20110327031610/gnulib 20110328031556/gnulib 20110329031601/gnulib 20110330031551/gnulib 20110331031552/gnulib 20110401031548/gnulib 20110402031555/gnulib 20110403031553/gnulib 20110404031545/gnulib 20110405031555/gnulib 20110406031543/gnulib 20110407031550/gnulib 20110408031537/gnulib 20110409031508/gnulib 20110410031507/gnulib 20110411031515/gnulib 20110412031531/gnulib 20110413031607/gnulib 20110414031522/gnulib 20110415031534/gnulib 20110416031529/gnulib 20110417031551/gnulib 20110418031526/gnulib 20110419031602/gnulib 20110420031551/gnulib 20110421031555/gnulib 20110422031555/gnulib 20110423031121/gnulib 20110424031605/gnulib 20110425031606/gnulib 20110426031542/gnulib 20110427031531/gnulib 20110428031605/gnulib 20110429031603/gnulib 20110430031612/gnulib 20110501031611/gnulib 20110502031608/gnulib 20110503031545/gnulib 20110504031614/gnulib 20110505031602/gnulib 20110506031604/gnulib 20110507031558/gnulib 20110508031638/gnulib 20110509031634/gnulib 20110510031628/gnulib 20110511031633/gnulib 20110512031633/gnulib 20110513031628/gnulib 20110514031601/gnulib 20110515031631/gnulib 20110516031814/gnulib 20110517031420/gnulib 20110518031408/gnulib 20110519031414/gnulib 20110520031408/gnulib 20110521031417/gnulib 20110522031415/gnulib 20110523031409/gnulib 20110524031408/gnulib 20110525031418/gnulib 20110526031358/gnulib 20110527031354/gnulib 20110528031404/gnulib 20110529031414/gnulib 20110530031416/gnulib 20110531031410/gnulib 20110601031404/gnulib 20110602031422/gnulib 20110604031416/gnulib 20110605031415/gnulib 20110606031415/gnulib 20110607031415/gnulib 20110608031410/gnulib 20110609031415/gnulib 20110610031413/gnulib 20110611031416/gnulib 20110612031417/gnulib 20110613031407/gnulib 20110614031418/gnulib 20110615031353/gnulib 20110616031404/gnulib 20110617031417/gnulib 20110618031400/gnulib 20110619031415/gnulib 20110620031412/gnulib 20110621031414/gnulib 20110622031416/gnulib 20110623031400/gnulib 20110624031413/gnulib 20110625031415/gnulib 20110626031422/gnulib 20110627031418/gnulib 20110628031407/gnulib 20110629031411/gnulib 20110630031420/gnulib 20110701031420/gnulib 20110702030702/gnulib 20110703031405/gnulib 20110704031413/gnulib 20110705031409/gnulib 20110706031350/gnulib 20110707031410/gnulib 20110708031409/gnulib 20110709031405/gnulib 20110710031413/gnulib 20110711031353/gnulib 20110712031417/gnulib 20110713031352/gnulib 20110714031357/gnulib 20110715031426/gnulib 20110716031434/gnulib 20110717031406/gnulib 20110718031405/gnulib 20110719031413/gnulib 20110720031408/gnulib 20110721031418/gnulib 20110722031411/gnulib 20110723031404/gnulib 20110724031402/gnulib 20110725031357/gnulib 20110726031415/gnulib 20110727031401/gnulib 20110728031411/gnulib 20110729031400/gnulib 20110730031453/gnulib 20110731031404/gnulib 20110801031417/gnulib 20110802031414/gnulib 20110803031358/gnulib 20110804031410/gnulib 20110805031406/gnulib 20110806031409/gnulib 20110807031403/gnulib 20110808031415/gnulib 20110810031403/gnulib 20110811031423/gnulib 20110812031420/gnulib 20110813031418/gnulib 20110814031356/gnulib 20110815031420/gnulib 20110816031547/gnulib 20110817031410/gnulib 20110818031425/gnulib 20110819031415/gnulib 20110820031101/gnulib 20110821031041/gnulib 20110822031403/gnulib 20110823031429/gnulib 20110824031424/gnulib 20110825031423/gnulib 20110826031431/gnulib 20110901031215/gnulib 20110902130633/gnulib 20110904031424/gnulib 20110905031444/gnulib 20110906031425/gnulib 20110907031503/gnulib 20110908031428/gnulib 20110909031431/gnulib 20110910092829/gnulib 20110911031407/gnulib 20110912031458/gnulib 20110913031431/gnulib 20110914030653/gnulib 20110915031436/gnulib 20110916031420/gnulib 20110917031415/gnulib 20110918031424/gnulib 20110919031411/gnulib 20110920031422/gnulib 20110921031404/gnulib 20110922031425/gnulib 20110923031426/gnulib 20110924031504/gnulib 20110925031421/gnulib 20110926031416/gnulib 20110927031420/gnulib 20110928031417/gnulib 20110929031416/gnulib 20110930031425/gnulib 20111001031428/gnulib 20111002031429/gnulib 20111003031429/gnulib 20111004031424/gnulib 20111005031422/gnulib 20111006031431/gnulib 20111007031429/gnulib 20111008031431/gnulib 20111009031439/gnulib 20111010031418/gnulib 20111011031441/gnulib 20111012031429/gnulib 20111013031427/gnulib 20111015031430/gnulib 20111016031435/gnulib 20111017031437/gnulib 20111018031415/gnulib 20111020031428/gnulib 20111021031428/gnulib 20111022031418/gnulib 20111023031438/gnulib 20111024031440/gnulib 20111025031424/gnulib 20111026031438/gnulib 20111027031423/gnulib 20111028031451/gnulib 20111029031439/gnulib 20111030031436/gnulib 20111031031435/gnulib 20111101031427/gnulib 20111102031407/gnulib 20111103031421/gnulib 20111104031424/gnulib 20111105031408/gnulib 20111106031419/gnulib 20111107031427/gnulib 20111108031421/gnulib 20111109031406/gnulib 20111110031413/gnulib 20111111031414/gnulib 20111112031438/gnulib 20111113030703/gnulib 20111114031416/gnulib 20111115031415/gnulib 20111116031428/gnulib 20111117031413/gnulib 20111118031422/gnulib 20111119031422/gnulib 20111120031430/gnulib 20111121031405/gnulib 20111122031426/gnulib 20111123031417/gnulib 20111124031418/gnulib 20111125031416/gnulib 20111126031422/gnulib 20111127031414/gnulib 20111128031426/gnulib 20111129031418/gnulib 20111130031417/gnulib 20111201031427/gnulib 20111202031543/gnulib 20111203031544/gnulib 20111204031408/gnulib 20111205031526/gnulib 20111206031606/gnulib 20111207031533/gnulib 20111208031646/gnulib 20111209031616/gnulib 20111210031444/gnulib 20111211031438/gnulib 20111212031636/gnulib 20111213031439/gnulib 20111214031452/gnulib 20111215031733/gnulib 20111216031608/gnulib 20111217031658/gnulib 20111218031545/gnulib 20111219031409/gnulib 20111220031607/gnulib 20111221031449/gnulib 20111222031615/gnulib 20111223031415/gnulib 20111224031426/gnulib 20111225031725/gnulib 20111226031501/gnulib 20111227031911/gnulib 20111228031606/gnulib 20111229031425/gnulib 20111230031523/gnulib 20111231031421/gnulib 20120101031422/gnulib 20120104031502/gnulib 20120105031414/gnulib 20120106031419/gnulib 20120107031420/gnulib 20120108031556/gnulib 20120109031459/gnulib 20120110031423/gnulib 20120111031411/gnulib 20120112031555/gnulib 20120113031423/gnulib 20120114031432/gnulib 20120115031416/gnulib 20120116031417/gnulib 20120117031410/gnulib 20120118031418/gnulib 20120119031414/gnulib 20120120031423/gnulib 20120121031452/gnulib 20120122031521/gnulib 20120123031402/gnulib 20120124031641/gnulib 20120125030952/gnulib 20120126031430/gnulib 20120127031612/gnulib 20120128031636/gnulib 20120129031423/gnulib 20120130031652/gnulib 20120131031416/gnulib 20120201031456/gnulib 20120202031505/gnulib 20120203031408/gnulib 20120204031439/gnulib 20120205031458/gnulib 20120206031506/gnulib 20120207031515/gnulib 20120208031512/gnulib 20120209031410/gnulib 20120210031615/gnulib 20120211031504/gnulib 20120212031412/gnulib 20120213031512/gnulib 20120214031444/gnulib 20120215031428/gnulib 20120216031432/gnulib 20120217031758/gnulib 20120218031601/gnulib 20120219031439/gnulib 20120220031817/gnulib 20120221031447/gnulib 20120222031641/gnulib 20120223031435/gnulib 20120224031529/gnulib 20120225031508/gnulib 20120226031502/gnulib 20120227031427/gnulib 20120228031430/gnulib 20120229031458/gnulib 20120301031528/gnulib 20120302031409/gnulib 20120303031408/gnulib 20120304031409/gnulib 20120305031436/gnulib 20120306031436/gnulib 20120307031512/gnulib 20120308031508/gnulib 20120309031510/gnulib 20120310031522/gnulib 20120311031448/gnulib 20120312031506/gnulib 20120313031510/gnulib 20120314031456/gnulib 20120315031451/gnulib 20120316031452/gnulib 20120317031527/gnulib 20120318031500/gnulib 20120319031513/gnulib 20120320031506/gnulib 20120321031503/gnulib 20120322031512/gnulib 20120323031459/gnulib 20120324031507/gnulib 20120325031503/gnulib 20120326031506/gnulib 20120327031456/gnulib 20120328031512/gnulib 20120329031508/gnulib 20120330031511/gnulib 20120331031509/gnulib 20120401031455/gnulib 20120402031523/gnulib 20120403031518/gnulib 20120404031451/gnulib 20120405031514/gnulib 20120406031516/gnulib 20120407031517/gnulib 20120408031516/gnulib 20120409031513/gnulib 20120410031532/gnulib 20120411031450/gnulib 20120412031510/gnulib 20120413031509/gnulib 20120414031511/gnulib 20120415031515/gnulib 20120416031516/gnulib 20120417031616/gnulib 20120418031457/gnulib 20120419031509/gnulib 20120420031514/gnulib 20120421031324/gnulib 20120422031515/gnulib 20120423031537/gnulib 20120424031555/gnulib 20120425031512/gnulib 20120426031527/gnulib 20120427031527/gnulib 20120428031537/gnulib 20120429031326/gnulib 20120430031536/gnulib 20120501031243/gnulib 20120502031521/gnulib 20120503031529/gnulib 20120504031541/gnulib 20120505031533/gnulib 20120506031620/gnulib 20120507031559/gnulib 20120508031643/gnulib 20120509031603/gnulib 20120510031606/gnulib 20120511031535/gnulib 20120512031531/gnulib 20120513031611/gnulib 20120514031630/gnulib 20120515031552/gnulib 20120516031616/gnulib 20120517031608/gnulib 20120518031611/gnulib 20120519031621/gnulib 20120520031620/gnulib 20120521031633/gnulib 20120522031633/gnulib 20120524031621/gnulib 20120525031811/gnulib 20120526031619/gnulib 20120527031632/gnulib 20120528031718/gnulib 20120530031634/gnulib 20120531031721/gnulib 20120602061528/gnulib 20120603061521/gnulib 20120604061507/gnulib 20120605061328/gnulib 20120606061543/gnulib 20120608061509/gnulib 20120610001708/gnulib 20120611001553/gnulib 20120612001635/gnulib 20120613001549/gnulib 20120614001554/gnulib 20120615001606/gnulib 20120616001546/gnulib 20120617001633/gnulib 20120618001646/gnulib 20120619001615/gnulib 20120620001621/gnulib 20120621002000/gnulib 20120622001630/gnulib 20120623001635/gnulib 20120624001638/gnulib 20120625001750/gnulib 20120625204723/gnulib 20120626001706/gnulib 20120627001715/gnulib 20120628001748/gnulib 20120629001656/gnulib 20120630001820/gnulib 20120701001705/gnulib 20120702001701/gnulib 20120703001654/gnulib 20120704001636/gnulib 20120705001646/gnulib 20120706001639/gnulib 20120708001625/gnulib 20120709001626/gnulib 20120710001631/gnulib 20120711001653/gnulib 20120712001636/gnulib 20120713001643/gnulib 20120714001724/gnulib 20120715001929/gnulib 20120716001646/gnulib 20120717001635/gnulib 20120718001627/gnulib 20120719001652/gnulib 20120720001729/gnulib 20120721001805/gnulib 20120722001653/gnulib 20120723001646/gnulib 20120724001845/gnulib 20120725001829/gnulib 20120727001701/gnulib 20120728001650/gnulib 20120729001648/gnulib 20120730001741/gnulib 20120731001644/gnulib 20120801001625/gnulib 20120802001759/gnulib 20120803001700/gnulib 20120804001643/gnulib 20120805001649/gnulib 20120806001631/gnulib 20120807001646/gnulib 20120808001622/gnulib 20120809001624/gnulib 20120810001704/gnulib 20120811001638/gnulib 20120813001705/gnulib 20120814001708/gnulib 20120815001708/gnulib 20120816001800/gnulib 20120817001731/gnulib 20120818001801/gnulib 20120819001442/gnulib 20120820001625/gnulib 20120821001728/gnulib 20120822001625/gnulib 20120823001658/gnulib 20120824001745/gnulib 20120825001645/gnulib 20120826001703/gnulib 20120827001621/gnulib 20120828031737/gnulib 20120829031643/gnulib 20120830031611/gnulib 20120831031712/gnulib 20120901031621/gnulib 20120902031604/gnulib 20120903031606/gnulib 20120904031617/gnulib 20120905031637/gnulib 20120906031612/gnulib 20120907031641/gnulib 20120908031543/gnulib 20120909031611/gnulib 20120910031707/gnulib 20120911031714/gnulib 20120912031706/gnulib 20120913031652/gnulib 20120914031716/gnulib 20120915031713/gnulib 20120921031819/gnulib 20120922031737/gnulib 20120923031742/gnulib 20120927031853/gnulib 20120928031812/gnulib 20120929031815/gnulib 20120930031815/gnulib 20121001031750/gnulib 20121002031833/gnulib 20121003031813/gnulib 20121004031822/gnulib 20121005031801/gnulib 20121006031831/gnulib 20121007031819/gnulib 20121008031823/gnulib 20121009031755/gnulib 20121011031845/gnulib 20121012031848/gnulib 20121013032330/gnulib 20121014032302/gnulib 20121015032311/gnulib 20121016032312/gnulib 20121017032314/gnulib 20121018032300/gnulib 20121019031835/gnulib 20121020031822/gnulib 20121021031826/gnulib 20121022031811/gnulib 20121023031812/gnulib 20121024031808/gnulib 20121025031806/gnulib 20121026031823/gnulib 20121027031800/gnulib 20121028031824/gnulib 20121029031822/gnulib 20121030031748/gnulib 20121031031749/gnulib 20121101031819/gnulib 20121102031759/gnulib 20121103031756/gnulib 20121104031802/gnulib 20121105031808/gnulib 20121106032000/gnulib 20121107031748/gnulib 20121108031813/gnulib 20121109031745/gnulib 20121110031814/gnulib 20121111031706/gnulib 20121112031806/gnulib 20121113031812/gnulib 20121114031754/gnulib 20121115031747/gnulib 20121116031830/gnulib 20121117031814/gnulib 20121118031812/gnulib 20121119031750/gnulib 20121120031747/gnulib 20121121031750/gnulib 20121122031800/gnulib 20121123031757/gnulib 20121124031754/gnulib 20121125031759/gnulib 20121126031803/gnulib 20121127031748/gnulib 20121128031829/gnulib 20121129031832/gnulib 20121130031824/gnulib 20121201031801/gnulib 20121202031746/gnulib 20121203031832/gnulib 20121204031756/gnulib 20121205031823/gnulib 20121206031813/gnulib 20121207031828/gnulib 20121208031832/gnulib 20121209031811/gnulib 20121210031814/gnulib 20121211031830/gnulib 20121212031820/gnulib 20121213031822/gnulib 20121214031827/gnulib 20121215031816/gnulib 20121216031813/gnulib 20121217031822/gnulib 20121218031750/gnulib 20121219031825/gnulib 20121220031822/gnulib 20121221031830/gnulib 20121222031822/gnulib 20121223031756/gnulib 20121225031801/gnulib 20121226031806/gnulib 20121227031753/gnulib 20121228031851/gnulib 20121229031944/gnulib 20121230031918/gnulib 20121231031920/gnulib 20130101031913/gnulib 20130102031859/gnulib 20130103031906/gnulib 20130104031856/gnulib 20130105031938/gnulib 20130106031854/gnulib 20130107031908/gnulib 20130108102410/gnulib 20130109031927/gnulib 20130110030901/gnulib 20130110084335/gnulib 20130111031926/gnulib 20130111090732/gnulib 20130112031858/gnulib 20130113031855/gnulib 20130114032144/gnulib 20130115031934/gnulib 20130116031909/gnulib 20130117031900/gnulib 20130118031916/gnulib 20130119031920/gnulib 20130120031929/gnulib 20130121032508/gnulib 20130122031923/gnulib 20130123031917/gnulib 20130124031921/gnulib 20130125031903/gnulib 20130126031854/gnulib 20130127031902/gnulib 20130128031909/gnulib 20130129031849/gnulib 20130130031905/gnulib 20130131031912/gnulib 20130201031922/gnulib 20130202031915/gnulib 20130203031837/gnulib 20130204031914/gnulib 20130205031924/gnulib 20130206031842/gnulib 20130207031907/gnulib 20130208031921/gnulib 20130209031910/gnulib 20130210031846/gnulib 20130211031905/gnulib 20130212031907/gnulib 20130213031900/gnulib 20130214031900/gnulib 20130215031921/gnulib 20130216031923/gnulib 20130217031849/gnulib 20130218031847/gnulib 20130219031902/gnulib 20130220031904/gnulib 20130221031903/gnulib 20130222031817/gnulib 20130223031843/gnulib 20130224031906/gnulib 20130225031914/gnulib 20130226031658/gnulib 20130227031653/gnulib 20130228031700/gnulib 20130301031642/gnulib 20130302031844/gnulib 20130303031658/gnulib 20130305031636/gnulib 20130306031653/gnulib 20130307031700/gnulib 20130308031651/gnulib 20130309031700/gnulib 20130310031651/gnulib 20130311031653/gnulib 20130312031637/gnulib 20130313031711/gnulib 20130314031651/gnulib 20130315031648/gnulib 20130316031659/gnulib 20130317031635/gnulib 20130318031524/gnulib 20130318080716/gnulib 20130319031711/gnulib 20130320031704/gnulib 20130321031705/gnulib 20130322031640/gnulib 20130324031650/gnulib 20130325031558/gnulib 20130326031609/gnulib 20130327031607/gnulib 20130328031628/gnulib 20130329031614/gnulib 20130330031604/gnulib 20130331032325/gnulib 20130401031629/gnulib 20130402031618/gnulib 20130403031942/gnulib 20130405031941/gnulib 20130406012110/gnulib 20130407011631/gnulib 20130408011601/gnulib 20130409011616/gnulib 20130410011608/gnulib 20130411011613/gnulib 20130415101646/gnulib 20130416011601/gnulib 20130417011611/gnulib 20130419011623/gnulib 20130420011637/gnulib 20130421011608/gnulib 20130422011600/gnulib 20130423011619/gnulib 20130424011621/gnulib 20130425011620/gnulib 20130426011620/gnulib 20130427011629/gnulib 20130428011622/gnulib 20130429011618/gnulib 20130430011624/gnulib 20130501011639/gnulib 20130502011635/gnulib 20130503011636/gnulib 20130504011633/gnulib 20130505011649/gnulib 20130506011634/gnulib 20130507011623/gnulib 20130508011622/gnulib 20130509011625/gnulib 20130509094357/gnulib 20130510011623/gnulib 20130511011655/gnulib 20130512011637/gnulib 20130513011635/gnulib 20130516011655/gnulib 20130517011701/gnulib 20130518011628/gnulib 20130519011621/gnulib 20130520011628/gnulib 20130521011635/gnulib 20130523011628/gnulib 20130524011642/gnulib 20130525011619/gnulib 20130526011621/gnulib 20130527011623/gnulib 20130528011646/gnulib 20130529011624/gnulib 20130530011919/gnulib 20130531011636/gnulib 20130601011638/gnulib 20130602011639/gnulib 20130603011650/gnulib 20130604011633/gnulib 20130605011745/gnulib 20130606011635/gnulib 20130607011646/gnulib 20130608011654/gnulib 20130609011643/gnulib 20130610011628/gnulib 20130611011642/gnulib 20130612011645/gnulib 20130613011635/gnulib 20130614011641/gnulib 20130615011746/gnulib 20130616011634/gnulib 20130617011624/gnulib 20130618011630/gnulib 20130619011658/gnulib 20130620011658/gnulib 20130621011712/gnulib 20130623011704/gnulib 20130624011706/gnulib 20130625011707/gnulib 20130626011723/gnulib 20130628011726/gnulib 20130629011844/gnulib 20130708031735/gnulib 20130709031703/gnulib 20130710031642/gnulib 20130711031650/gnulib 20130712031635/gnulib 20130713031640/gnulib 20130714031654/gnulib 20130715031652/gnulib 20130716031643/gnulib 20130717031734/gnulib 20130719031709/gnulib 20130720031649/gnulib 20130721031719/gnulib 20130722031700/gnulib 20130723031714/gnulib 20130724031627/gnulib 20130725031733/gnulib 20130726032803/gnulib 20130727032547/gnulib 20130728032810/gnulib 20130729032736/gnulib 20130730031821/gnulib 20130731031801/gnulib 20130801031805/gnulib 20130802031752/gnulib 20130803031948/gnulib 20130804032131/gnulib 20130805031805/gnulib 20130806032340/gnulib 20130807030655/gnulib 20130808030658/gnulib
Paolo Bonzini [Thu, 3 Dec 2009 17:39:47 +0000 (18:39 +0100)]
exclude: Fix header file problems.

* lib/exclude.h: Add multiple inclusion guards and include stdbool.h.

14 years agoautoupdate
Karl Berry [Tue, 1 Dec 2009 14:38:45 +0000 (06:38 -0800)]
autoupdate

14 years agofts: fts_open: do not let an empty string cause immediate failure
Jim Meyering [Tue, 1 Dec 2009 11:06:34 +0000 (12:06 +0100)]
fts: fts_open: do not let an empty string cause immediate failure

This is required in support of GNU rm, for which the command
"rm A '' B" must process and remove both A and B, in spite of
the empty string argument.
* lib/fts.c (fts_open): Do not let the presence of an empty string
cause fts_open to fail immediately.  Most fts-using tools must be
able to process all arguments, in order, and can be expected to
diagnose such arguments themselves.
Also, move declaration of local, "len", "down" to initialization.

14 years agoutimens: fix compilation error
Eric Blake [Mon, 30 Nov 2009 13:45:42 +0000 (06:45 -0700)]
utimens: fix compilation error

Fixes a regression from 2009-11-25.

* lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
Declare variable at right scope.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agobootstrap: fix handling of various perl --version formats
Pádraig Brady [Mon, 30 Nov 2009 12:29:03 +0000 (12:29 +0000)]
bootstrap: fix handling of various perl --version formats

* build-aux/bootstrap (get_version): Don't use perl's $] special
variable, as that requires updating all bootstrap.conf files to
use perl's x.yyyzzz version format.  Instead make the regular
expression more general to support version formats from older
perl-5.005_002 (5.5.2) and perl-5.11 which has other numbers
in the version line.

14 years agobootstrap: handle perl-5.11's changed --version output
Jim Meyering [Sun, 29 Nov 2009 12:57:05 +0000 (13:57 +0100)]
bootstrap: handle perl-5.11's changed --version output

* build-aux/bootstrap (get_version): Handle perl separately,
since perl-5.11's --version output is different.

14 years agouserspec: depend on the inttostr module, too
Jim Meyering [Sat, 28 Nov 2009 08:28:40 +0000 (09:28 +0100)]
userspec: depend on the inttostr module, too

* modules/userspec (Depends-on): Add inttostr.

14 years agouserspec: disallow an ID that maps to (uid_t)-1 or (gid_t)-1
Jim Meyering [Sat, 28 Nov 2009 06:33:16 +0000 (07:33 +0100)]
userspec: disallow an ID that maps to (uid_t)-1 or (gid_t)-1

* lib/userspec.c (parse_with_separator): Do not accept a user ID
number of MAXUID when it evaluates to (uid_t) -1.
Likewise for group ID.  Reported by Matt McCutchen in
<http://savannah.gnu.org/bugs/?28113>

14 years agouserspec: reformat to use spaces, not TABs
Jim Meyering [Sat, 28 Nov 2009 06:26:53 +0000 (07:26 +0100)]
userspec: reformat to use spaces, not TABs

* lib/userspec.c: Expand TABs to spaces.
Add Emacs' "indent-tabs-mode: nil" hint.

14 years agogetopt-gnu: flush out another BSD bug
Eric Blake [Sat, 28 Nov 2009 00:47:21 +0000 (17:47 -0700)]
getopt-gnu: flush out another BSD bug

POSIX requires 'echo foo > bar; m4 -Dfoo=1 bar -Dfoo=2 bar' to
output '1' then '2'.  To achieve this, m4 relies on the GNU
getopt{,_long} extension of a leading '-'.  However, BSD getopt
fails to honor this extension when POSIXLY_CORRECT.

Also, BSD getopt fails to reparse POSIXLY_CORRECT from the
environment even when a reset is requested (whether by
optreset=1 or by optind=0).

* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Test for the bug.
* tests/test-getopt.c (main): Check POSIXLY_CORRECT first, to
flush out BSD bug.
* tests/test-getopt.h (test_getopt): End lists with NULL.
* tests/test-getopt_long.h (test_getopt_long): Likewise.
(test_getopt_long_posix): Enhance test.
* modules/getopt-posix-tests (Depends-on): Add stdbool.
* doc/glibc-functions/getopt_long.texi (getopt_long): Mention
getopt-gnu.
* doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomodules/idpriv-droptemp-tests (Notice): Fix text.
Simon Josefsson [Fri, 27 Nov 2009 15:13:37 +0000 (16:13 +0100)]
modules/idpriv-droptemp-tests (Notice): Fix text.

14 years agotest-xalloc-die: avoid spurious failure due to libtool argv difference
Jim Meyering [Fri, 27 Nov 2009 09:19:32 +0000 (10:19 +0100)]
test-xalloc-die: avoid spurious failure due to libtool argv difference

In a libtool-enabled project, this test would fail due to a difference
in the emitted program name, e.g.,
-test-xalloc-die: memory exhausted
+/tmp/.../tests/.libs/lt-test-xalloc-die: memory exhausted
Use program to avoid that.
* modules/xalloc-die-tests (Depends-on): Add progname.
* tests/test-xalloc-die.c: Include progname.h".
(program_name): Remove decl.
(main): Call set_program_name.
* tests/test-xalloc-die.sh (compare): Remove unnecessary ${EXE}.

14 years agow32sock: leave win32 error in place.
Paolo Bonzini [Thu, 26 Nov 2009 19:29:16 +0000 (20:29 +0100)]
w32sock: leave win32 error in place.

* lib/w32sock.h (set_winsock_errno): Do not call WSASetLastError.

14 years agoinit.sh: suggest to use skip_ and fail_ functions in comments
Eric Blake [Thu, 26 Nov 2009 08:39:26 +0000 (09:39 +0100)]
init.sh: suggest to use skip_ and fail_ functions in comments

* tests/init.sh: Add a sentence.

14 years agoinit.sh: add documentation in comments
Bruno Haible [Thu, 26 Nov 2009 08:24:51 +0000 (09:24 +0100)]
init.sh: add documentation in comments

* tests/init.sh: Add some developer and user documentation.

14 years agoinit.sh: accommodate even those who specify bogus srcdir manually
Jim Meyering [Thu, 26 Nov 2009 08:10:04 +0000 (09:10 +0100)]
init.sh: accommodate even those who specify bogus srcdir manually

* tests/init.sh: Normally, srcdir is guaranteed by automake and
configure-time tests to be sanitized, so that there is no need to
use "$srcdir" in Makefile rules and shell scripts.  Using $srcdir
(with no double quotes) suffices.  However, since tests may be
invoked manually, and since you may explicitly set srcdir to the
name of a directory containing spaces, do quote its uses here.
* tests/test-pread.sh: Likewise.
Suggested by Bruno Haible.

14 years agotest-pread.sh: avoid diagnostics for those who ignore SIGPIPE
Jim Meyering [Thu, 26 Nov 2009 07:51:11 +0000 (08:51 +0100)]
test-pread.sh: avoid diagnostics for those who ignore SIGPIPE

* tests/test-pread.sh: Write no data into the pipe, because
test-pread actually reads none.  This avoids a diagnostic,
"bash: echo: write error: Broken pipe", that arises in the unusual
event something is ignoring SIGPIPE, and might be interpreted
as some sort of failure.  Reported by Bruno Haible.

14 years agotest-pread: cover failure with ESPIPE and EINVAL
Jim Meyering [Wed, 25 Nov 2009 17:26:35 +0000 (18:26 +0100)]
test-pread: cover failure with ESPIPE and EINVAL

* tests/test-pread.c (main): Test for failure, too.
* tests/test-pread.sh: Invoke with stdin on a pipe.
Suggested by Eric Blake.

14 years agopread: improvement and fix
Jim Meyering [Wed, 25 Nov 2009 17:01:02 +0000 (18:01 +0100)]
pread: improvement and fix

* modules/pread (Depends-on): Depend on lseek, for portability to
e.g., mingw.  Suggested by Eric Blake.
* lib/pread.c (__libc_read): Define.  Reported by Richard W.M. Jones.

14 years agounistd.in.h: correct declaration of pread
Jim Meyering [Wed, 25 Nov 2009 16:06:25 +0000 (17:06 +0100)]
unistd.in.h: correct declaration of pread

* lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
Reported by Richard W.M. Jones.

14 years agotest-pread.sh: distribute the test script
Jim Meyering [Wed, 25 Nov 2009 15:59:15 +0000 (16:59 +0100)]
test-pread.sh: distribute the test script

* modules/pread-tests (Files): Include test-pread.sh.

14 years agotest-pread.sh: clean up
Jim Meyering [Wed, 25 Nov 2009 15:52:47 +0000 (16:52 +0100)]
test-pread.sh: clean up

* tests/test-pread.sh: Don't refer to $builddir. Just use equivalent ".".
* modules/pread-tests (TESTS_ENVIRONMENT): Don't export builddir.
That is unnecessary, since it's always ".".
Suggestion from Eric Blake.

14 years agotest-pread.sh: make executable
Jim Meyering [Wed, 25 Nov 2009 15:37:42 +0000 (16:37 +0100)]
test-pread.sh: make executable

* tests/test-pread.sh: Set executable bit.
Reported by Eric Blake.

14 years agocorrect typo in test-pread.sh
Jim Meyering [Wed, 25 Nov 2009 15:14:19 +0000 (16:14 +0100)]
correct typo in test-pread.sh

* tests/test-pread.sh: Add #! line.

14 years agotest pread
Jim Meyering [Wed, 25 Nov 2009 14:50:56 +0000 (15:50 +0100)]
test pread

* tests/test-pread.c: New file.
* tests/test-pread.sh: Likewise.
* modules/pread-tests: Likewise.

14 years agopread: new module
Jim Meyering [Wed, 25 Nov 2009 13:33:30 +0000 (14:33 +0100)]
pread: new module

* modules/pread: New file.
* lib/pread.c (pread): New file.
* m4/pread.m4: Likewise.
* lib/unistd.in.h (pread): Define/declare.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define defaults.
* modules/unistd (Makefile.am): Substitute witnesses.
* doc/posix-functions/pread.texi (pread): Update.
* MODULES.html.sh: Add pread.

14 years agotests/init.sh: new file to be used via most *.sh tests
Jim Meyering [Wed, 25 Nov 2009 13:40:31 +0000 (14:40 +0100)]
tests/init.sh: new file to be used via most *.sh tests

* tests/init.sh: New file.

14 years agoutimens: work around older Linux failure with symlinks
Eric Blake [Tue, 24 Nov 2009 17:07:57 +0000 (10:07 -0700)]
utimens: work around older Linux failure with symlinks

Some Linux kernel versions support utimensat(,0) but not
utimensat(,AT_SYMLINK_NOFOLLOW), even for non-symlinks.  Had the
fallback code for regular files been reached, it would have truncated
timestamps.  But since glibc lutimes just wraps utimensat, and we
didn't expect ENOSYS from lutimes, the fallback wasn't even reached.

* lib/utimens.c (lutimensat_works_really): New variable.
(fdutimens, lutimens): Use it to manage kernels that support
nanosecond times on files, but not on symlinks.
Reported by Ondřej Vašík.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimes: fix configure grammar
Eric Blake [Tue, 24 Nov 2009 17:00:18 +0000 (10:00 -0700)]
utimes: fix configure grammar

'Checking determine whether...' doesn't read well.

* m4/utimes.m4 (gl_FUNC_UTIMES): Delete spurious word.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoregex: Fix fastmap for multibyte character ranges.
Paolo Bonzini [Wed, 25 Nov 2009 10:41:09 +0000 (11:41 +0100)]
regex: Fix fastmap for multibyte character ranges.

* lib/regcomp.c (re_compute_fastmap_iter): Add all multibyte lead
characters when a multibyte character range is included.

14 years agoversion-etc: work also with AM_INIT_AUTOMAKE's no-define option
Andy Wingo [Sun, 22 Nov 2009 08:47:12 +0000 (09:47 +0100)]
version-etc: work also with AM_INIT_AUTOMAKE's no-define option

* lib/version-etc.c [!defined PACKAGE]: Define to PACKAGE_TARNAME.

14 years agodoc: Most *_l functions exist in MacOS X 10.5.
Bruno Haible [Wed, 25 Nov 2009 00:53:37 +0000 (01:53 +0100)]
doc: Most *_l functions exist in MacOS X 10.5.

14 years agodoc: Most *_l functions exist in MacOS X 10.5.
Bruno Haible [Wed, 25 Nov 2009 00:49:04 +0000 (01:49 +0100)]
doc: Most *_l functions exist in MacOS X 10.5.

14 years agoduplocale: Fix logic bug.
Bruno Haible [Tue, 24 Nov 2009 09:44:40 +0000 (10:44 +0100)]
duplocale: Fix logic bug.

14 years agotest-update-copyright: don't hard-code /usr/bin/perl
Jim Meyering [Mon, 23 Nov 2009 10:28:00 +0000 (11:28 +0100)]
test-update-copyright: don't hard-code /usr/bin/perl

* tests/test-update-copyright.sh (YEAR): Use date +%Y, rather than
perl to print the current year.  Gilles Espinasse reported that
the replaced use of perl was hard-coded as /usr/bin/perl.

14 years agoduplocale: Add support for glibc 2.3.x.
Bruno Haible [Mon, 23 Nov 2009 10:05:42 +0000 (11:05 +0100)]
duplocale: Add support for glibc 2.3.x.

14 years agovasnprintf: Tiny optimization.
Bruno Haible [Mon, 23 Nov 2009 01:43:23 +0000 (02:43 +0100)]
vasnprintf: Tiny optimization.

14 years agoTests for module 'duplocale'.
Bruno Haible [Mon, 23 Nov 2009 00:47:07 +0000 (01:47 +0100)]
Tests for module 'duplocale'.

14 years agoNew module 'duplocale'.
Bruno Haible [Mon, 23 Nov 2009 00:46:00 +0000 (01:46 +0100)]
New module 'duplocale'.

14 years agoCheck that <locale.h> defines locale_t and LC_GLOBAL_LOCALE.
Bruno Haible [Sun, 22 Nov 2009 22:32:54 +0000 (23:32 +0100)]
Check that <locale.h> defines locale_t and LC_GLOBAL_LOCALE.

14 years agolocale: Make locale_t available when possible.
Bruno Haible [Sun, 22 Nov 2009 22:31:11 +0000 (23:31 +0100)]
locale: Make locale_t available when possible.

14 years agoAdd comments.
Bruno Haible [Mon, 23 Nov 2009 00:03:24 +0000 (01:03 +0100)]
Add comments.

14 years agoOops, move the include of unistd.h in the last commit.
Bruno Haible [Sun, 22 Nov 2009 18:33:24 +0000 (19:33 +0100)]
Oops, move the include of unistd.h in the last commit.

14 years agoerror: account for the possibility of freopen (stdout).
Bruno Haible [Sun, 22 Nov 2009 18:30:39 +0000 (19:30 +0100)]
error: account for the possibility of freopen (stdout).

14 years agoAdd comment.
Bruno Haible [Sun, 22 Nov 2009 18:07:34 +0000 (19:07 +0100)]
Add comment.

14 years agoc-stack: avoid defining an unused static function
Jim Meyering [Sun, 22 Nov 2009 16:11:14 +0000 (17:11 +0100)]
c-stack: avoid defining an unused static function

* lib/c-stack.c (find_stack_direction): Do not define this function
when it will not be used.

14 years agodiffseq: avoid spurious gcc warnings
Jim Meyering [Sun, 22 Nov 2009 08:01:07 +0000 (09:01 +0100)]
diffseq: avoid spurious gcc warnings

* lib/diffseq.h (IF_LINT2): Define.
(compareseq): Use it to initialize two members of "part".
This avoids two used-uninitialized warnings.

14 years agoc-stack: avoid "ignoring return value of `write'" warning
Jim Meyering [Sat, 21 Nov 2009 16:52:54 +0000 (17:52 +0100)]
c-stack: avoid "ignoring return value of `write'" warning

* lib/c-stack.c: Include "ignore-value.h".
(die): Explicitly ignore each write return value.
* modules/c-stack (Depends-on): Add ignore-value.

14 years agoautoupdate
Karl Berry [Sat, 21 Nov 2009 15:12:27 +0000 (07:12 -0800)]
autoupdate

14 years agodiffseq: reduce scope of variable 'best'.
Bruno Haible [Sat, 21 Nov 2009 13:37:46 +0000 (14:37 +0100)]
diffseq: reduce scope of variable 'best'.

14 years agodiffseq: remove useless assignment to "best"
Jim Meyering [Sat, 21 Nov 2009 12:49:54 +0000 (13:49 +0100)]
diffseq: remove useless assignment to "best"

* lib/diffseq.h (diag) [USE_HEURISTIC]: Remove useless "best = 0"
assignment.  At that point "best" is already guaranteed to be zero.

14 years agobuild: mention ftp redirector in release announcements
Eric Blake [Fri, 20 Nov 2009 13:23:42 +0000 (06:23 -0700)]
build: mention ftp redirector in release announcements

Now that http://ftpmirror.gnu.org/PACKAGE/ redirects to a nearby
mirror, we should promote its use in release announcements.
Meanwhile, mention the mirror list.

* top/maint.mk (gnu_rel_host, url_dir_list): Provide defaults for
values that used to come from cfg.mk; mention FTP redirect URL.
* build-aux/announce-gen: Mention the mirror list.
Suggested by Karl Berry.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agonanosleep: improve port to mingw
Eric Blake [Thu, 19 Nov 2009 05:14:39 +0000 (22:14 -0700)]
nanosleep: improve port to mingw

test-nanosleep failed to link, and exposed a need for argument
validation when nanosleep is missing.

* lib/nanosleep.c (rpl_nanosleep): Reject invalid arguments.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Incorporate LIBSOCKET into
LIB_NANOSLEEP, but only when needed.
* modules/select (Link): Document LIBSOCKET.
* m4/select.m4 (gl_FUNC_SELECT): Ensure LIBSOCKET is defined early
enough.

14 years agonanosleep: work around cygwin bug
Eric Blake [Thu, 19 Nov 2009 03:10:42 +0000 (20:10 -0700)]
nanosleep: work around cygwin bug

Cygwin 1.5.x mistakenly failed with EINVAL for a duration longer
than 49.7 days (2**32 milliseconds).  Meanwhile, the existing
code for HAVE_BUG_BIG_NANOSLEEP would infloop, instead of return
failure, for invalid arguments.

* lib/nanosleep.c (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]:
Fix logic bug when nanosleep fails.  Work around cygwin 1.5.x
bug.
(getnow): Delete, not needed.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): No longer require
LIB_CLOCK_GETTIME.
* modules/nanosleep (Depends-on): Add intprops and verify.  Drop
clock-time, gettime.
* doc/posix-functions/nanosleep.texi (nanosleep): Document the
bug.
* modules/nanosleep-tests: New test.
* tests/test-nanosleep.c: New file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agosleep: work around cygwin bug
Eric Blake [Thu, 19 Nov 2009 03:07:44 +0000 (20:07 -0700)]
sleep: work around cygwin bug

On cygwin 1.5.x, sleep amounts larger than 49.7 days (2**32
milliseconds) failed instantly, but with a garbage return
value from uninitialized memory.

* lib/sleep.c (rpl_sleep): Work around the bug.
* m4/sleep.m4 (gl_FUNC_SLEEP): Detect the bug.
(gl_PREREQ_SLEEP): Delete unused macro.
* modules/sleep (Depends-on): Add verify.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
* modules/unistd (Makefile.am): Substitute witness.
* lib/unistd.in.h (sleep): Update prototype.
* doc/posix-functions/sleep.texi (sleep): Document the bug.
* tests/test-sleep.c (main) [HAVE_DECL_ALARM]: Test it.
* modules/sleep-tests (Depends-on): Check for alarm.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint.mk: improve sc_prohibit_magic_number_exit
Jim Meyering [Fri, 20 Nov 2009 12:24:24 +0000 (13:24 +0100)]
maint.mk: improve sc_prohibit_magic_number_exit

* top/maint.mk (sc_prohibit_magic_number_exit): Tighten regexp
so it does not match uses like System.exit(1).
Add comments showing how to correct all offenders.

14 years agoxalloc-die-tests: add missing library
Eric Blake [Thu, 19 Nov 2009 16:12:34 +0000 (09:12 -0700)]
xalloc-die-tests: add missing library

* modules/xalloc-die-tests (Makefile.am): Add LDADD line.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotest-xvasprintf: silence compiler warnings
Eric Blake [Thu, 19 Nov 2009 15:51:13 +0000 (08:51 -0700)]
test-xvasprintf: silence compiler warnings

* tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Mask
empty string from gcc.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoautoupdate
Karl Berry [Thu, 19 Nov 2009 17:17:24 +0000 (09:17 -0800)]
autoupdate

14 years agoxfreopen: new module, from coreutils
Jim Meyering [Thu, 19 Nov 2009 14:55:58 +0000 (15:55 +0100)]
xfreopen: new module, from coreutils

* modules/xfreopen: New module.
* lib/xfreopen.c: New file.
* lib/xfreopen.h: New file.
* MODULES.html.sh (File stream based Input/Output"): Add it.

14 years agomanywarnings: depend on warnings
Eric Blake [Thu, 19 Nov 2009 13:42:21 +0000 (06:42 -0700)]
manywarnings: depend on warnings

* modules/manywarnings (Depends-on): Add warnings.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agobuild: avoid compiler warnings
Eric Blake [Thu, 19 Nov 2009 04:46:35 +0000 (21:46 -0700)]
build: avoid compiler warnings

Silence some warnings found on mingw.

* lib/select.c (rpl_select): Delete unused variable.
* lib/setsockopt.c (rpl_setsockopt): Avoid incompatible pointer.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agotests: avoid false negative with --with-packager
Eric Blake [Thu, 19 Nov 2009 03:36:01 +0000 (20:36 -0700)]
tests: avoid false negative with --with-packager

Ignore extra line produced by version-etc.

* tests/test-version-etc.sh: Discard packager information.
* tests/test-argp-version-etc-1.sh: Likewise.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoutimens: fix regression on Solaris 20100219093019/gnulib 20100220040512/gnulib 20100221040520/gnulib 20100222040508/gnulib 20100223040526/gnulib 20100224040512/gnulib 20100225040506/gnulib 20100226040508/gnulib 20100227040506/gnulib 20100228040509/gnulib 20100301040511/gnulib 20100302040526/gnulib 20100303040503/gnulib 20100304040503/gnulib 20100305040503/gnulib 20100306040503/gnulib 20100307040504/gnulib 20100308040506/gnulib 20100309040527/gnulib 20100310040505/gnulib 20100311040503/gnulib 20100312040506/gnulib 20100313040505/gnulib 20100314040516/gnulib 20100315040510/gnulib 20100316040524/gnulib 20100317040506/gnulib 20100318040503/gnulib 20100319040503/gnulib 20100320040502/gnulib 20100321040506/gnulib 20100322040515/gnulib 20100323040521/gnulib 20100324040506/gnulib
Eric Blake [Wed, 18 Nov 2009 13:59:44 +0000 (06:59 -0700)]
utimens: fix regression on Solaris

Revert commit 26c5fd742f.  Solaris lacks futimens and futimes, so
futimesat is the only way to change fd timestamps.  But since
FreeBSD futimesat can't change fd timestamps, we need a configure
check to avoid the crash there.

* m4/utimens.m4 (gl_UTIMENS): Check for BSD bug.
* lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10
can only change fd timestamps via futimesat.  Instead, use an
additional witness macro to avoid BSD bug.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agousleep: use it to simplify tests
Eric Blake [Tue, 17 Nov 2009 16:58:18 +0000 (09:58 -0700)]
usleep: use it to simplify tests

Blindly using usleep makes it easier to write tests.

* modules/stat-time-tests (Depends-on): Add usleep.
(configure.ac): Drop usleep check.
* modules/chown-tests (Depends-on, configure.ac): Likewise.
* modules/lchown-tests (Depends-on, configure.ac): Likewise.
* modules/fdutimensat-tests (Depends-on, configure.ac): Likewise.
* modules/futimens-tests (Depends-on, configure.ac): Likewise.
* modules/openat-tests (Depends-on, configure.ac): Likewise.
* modules/utimens-tests (Depends-on, configure.ac): Likewise.
* modules/utimensat-tests (Depends-on, configure.ac): Likewise.
* modules/pipe-filter-gi-tests (Depends-on, configure.ac):
Likewise.
* tests/test-chown.h (nap): Rely on nicer usleep semantics.
* tests/test-lchown.h (nap): Likewise.
* tests/test-pipe-filter-gi2-main.c (small_nap): Likewise.
* tests/test-stat-time.c (nap): Likewise.
* tests/test-utimens-common.h (nap): Update comments.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agousleep: new module
Eric Blake [Tue, 17 Nov 2009 16:24:56 +0000 (09:24 -0700)]
usleep: new module

mingw usleep(1000000) failed with EINVAL, as allowed by POSIX,
but contrary to GNU usage.  Rather than implement an accurate
usleep based on select or nanosleep, both of which drag in
dependencies on external libraries, this version intentionally
takes the ceiling in seconds if usleep() is missing.

* modules/usleep: New file.
* m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
* lib/usleep.c (usleep): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
* modules/unistd (Makefile.am): Substitute witnesses.
* lib/unistd.in.h (usleep): Add declaration.
* doc/pastposix-functions/usleep.texi (usleep): Document this.
* MODULES.html.sh (Date and time): Likewise.
* modules/usleep-tests (Depends-on): New test.
* tests/test-usleep.c: New file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agochown: work around OpenBSD bug
Eric Blake [Mon, 16 Nov 2009 21:35:41 +0000 (14:35 -0700)]
chown: work around OpenBSD bug

chown(name,geteuid(),-1) failed to update the change time if
name was already owned by the current effective user.  Work
around it by using chmod, which does not have this bug.

Unfortunately, lchown has the same bug, but OpenBSD 4.0 lacks
lchmod and lutimes, so there is no way to affect ctime without
unlinking and recreating the symlink, which is too dangerous.

* lib/chown.c (rpl_chown): Work around the bug.
* lib/lchown.c (rpl_lchown): Attempt to do likewise.
* m4/chown.m4 (gl_FUNC_CHOWN): Test for ctime bug.
* m4/lchown.m4 (gl_FUNC_LCHOWN): Check for lchmod.
* modules/chown (Depends-on): Add stdbool.
* modules/lchown (Depends-on): Likewise.
* doc/posix-functions/chown.texi (chown): Document the bug.
* doc/posix-functions/lchown.texi (lchown): Likewise.
* tests/test-lchown.h (test_chown): Relax test.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomkstemp: avoid conflict with C++ keyword template
Eric Blake [Tue, 17 Nov 2009 18:53:14 +0000 (11:53 -0700)]
mkstemp: avoid conflict with C++ keyword template

Just because glibc uses K&R, and uses template as an identifier,
doesn't mean we have to.

* lib/mkdtemp.c (mkdtemp): Change spelling of template.
* lib/mkostemp.c (mkostemp): Likewise.
* lib/mkostemps.c (mkostemps): Likewise.
* lib/mkstemp.c (mkstemp): Likewise.
* lib/mkstemps.c (mkstemps): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoxalloc-die-tests: optimize
Eric Blake [Tue, 17 Nov 2009 18:38:42 +0000 (11:38 -0700)]
xalloc-die-tests: optimize

* tests/test-xalloc-die.sh: Reduce number of processes.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoAdd.
Simon Josefsson [Tue, 17 Nov 2009 21:23:17 +0000 (22:23 +0100)]
Add.

14 years agoAdd `gnulib-tool --import' support for LGPLv3+.
Ludovic Courtès [Tue, 17 Nov 2009 20:38:51 +0000 (21:38 +0100)]
Add `gnulib-tool --import' support for LGPLv3+.

* gnulib-tool (func_import): Add support for LGPLv3+.

14 years agoversion-etc: use proper license string
Jim Meyering [Tue, 17 Nov 2009 21:19:54 +0000 (22:19 +0100)]
version-etc: use proper license string

* modules/version-etc (License): Use LGPL, not LGPLv3+.
* modules/version-etc-fsf: Likewise.

14 years agotests/test-xalloc-die.sh: Deal with EOL differences, and more.
Simon Josefsson [Tue, 17 Nov 2009 18:58:12 +0000 (19:58 +0100)]
tests/test-xalloc-die.sh: Deal with EOL differences, and more.

14 years agounsetenv: work around Solaris bug
Eric Blake [Tue, 17 Nov 2009 13:31:34 +0000 (06:31 -0700)]
unsetenv: work around Solaris bug

unsetenv(name) only cleared the first instance, even if (ab)use of
putenv, or assignment to environ, included duplicates of name.

* m4/setenv.m4 (gl_FUNC_UNSETENV): Check for bug.
* lib/unsetenv.c (rpl_unsetenv): Work around it.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agovasnprintf: avoid compiler warnings
Eric Blake [Fri, 30 Oct 2009 16:24:45 +0000 (10:24 -0600)]
vasnprintf: avoid compiler warnings

* lib/vasnprintf.c (VASNPRINTF): Avoid shadowing our own local
variables.
* lib/printf-args.c (PRINTF_FETCHARGS): Avoid type mismatch.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomodules/xalloc-die-tests (Makefile.am): Drop XFAIL_TESTS.
Simon Josefsson [Tue, 17 Nov 2009 09:04:43 +0000 (10:04 +0100)]
modules/xalloc-die-tests (Makefile.am): Drop XFAIL_TESTS.

14 years agotest-xalloc-die.sh: make the code agree with the commit log
Jim Meyering [Tue, 17 Nov 2009 07:46:29 +0000 (08:46 +0100)]
test-xalloc-die.sh: make the code agree with the commit log

* tests/test-xalloc-die.sh: Put "." at the front of $PATH, not
at the end, just in case you happen to have a test-xalloc-die
program in some other PATH directory.

14 years agotest-xalloc-die.sh: fix a portability bug
Jim Meyering [Tue, 17 Nov 2009 07:42:58 +0000 (08:42 +0100)]
test-xalloc-die.sh: fix a portability bug

* tests/test-xalloc-die.sh: Do not invoke via ./test-xalloc-die.
Instead, set PATH to start with "." and invoke via "test-xalloc-die".
Otherwise, argv[0] (as often seen in diagnostics) would be too
system-dependent, sometimes with, and sometimes without the leading "./".

14 years agoversion-etc-fsf: relax license to LGPLv3+
Jim Meyering [Tue, 17 Nov 2009 06:20:41 +0000 (07:20 +0100)]
version-etc-fsf: relax license to LGPLv3+

* modules/version-etc-fsf (License): Relax license.

14 years agoxalloc-die-tests: avoid printing null pointer
Eric Blake [Tue, 17 Nov 2009 04:21:10 +0000 (21:21 -0700)]
xalloc-die-tests: avoid printing null pointer

The test leaked "(null): memory exhausted" to stderr, or crashed
for less capable printf.

* modules/xalloc-die-tests (Files, Makefile.am): Wrap execution in
shell script.
* tests/test-xalloc-die.c (program_name): Declare.
* tests/test-xalloc-die.sh (tmpfiles): New file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agosetenv, unsetenv: work around various bugs
Eric Blake [Sun, 15 Nov 2009 05:13:10 +0000 (22:13 -0700)]
setenv, unsetenv: work around various bugs

POSIX requires setenv(NULL,"",0), setenv("a=b","",0),
unsetenv(NULL), and unsetenv("a=b") to fail with EINVAL, but
many BSD implementations lack validation.  The gnulib
replacement for void unsetenv did not do validation, and the
replacement for setenv was out of sync with glibc.  Also, some
BSD implementations of setenv("a","==",1) eat the leading '='.

See also some recent Austin Group interpretations on environ:
http://austingroupbugs.net/view.php?id=167
http://austingroupbugs.net/view.php?id=185

* lib/setenv.c (setenv) [!HAVE_SETENV]: Resync from glibc.
(setenv) [HAVE_SETENV]: Work around bugs.
* lib/unsetenv.c (unsetenv) [HAVE_UNSETENV]: Work around bugs.
* m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE, gl_FUNC_UNSETENV): Check
for bugs.
(gl_FUNC_SETENV): Write in terms of gl_FUNC_SETENV_SEPARATE.
* m4/environ.m4 (gl_ENVIRON): Avoid expand-before-require.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Update defaults.
* modules/stdlib (Makefile.am): Update substitutions.
* lib/stdlib.in.h (setenv, unsetenv): Update prototypes.
* doc/posix-functions/setenv.texi (setenv): Document the bugs.
* doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
* modules/setenv-tests: New test.
* modules/unsetenv-tests: Likewise.
* tests/test-setenv.c: New file.
* tests/test-unsetenv.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoversion-etc: relax license to LGPLv3+
Jim Meyering [Mon, 16 Nov 2009 21:08:52 +0000 (22:08 +0100)]
version-etc: relax license to LGPLv3+

* modules/version-etc (License): Relax license.

14 years agobetter AC_REQUIRE expanded-before-required-warning avoidance
Jim Meyering [Mon, 16 Nov 2009 18:26:35 +0000 (19:26 +0100)]
better AC_REQUIRE expanded-before-required-warning avoidance

* m4/chown.m4 (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Define
with AC_DEFUN_ONCE, rather than AC_DEFUN, to avoid AC_REQUIRE warnings.
Suggested by Eric Blake.  This change also reverts commit 1b712ba8,
which is no longer needed.

14 years agotest-freading: clean up temporary file
Eric Blake [Mon, 16 Nov 2009 13:27:10 +0000 (06:27 -0700)]
test-freading: clean up temporary file

* tests/test-freading.c (main): Remove file on success, and use
ASSERT more liberally.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoavoid new AC_REQUIRE expanded-before-required warnings
Jim Meyering [Mon, 16 Nov 2009 09:22:53 +0000 (10:22 +0100)]
avoid new AC_REQUIRE expanded-before-required warnings

* modules/chown (configure.ac): Require gl_FUNC_CHOWN, rather than
merely using it.
* modules/euidaccess (configure.ac): Likewise for gl_FUNC_EUIDACCESS.
* modules/faccessat (configure.ac): Likewise for gl_FUNC_FACCESSAT.

14 years agoAdd xalloc-die self-test.
Simon Josefsson [Sun, 15 Nov 2009 16:20:06 +0000 (17:20 +0100)]
Add xalloc-die self-test.

14 years agolib/gc-pbkdf2-sha1.c: Remove comments from RFC 2898.
Simon Josefsson [Sun, 15 Nov 2009 12:52:55 +0000 (13:52 +0100)]
lib/gc-pbkdf2-sha1.c: Remove comments from RFC 2898.

14 years agofnmatch: avoid compiler warning
Eric Blake [Sat, 14 Nov 2009 22:25:49 +0000 (15:25 -0700)]
fnmatch: avoid compiler warning

cond ? (size_t) : (char* - char* + 1) varies in signedness, but
using 1LU coerces the latter half to unsigned math.

* lib/fnmatch_loop.c (NEW_PATTERN): Coerce addition to unsigned,
to silence compiler warning about mismatch signedness in ?:.
Reported by Robert Millan.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agointprops: add double-inclusion guard
Eric Blake [Sat, 14 Nov 2009 22:09:08 +0000 (15:09 -0700)]
intprops: add double-inclusion guard

* lib/intprops.h: Allow idempotent includes.
Suggested by Bruce Korb.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agoopenat: detect Solaris fchownat bug
Eric Blake [Sat, 14 Nov 2009 15:17:44 +0000 (08:17 -0700)]
openat: detect Solaris fchownat bug

Solaris 9 fchownat(dir,"name/",uid,gid,flag) has same bugs as
chown and lchown.

* lib/fchownat.c (rpl_fchownat): Work around Solaris bug.  Avoid
penalizing glibc chownat when only lchownat is broken.
* m4/openat.m4 (gl_FUNC_FCHOWNAT): Replace fchownat if there are
trailing slash bugs.
* doc/posix-functions/fchownat.texi (fchownat): Document the bug.
* modules/openat-tests (Files): Include more files.
(Depends-on): Add mgetgroups, sleep, stat-time.
(configure.ac): Add additional checks.
(Makefile.am): Build new test.
* tests/test-fchownat.c: New file.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agolchown: detect Solaris and FreeBSD bug
Eric Blake [Fri, 13 Nov 2009 04:45:20 +0000 (21:45 -0700)]
lchown: detect Solaris and FreeBSD bug

Solaris 9 and FreeBSD 7.2 lchown("link-to-file/",uid,gid)
mistakenly changes ownership of "file".

* lib/lchown.c (rpl_lchown): Work around bug.
* m4/lchown.m4 (gl_FUNC_LCHOWN): Check for trailing slash bugs.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
* modules/unistd (Makefile.am): Populate it.
* lib/unistd.in.h (lchown): Update declaration.
* doc/posix-functions/lchown.texi (lchown): Document the bug.
* modules/lchown-tests: New file.
* tests/test-lchown.h (test_lchown): Likewise.
* tests/test-lchown.c (main): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agochown: detect Solaris and FreeBSD bug
Eric Blake [Fri, 13 Nov 2009 04:45:20 +0000 (21:45 -0700)]
chown: detect Solaris and FreeBSD bug

Solaris 9 and FreeBSD 7.2 chown("link-to-file/",uid,gid)
mistakenly changes ownership of "file".

* lib/chown.c (rpl_chown): Work around bug.
* m4/chown.m4 (gl_FUNC_CHOWN): Check for trailing slash bugs.
(gl_PREREQ_CHOWN): Delete.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
* modules/unistd (Makefile.am): Populate it.
* lib/unistd.in.h (chown): Update declaration.
* lib/lchown.c (chown): Update client.
* modules/lchown (Depends-on): Add lstat.
* doc/posix-functions/chown.texi (chown): Document the bug.
* doc/posix-functions/getgroups.texi (getgroups): Document
getgroups pitfall.
* modules/chown-tests: New file.
* tests/test-chown.h (test_chown): Likewise.
* tests/test-chown.c (main): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agognulib-tool: correctly detect absence of m4 directories
Robert Millan [Sat, 14 Nov 2009 13:45:02 +0000 (06:45 -0700)]
gnulib-tool: correctly detect absence of m4 directories

$m4dirs is incorrectly counting.  In my particular case
(correct value: 0, detected value: 1), this resulted in gnulib-tool
silently exitting with no visible error (and no job done).

* gnulib-tool: Avoid extra newline on data passed to wc -l.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agomaint.mk: Prohibit inclusion of "xalloc.h" without use.
Jim Meyering [Sat, 14 Nov 2009 08:53:26 +0000 (09:53 +0100)]
maint.mk: Prohibit inclusion of "xalloc.h" without use.

* top/maint.mk (sc_prohibit_close_stream_without_use): New rule.

14 years agostrftime.h: wrap funtion declaration in extern "C" block
John W. Eaton [Sat, 14 Nov 2009 07:24:25 +0000 (08:24 +0100)]
strftime.h: wrap funtion declaration in extern "C" block

* lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration.

14 years agogetgroups: avoid compiler warning
Eric Blake [Fri, 13 Nov 2009 20:31:35 +0000 (13:31 -0700)]
getgroups: avoid compiler warning

* lib/getgroups.c (rpl_getgroups): Delete shadowed variable.

Signed-off-by: Eric Blake <ebb9@byu.net>
14 years agogetgroups: work around FreeBSD bug
Eric Blake [Fri, 13 Nov 2009 19:53:17 +0000 (12:53 -0700)]
getgroups: work around FreeBSD bug

FreeBSD 7.2 mistakenly succeeds on getgroups(-1,ptr) (POSIX
requires EINVAL failure since -1 is less than the proper result).

* lib/getgroups.c (rpl_getgroups): Work around the bug.
* m4/getgroups.m4 (gl_FUNC_GETGROUPS): Detect the bug.
* doc/posix-functions/getgroups.texi (getgroups): Document it.
* tests/test-getgroups.c (main): Fix buffer overrun.

Signed-off-by: Eric Blake <ebb9@byu.net>