4
0

ChangeLog 180 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862
  1. 2004-03-26 Sergey Poznyakoff <[email protected]>
  2. * src/create.c (write_long_name): Do not allow more than
  3. NAME_FIELD_SIZE-1 characters in a file name for V7 format
  4. archives.
  5. * tests/longv7.sh: New file.
  6. * tests/Makefile.am: Add longv7.sh
  7. 2004-03-22 Sergey Poznyakoff <[email protected]>
  8. * src/buffer.c (open_archive): Clear read_full_records_option
  9. if reading from a pipe.
  10. (short_read): Display warning about the deduced record size
  11. if version > 1
  12. * tests/star/pax-big-10g.sh: Updated to match the above changes.
  13. * tests/star/ustar-big-2g.sh: Likewise.
  14. * tests/star/ustar-big-8g.sh: Likewise.
  15. * configure.ac: Added gl_FUNC_STRTOULL
  16. * src/create.c (start_header): Check for GNU_FORMAT
  17. if incremental_option is set.
  18. * src/xheader.c (to_decimal): New function.
  19. (xheader_format_name): Use to_decimal() instead of snprintf.
  20. * tests/listed01.sh: Use genfile instead of dd
  21. * tests/multiv01.sh: Likewise.
  22. 2004-03-12 Sergey Poznyakoff <[email protected]>
  23. * src/list.c (read_and): Stop processing the archive after
  24. encountering a single zero record. Many old archives contain
  25. arbitrary garbage after it.
  26. The warning is issued anyway.
  27. 2004-03-02 Sergey Poznyakoff <[email protected]>
  28. * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
  29. conversion buffer was not null terminated. Fix provided
  30. by Leland Lucius <[email protected]>
  31. * THANKS: Added Leland Lucius
  32. * src/utf8.c (utf8_convert): Indentation fix.
  33. 2004-02-29 Sergey Poznyakoff <[email protected]>
  34. * src/buffer.c (flush_read): Bugfix: the
  35. condition at line 714 included
  36. || (status > 0 && !read_full_records_option)
  37. which is grossly wrong, since even if new_volume() below succeeds,
  38. the subsequent call to rmtread will overwrite the chunk of data
  39. already read in the buffer and thus spoil everything.
  40. * src/system.c (sys_child_open_for_uncompress): Minor stylistic
  41. fix.
  42. * tests/star/multi-fail.sh: New test.
  43. * tests/Makefile.am: Added multi-fail.sh
  44. * tests/star/README: Updated
  45. 2004-02-29 Sergey Poznyakoff <[email protected]>
  46. * NEWS: Updated
  47. * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
  48. * src/common.h (utc_option): new global
  49. (enum old_files.KEEP_NEWER_FILES): New element
  50. * src/extract.c: Handle --keep-newer-files option
  51. * src/list.c (tartime): Print UTC if --utc was given.
  52. * src/tar.c: New options: --utc and keep-newer-files
  53. * tests/Makefile.am: Added new tests
  54. * tests/after: Rewritten
  55. * tests/before: Rewritten
  56. * tests/preset.in: Rewritten
  57. * tests/delete03.sh: Accomodate for the new testsuite logic
  58. * tests/gzip.sh: Likewise
  59. * tests/incremen.sh: Likewise
  60. * tests/listed01.sh: Likewise
  61. * tests/multiv01.sh: Likewise
  62. * tests/old.sh: Likewise
  63. * tests/options.sh: Likewise
  64. * tests/version.sh: Likewise
  65. * tests/volume.sh: Likewise
  66. * tests/star: New directory
  67. * tests/star/README: New file
  68. * tests/star/gtarfail.sh: New file
  69. * tests/star/gtarfail2.sh: New file
  70. * tests/star/pax-big-10g.sh: New file
  71. * tests/star/qucktest.sh: New file
  72. * tests/star/ustar-big-2g.sh: New file
  73. * tests/star/ustar-big-8g.sh: New file
  74. 2004-02-26 Paul Eggert <[email protected]>
  75. * doc/tar.texi (dircategory Individual utilities): Append period,
  76. as suggested by Karl Berry.
  77. 2004-02-24 Sergey Poznyakoff <[email protected]>
  78. * src/list.c (decode_header): Call xheader_decode before
  79. the assignment to current_stat_info.archive_file_size.
  80. 2004-02-23 Paul Eggert <[email protected]>
  81. * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
  82. 2004-02-23 Sergey Poznyakoff <[email protected]>
  83. 1.13.93 released.
  84. * NEWS: Updated
  85. * tests/before: Move testing of the prerequisite archive formats
  86. to the separate function 'prereq'. Do not expect any arguments
  87. * tests/delete03.sh: Use prereq() instead of passing arguments
  88. to 'before'.
  89. * tests/incremen.sh: Likewise.
  90. * tests/listed01.sh: Likewise.
  91. * tests/multiv01.sh: Likewise.
  92. 2004-02-22 Sergey Poznyakoff <[email protected]>
  93. Added UTF-8 support. Finished global extended header
  94. support.
  95. * NEWS: Minor fix
  96. * configure.ac: Detect libiconv
  97. * src/utf8.c: New file. Conversions to and from utf-8.
  98. * src/Makefile.am: Added utf8.c
  99. * src/create.c (write_header_name) In pax format, use
  100. "path" keyword if the file name is not ASCII
  101. (start_header): Likewise for uname and gname.
  102. * src/list.c: Decode encountered global headers.
  103. * src/xheader.c: Use keywords from the global
  104. headers.
  105. Correctly handle UTF-8 conversions.
  106. (xheader_list_destroy): New function.
  107. (xheader_set_single_keyword,xheader_set_keyword_equal): Added
  108. missing gettext markers
  109. (decode_record): Rewritten using caller-provided handler and
  110. data closure.
  111. * tests/listed01.sh: Give credit to Andreas Schuldei.
  112. 2004-02-21 Sergey Poznyakoff <[email protected]>
  113. * src/create.c (dump_file0): The conditional at line
  114. 1296 prevented incremental backups on individual files
  115. from working, as reported by Andreas Schuldei
  116. <[email protected]>.
  117. This is due to the condition
  118. (0 < top_level || !incremental_option)
  119. Removing it makes incremental backups work for individual
  120. files as well as for directories. On the other hand, it does
  121. not affect other functionality, as shown by the reasoning below:
  122. To begin with, the two parts of this condition are mutually
  123. superfluous, because
  124. 1) when top_level < 0, incremental_option == 1
  125. so the condition yields false
  126. 2) when top_level >= 0, incremental_option == 0
  127. so the condition yields true.
  128. In other words, it is completely equivalent to
  129. (!incremental_option)
  130. Now, let's consider the effect of its removal. There are two cases:
  131. 1) when incremental_option==1
  132. This means incremental backup in progress. In this case dump_file
  133. is invoked only for directories or for files marked with 'Y' by
  134. get_directory_contents. The latter are those that did not meet the
  135. condition in incremen.c:242, which is exactly the same condition
  136. as this at create.c:1296. So, for these files the check
  137. (!incremental_option) is useless, since the rest of the
  138. conditional will yield false anyway. On the other hand, if
  139. dump_file is invoked on a directory, the conditional will yield
  140. false due to !S_ISDIR assertion, so these will be processed as usual.
  141. Thus, for this case the extra condition (!incremental_option) is
  142. irrelevant, and its removal won't alter the behavior of tar,
  143. *except* that it will enable incremental backups on individual
  144. files, which is the wanted effect.
  145. 2) when incremental_option==0
  146. In this case the condition yields true and its removal does not
  147. affect the functionality.
  148. * THANKS: Updated
  149. * configure.ac: Raised patchlevel to 93
  150. * src/incremen.c: Minor stylistic fixes.
  151. * tests/listed01.sh: New test. Check listed incremental
  152. backups on individual files.
  153. * tests/Makefile.am: Added listed01.sh
  154. 2004-02-20 Sergey Poznyakoff <[email protected]>
  155. * src/common.h (simple_finish_header,start_private_header): New
  156. declarations
  157. (xheader_ghdr_name): Changed declaration
  158. * src/create.c (start_private_header): Removed static qualifier.
  159. (write_extended): Removed superfluous last argument. Use
  160. xheader_write()
  161. (simple_finish_header): New function.
  162. (finish_header): Use simple_finish_header() to break recursive
  163. dependency between this function and write_extended().
  164. * src/tar.c (assert_format): Do not bail out if several
  165. --format arguments are given. This is a common case when
  166. TAR_OPTIONS are used.
  167. (decode_options): New option --show-defaults displays the
  168. compiled-in defaults.
  169. Use POSIX format if no --format option was given and
  170. --pax-option was specified.
  171. Do not allow to use --pax-option unless the archive format is
  172. set to POSIX (or reading subcommand is requested).
  173. * src/update.c (update_archive): Write global extended header if
  174. constructed.
  175. * src/xheader.c (xheader_format_name): Bugfix.
  176. (xheader_xhdr_name): Changed the default extended header name
  177. to '%d/PaxHeaders.%p/%f', as POSIX requires.
  178. (xheader_ghdr_name): Removed unused argument.
  179. (xheader_write,xheader_write_global): New function.
  180. (xheader_decode): Modified to honor overrides whatever
  181. the current archive format is.
  182. * src/delete.c (delete_archive_members): Call xheader_decode
  183. unconditionally.
  184. * src/list.c (decode_header): Likewise.
  185. * src/incremen.c (sort_obstack): Fixed typo in the comment
  186. * doc/tar.texi: Document new default for extended
  187. header names.
  188. * tests/before: Accept an optional list of allowed archive
  189. formats. Exit with the status 77 if the current archive
  190. format does not match any of them.
  191. * tests/delete03.sh: Require gnu, oldgnu or posix format
  192. * tests/incremen.sh: Require gnu or oldgnu format
  193. * tests/multiv01.sh: Likewise
  194. 2004-02-20 Sergey Poznyakoff <[email protected]>
  195. * doc/tar.texi (Option Summary): Documented --pax-option
  196. * src/tar.c: Likewise.
  197. * NEWS: Likewise.
  198. * src/create.c (to_chars): Added a comment.
  199. * src/tar.h: Comment to GNU_FORMAT
  200. 2004-02-18 Sergey Poznyakoff <[email protected]>
  201. * README: Updated
  202. * configure.ac: Added stpcpy
  203. * bootstrap: Likewise
  204. * lib/Makefile.am: Likewise
  205. * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
  206. functions
  207. * src/create.c (write_extended): Call xheader_xhdr_name
  208. instead of using hardcoded "././@PaxHeader" name.
  209. * src/tar.c: New option --pax-option (equivalent to -o option
  210. of pax).
  211. * src/xheader.c: Implement pax -o option. Fixed misleading
  212. heading comment (introduced 2003-09-02).
  213. * src/incremen.c: Minor fixes
  214. * m4/.cvsignore: Updated
  215. 2004-02-17 Sergey Poznyakoff <[email protected]>
  216. * src/incremen.c: Removed accumulator stuff in favor of obstack.
  217. (get_directory_contents): Split into two functions
  218. * src/update.c: Minor changes
  219. * doc/tar.texi: Fixed typo
  220. 2004-02-15 Paul Eggert <[email protected]>
  221. Fix Debian bug 230872, originally reported by Jeff King in
  222. <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
  223. * doc/tar.texi (posix compliance): Remove. The whole section
  224. was a misunderstanding of what POSIXLY_CORRECT is supposed to
  225. mean. The GNU Coding Standards says that POSIXLY_CORRECT
  226. is for disabling extensions that are incompatible with POSIX:
  227. it is not for disabling compatible extensions. All references
  228. to this section removed.
  229. (posix): This format is created only if the posix format is
  230. specified; it is no longer created if gnu format is specified
  231. and POSIXLY_CORRECT is set.
  232. * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
  233. POSIX does not specify the behavior of tar, so we should
  234. not worry about POSIXLY_CORRECT here.
  235. 2004-01-21 Sergey Poznyakoff <[email protected]>
  236. * Makefile.am: Removed m4
  237. * configure.ac: Require automake-1.8/autoconf-2.59. Removed
  238. m4/Makefile.
  239. * README-alpha: Updated
  240. * bootstrap: Updated TP URL, improved help output. Default
  241. to :ext:anoncvs and set CVS_RSH, unless already set.
  242. * m4/Makefile.am: Removed
  243. 2004-01-21 Sergey Poznyakoff <[email protected]>
  244. * bootstrap: Bugfix by Marco Gerards <[email protected]>:
  245. Use $option instead of $1 so all options will be parsed.
  246. 2004-01-04 Sergey Poznyakoff <[email protected]>
  247. Started rewriting buffer.c ...
  248. * bootstrap: New option --no-po
  249. * src/buffer.c (new_volume,check_label_pattern): Changed return type.
  250. (time_to_start_writing): Changed data type
  251. (file_to_switch_to): Removed. Variable never assigned to.
  252. (open_archive) Moved option compatibility checks to tar.c
  253. Other minor changes.
  254. * src/common.h (maybe_backup_file): Changed return type
  255. * src/misc.c: Likewise.
  256. * src/create.c: Updated invocations of safer_name_suffix
  257. * src/extract.c: Likewise
  258. * src/delete.c: Updated assignment to write_archive_to_stdout
  259. * src/tar.c (decode_options): More option compatibility checks
  260. (moved from buffer.c)
  261. * src/update.c (time_to_start_writing): Changed data type.
  262. * tests/recurse.sh: New test case.
  263. * tests/mksparse.c: New file.
  264. * tests/Makefile.am: Added recurse.sh and mksparse.c
  265. 2004-01-02 Sergey Poznyakoff <[email protected]>
  266. * src/sparse.c (sparse_diff_file): Bugfix. Thanks
  267. Martin Simmons for the patch.
  268. * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
  269. <[email protected]> for the patch.
  270. 2003-12-26 Paul Eggert <[email protected]>
  271. Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
  272. and translation website.
  273. * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
  274. intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
  275. isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
  276. a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
  277. files are replaced by autoreconf. Also, there seems to be a bug
  278. in gettext/autoconf/automake if we try to omit these files after
  279. autoreconf has replaced them, even though the gettext manual says
  280. they're optional. So give up and just include them for now, even
  281. though they make 'configure' longer and slower.
  282. Change translation URL from
  283. <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
  284. <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
  285. accommodate translator website revamp.
  286. Fail if autoreconf fails.
  287. * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
  288. signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
  289. ignore files now supplied by gettext 0.13.1.
  290. 2003-12-25 Sergey Poznyakoff <[email protected]>
  291. Synchronized with the backup repository on Mirddin
  292. 2003-12-19 Sergey Poznyakoff <[email protected]>
  293. * configure.ac: Check for varios members of struct stat
  294. that may represent file modification times with a subsecond
  295. precision.
  296. Check for utimes (for future use)
  297. * src/buffer.c (short_read): Issue a warning on short reads.
  298. * src/common.h (sys_stat_nanoseconds): New function
  299. * src/create.c (dump_file0): Use sys_stat_nanoseconds().
  300. * src/list.c (read_and): Treat only two successive zero
  301. filled blocks as an EOF indicator. Issue a warning if
  302. a single one is encountered.
  303. * src/system.c (sys_stat_nanoseconds): New function
  304. * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
  305. members.
  306. * src/xheader.c (code_time,decode_time): Support for subsecond
  307. precision.
  308. (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
  309. (mtime_coder,mtime_decoder): Update invocations of code_time and
  310. decode_time.
  311. (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
  312. (sparse_numblocks_decoder,sparse_offset_decoder)
  313. (sparse_numbytes_decoder): Updated
  314. 2003-12-18 Sergey Poznyakoff <[email protected]>
  315. * src/names.c (safer_name_suffix): Reverted change made
  316. 2003-11-14. Reason: Discussion with Paul Eggert and
  317. Jean-Louis Martineau. See also ChangeLog entry from
  318. 1999-08-14.
  319. * tests/delete03.sh: Likewise.
  320. * tests/extrac04.sh: Likewise.
  321. * tests/multiv01.sh: Likewise.
  322. 2003-12-12 Sergey Poznyakoff <[email protected]>
  323. * src/incremen.c (write_directory_file): Use sys_truncate
  324. * src/list.c (print_header): Use archive_file_size member
  325. when printing real file size.
  326. * src/sparse.c (sparse_scan_file): Correctly handle files with
  327. a hole at the end.
  328. (sparse_dump_region,sparse_extract_region): Allow for zero size
  329. trailing blocks
  330. 2003-12-12 Sergey Poznyakoff <[email protected]>
  331. * configure.ac: Raised version number to 1.13.92
  332. * src/list.c (decode_header): Discern between pax and ustar
  333. formats
  334. Initialize current_stat_info.archive_file_size.
  335. NOTE: Modifications from this date on are temporarily
  336. stored on local CVS on mirddin. This repository will
  337. be synchronized with Savannah as soon as the latter
  338. becomes operational again.
  339. 2003-12-01 Sergey Poznyakoff <[email protected]>
  340. * TODO: Updated
  341. * src/sparse.c: Initial implementation of GNU/pax sparse
  342. file format.
  343. * src/common.h (xheader_store): Changed prototype.
  344. * src/create.c: Update calls to xheader_store
  345. * src/extract.c (extract_archive): Check reported size vs.
  346. archive file size to determine if we have to do with a
  347. sparse file.
  348. * src/tar.c (usage): Cleaned up the sample argument to --newer
  349. option.
  350. (decode_options): Allow --sparse for POSIX_FORMAT archives.
  351. * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
  352. extra argument
  353. Implemented GNU.sparse.* keywords.
  354. 2003-11-30 Sergey Poznyakoff <[email protected]>
  355. * configure.ac: Check for setlocale. Thanks Bruno Haible for
  356. reporting.
  357. 2003-11-25 Sergey Poznyakoff <[email protected]>
  358. * src/create.c (write_gnu_long_link): Use oldgnu
  359. magic with @LongLink blocks.
  360. 2003-11-17 Sergey Poznyakoff <[email protected]>
  361. * src/tar.h: Support for star sparse format.
  362. * src/sparse.c: Likewise.
  363. 2003-11-17 Sergey Poznyakoff <[email protected]>
  364. * src/sparse.c (sparse_diff_file): New function
  365. * src/common.h (sys_compare_uid,sys_compare_gid): New functions
  366. (sys_compare_uid_gid): Removed.
  367. (sys_compare_links,report_difference): Changed prototype
  368. (sparse_diff_file): New function
  369. * src/system.c (sys_compare_uid,sys_compare_gid): New functions
  370. (sys_compare_uid_gid): Removed.
  371. (sys_compare_links): Changed declaration
  372. * src/compare.c (diff_archive): Use sparse_diff_file.
  373. 2003-11-16 Sergey Poznyakoff <[email protected]>
  374. Rewritten sparse file handling.
  375. * src/sparse.c: New file. Provides a universal framework
  376. for various methods for sparse files handling.
  377. * src/Makefile.am: Added sparse.c
  378. * src/common.h (struct sp_array,sparsearray,sp_array_size)
  379. (init_sparsearray,fill_in_sparse_array): Removed
  380. (enum dump_status): New data type
  381. (pad_archive,close_diag,open_diag,read_diag_details)
  382. (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
  383. functions.
  384. (sparse_file_p,sparse_dump_file,sparse_extract_file): New
  385. functions.
  386. (print_header): Changed prototype declaration.
  387. * src/tar.h (struct sp_array): Declaration from common.h
  388. (struct tar_stat_info): New members archive_file_size,
  389. sparse_map_avail,sparse_map.
  390. * src/create.c: Major rewrite.
  391. * src/extract.c: Use new sparse file interface.
  392. * src/compare.c (diff_sparse_files): Temporary placeholder.
  393. * src/buffer.c: Minor changes
  394. * src/tar.c: Likewise.
  395. * src/list.c: Likewise.
  396. * src/misc.c (close_diag,open_diag,read_diag_details)
  397. (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
  398. diagnostics functions.
  399. * src/incremen.c: Use new diagnostics functions.
  400. * src/names.c: Likewise.
  401. 2003-11-14 Sergey Poznyakoff <[email protected]>
  402. * configure.ac: Fixed check for setsockopt
  403. * src/create.c: Do not zero-terminate name field if
  404. the name is exactly 100 characters long.
  405. (write_ustar_long_name): Fixed cheking for unsplittable
  406. names.
  407. 2003-11-14 Sergey Poznyakoff <[email protected]>
  408. * src/create.c (start_header): Removed debugging hook
  409. (dump_file): Fixed handling of linkname field.
  410. * src/names.c (safer_name_suffix): If the input
  411. file name ends with a slash, output one should do so
  412. as well.
  413. * doc/tar.texi: Documented --format=ustar
  414. 2003-11-14 Sergey Poznyakoff <[email protected]>
  415. * src/tar.h (archive_format): USTAR_FORMAT: New type.
  416. * src/create.c: Added POSIX.1-1988 support.
  417. * src/names.c (safer_name_suffix): Skip leading ./
  418. * src/tar.c: New option --format=ustar forces
  419. POSIX.1-1988 archive format.
  420. * tests/delete03.sh: Updated.
  421. * tests/extrac04.sh: Updated.
  422. * tests/multiv01.sh: Updated.
  423. 2003-11-13 Sergey Poznyakoff <[email protected]>
  424. * src/list.c (read_and): Initialize current_stat_info
  425. and extended_header at the start of the loop.
  426. * src/names.c (all_names_found): Check if the argument
  427. contains valid filename. Fixes coredump on `not_a_tar_file'
  428. * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
  429. (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
  430. Fixes `pax-big-10g' bug.
  431. 2003-11-12 Paul Eggert <[email protected]>
  432. Fix some C compatibility bugs reported by Joerg Schilling.
  433. * src/common.h (stripped_prefix_len): Fix misspelling
  434. "stripped_path_len" in declaration.
  435. * src/rmt.c (main): Use "return FOO;" rather than
  436. "exit (FOO);"; we no longer have to worry about
  437. pre-ANSI hosts that mishandled returned values from "main".
  438. * src/tar.c (main): Likewise. This avoids warnings on some
  439. compilers.
  440. * src/system.c: Include signal.h, for 'kill'.
  441. * src/system.h (DEV_BSIZE): Remove.
  442. (DEFAULT_ST_BLKSIZE): New macro.
  443. (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
  444. * src/tar.c (enum): Remove comma just before }.
  445. 2003-11-12 Sergey Poznyakoff <[email protected]>
  446. * src/list.c (decode_header): Initialize st_atime and
  447. st_ctime.
  448. 2003-11-11 Sergey Poznyakoff <[email protected]>
  449. * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
  450. Bunk <[email protected]> for reporting.
  451. * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
  452. <[email protected]> for spotting.
  453. 2003-11-04 Paul Eggert <[email protected]>
  454. * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
  455. C99 require this.
  456. 2003-10-26 Paul Eggert <[email protected]>
  457. * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
  458. Bug reported by Christian Weisgerber.
  459. 2003-10-19 Sergey Poznyakoff <[email protected]>
  460. * AUTHORS: Updated
  461. * NEWS: Updated
  462. * src/tar.c (decode_options): Removed superfluous archive format
  463. check
  464. * doc/tar.texi: Documented new features.
  465. 2003-10-08 Sergey Poznyakoff <[email protected]>
  466. * NEWS: Updated
  467. * THANKS: Added Wojciech Polak
  468. * configure.ac: Added checks for missing functions. Raised
  469. version number to indicate alpha release.
  470. * lib/Makefile.am: Added missing headers
  471. * lib/waitpid.c: Added missing includes.
  472. * src/extract.c: Likewise.
  473. * src/names.c: Removed spurious includes.
  474. * src/xheader.c: Likewise.
  475. * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
  476. macro overriding broken mkdir prototypes.
  477. 2003-10-04 Sergey Poznyakoff <[email protected]>
  478. * configure.ac: Check for dev_t and ino_t.
  479. * m4/Makefile.am: Added missing files.
  480. * src/system.c: New file.
  481. * src/Makefile.am: Added system.c
  482. * src/common.h: Prototypes for functions from system.c
  483. * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
  484. * src/buffer.c: Moved system dependencies to system.c
  485. * src/compare.c: Likewise.
  486. * src/create.c: Likewise.
  487. * src/delete.c: Likewise.
  488. * src/extract.c: Likewise.
  489. * src/rtapelib.c: Likewise.
  490. 2003-10-04 Sergey Poznyakoff <[email protected]>
  491. Implemented --occurrence option.
  492. * NEWS: Updated.
  493. * src/tar.c: New option --occurrence.
  494. * src/common.h (occurrence_option): New global
  495. (struct name): Changed `found' member to `uintmax_t
  496. found_count'.
  497. (names_done): Removed
  498. (all_names_found): Changed prototype.
  499. (ISFOUND,WASFOUND): New macros
  500. * src/delete.c (delete_archive_members): Honor --occurrence
  501. option.
  502. * src/list.c (read_and): Likewise.
  503. * src/names.c: Count number of occurrences of each name in the
  504. archive.
  505. (name_match): Honor --occurrence option.
  506. (names_done): Removed
  507. (all_names_found,names_notfound): Rewritten.
  508. 2003-10-02 Sergey Poznyakoff <[email protected]>
  509. * src/tar.c: Removed extra precaution regarding
  510. subcommand_option == CAT_SUBCOMMAND
  511. * lib/Makefile.am: Updated
  512. 2003-10-02 Sergey Poznyakoff <[email protected]>
  513. * src/common.h (names_done): New function.
  514. * src/names.c: Likewise.
  515. * src/list.c (read_and): Use all_names_found() as `while'
  516. condition.
  517. * src/tar.c: New option --first-copy
  518. * NEWS: Updated
  519. 2003-09-24 Paul Eggert <[email protected]>
  520. * src/rmt.c (main): Don't translate Copyright string; international
  521. law says the word "Copyright" should be in English.
  522. * src/tar.c (decode_options): Likewise.
  523. 2003-09-22 Paul Eggert <[email protected]>
  524. * doc/tar.texi (extracting untrusted archives): New section.
  525. * src/common.h (stripped_path_len): Renamed from cut_path_elements.
  526. Return size_t, not pointer, so that we don't have to worry about
  527. violating the C standard by converting char const * to char *.
  528. All callers changed.
  529. * src/names.c (stripped_path_len): Likewise. Strip file system
  530. prefix, too. Count adjacent slashes as if they were one slash;
  531. that is the POSIX standard.
  532. 2003-09-17 Paul Eggert <[email protected]>
  533. * README-alpha: Document maintainer tool assumptions a bit. GNU
  534. 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
  535. Debian bug 211447. Fix minor misspellings/whitespace nits.
  536. * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
  537. gl_USE_SYSTEM_EXTENSIONS.
  538. * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
  539. * m4/.cvsignore: Add restrict.m4, time_r.m4.
  540. 2003-09-17 Paul Eggert <[email protected]>
  541. * bootstrap: Don't use "for option; do";
  542. Solaris 8 /bin/sh doesn't like that.
  543. 2003-09-17 Sergey Poznyakoff <[email protected]>
  544. * README-alpha: Updated
  545. * bootstrap: Updated
  546. 2003-09-17 Sergey Poznyakoff <[email protected]>
  547. * README-alpha: Updated
  548. * bootstrap: Updated
  549. * po/POTFILES.in: Added src/xheader.c
  550. * src/common.h (cut_path_elements): Added proto.
  551. 2003-09-05 Sergey Poznyakoff <[email protected]>
  552. * src/buffer.c: Use ngettext where appropriate.
  553. * src/compare.c: Likewise.
  554. * src/create.c: Likewise.
  555. * src/misc.c: Likewise.
  556. * src/tar.c: Likewise.
  557. * src/update.c: Likewise.
  558. 2003-09-04 Sergey Poznyakoff <[email protected]>
  559. * .cvsignore: Added *.shar.gz
  560. * NEWS: Updated
  561. * TODO: Updated
  562. * src/common.h (strip_path_elements): New variable.
  563. * src/extract.c (extract_archive): Implemented --strip-path
  564. * src/names.c (cut_path_elements): New functon.
  565. * src/tar.c: New option --strip-path=NUM.
  566. (decode_options) Assign boolean values to bool variables.
  567. 2003-09-04 Sergey Poznyakoff <[email protected]>
  568. * src/delete.c: Fixed deletion from the POSIX archives.
  569. * src/list.c (read_header): Minor change.
  570. * src/tar.c (main): Do not check for volume_label_option
  571. if subcommand_option is not CREATE_SUBCOMMAND.
  572. * src/xheader.c (xheader_decode): Store the header as
  573. well (for eventual delete).
  574. * tests/incremen.sh: Explicitly request GNU format. This will
  575. disappear when GNU extended header keywords are working.
  576. * tests/multiv01.sh: Likewise
  577. * tests/volume.sh: Likewise
  578. 2003-09-04 Sergey Poznyakoff <[email protected]>
  579. * src/create.c: Support for "linkpath" extended keyword.
  580. * src/xheader.c (decode_record): Reversed the return
  581. condition.
  582. 2003-09-03 Sergey Poznyakoff <[email protected]>
  583. * configure.ac: Allow to redefine the default output format.
  584. * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
  585. (archive_format_string): New function.
  586. (usage): Updated help output.
  587. * README: Updated.
  588. * NEWS: Updated.
  589. * TODO: Updated.
  590. 2003-09-02 Paul Eggert <[email protected]>
  591. * src/common.h (destroy_stat, xheader_decode, xheader_store,
  592. xheader_read, xheader_finish, xheader_destroy): Add decls;
  593. C99 requires this.
  594. * src/create.c (write_extended): Remove unused local 'bufsize'.
  595. * src/delete.c (delete_archive_members): Handle case of
  596. HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
  597. * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
  598. occurs, as it's not possible.
  599. * src/update.c (update_archive): Likewise.
  600. Use "const" when possible in new code.
  601. * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
  602. (fmttab): Now const. All uses changed.
  603. * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
  604. (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
  605. decode_record, xheader_store, xheader_print, code_string, code_time,
  606. code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
  607. gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
  608. linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
  609. mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
  610. uid_coder, uid_decoder, uname_coder, uname_decoder):
  611. Use pointers to const when possible.
  612. (xhdr_tab): Now const.
  613. * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
  614. (set_archive_format): Report an error if no format name matches,
  615. instead of returning an undefined value.
  616. * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
  617. atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
  618. ctime_decoder, mtime_decoder, path_decoder, size_decoder,
  619. uid_decoder, uname_decoder): Remove unused keyword arg.
  620. All uses changed.
  621. * src/tar.c (set_archive_format): Now static.
  622. * src/xheader.c (xhdr_tab, format_uintmax): Now static.
  623. * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
  624. atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
  625. linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
  626. ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
  627. size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
  628. Remove forward decls; no longer needed.
  629. (xhdr_tab): Move to end, so that the forward decls aren't needed.
  630. Add a forward declaration.
  631. Use 'bool' in new code, when appropriate.
  632. * src/xheader.c (decode_record): Return bool, not int.
  633. * src/common.h (read_header): Since it accepts bool, change
  634. all callers to use false and true rather than 0 and 1.
  635. * src/xheader.c (decode_record): Fix misspelling in diagnostic
  636. "extended headed" -> "extended header".
  637. GNU coding style fixes.
  638. * src/xheader.c (decode_record, xheader_decode):
  639. Do not use decls like "char *p, *q;".
  640. Minor style fixes.
  641. (xheader_store): Avoid parentheses around object operand of sizeof.
  642. 2003-09-03 Sergey Poznyakoff <[email protected]>
  643. * src/create.c (start_header): Store long file names
  644. in "path" keyword of an extended header if in POSIX
  645. mode.
  646. (finish_header): print header before calling write_extended().
  647. * src/list.c (list_archive): Always decode the header. This
  648. is necessary so the extended header is processed and the correct
  649. filename is printed no matter what the state of verbose_option.
  650. * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
  651. for the time being).
  652. 2003-09-01 Paul Eggert <[email protected]>
  653. Update from gnulib, and correct fnmatch to fnmatch-gnu.
  654. * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
  655. Sort.
  656. * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
  657. of AC_GNU_SOURCE.
  658. * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
  659. * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
  660. copying rules from gnulib module descriptions.
  661. (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
  662. Update from gnulib modules alloca, fnmatch, getline, stdbool.
  663. * m4/.cvsignore: Add utimes-null.m4. Sort.
  664. 2003-09-01 Sergey Poznyakoff
  665. Added initial support for creating POSIX headers.
  666. * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
  667. (string_to_chars): New functions
  668. (struct xheader): Changed structure
  669. (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
  670. prototypes.
  671. * src/create.c (string_to_chars): New function.
  672. (write_extended): New function
  673. (start_header): Create extended POSIX headers if necessary.
  674. (finish_header): Likewise.
  675. * src/list.c (print_header): Take user/group from
  676. current_stat_info.
  677. * src/names.c (gid_to_gname,gname_to_gid)
  678. (uid_to_uname,uname_to_uid): Changed prototypes.
  679. * src/tar.c: New option --format.
  680. * src/tar.h (OLDGNU_COMPATIBILITY): Removed
  681. (struct extra_header): Removed unused structure.
  682. (union block.extra_header): Removed unused member.
  683. * src/xheader.c: Implemented coder functions.
  684. * bootstrap: Added obstack.
  685. * lib/.cvsignore: Likewise.
  686. * configure.ac: Added 'gl_OBSTACK'
  687. * m4/Makefile.am: Added new files.
  688. * m4/.cvsignore: Likewise.
  689. * TODO: Minor formatting change
  690. 2003-08-31 Sergey Poznyakoff
  691. Added initial support for POSIX extended and STAR headers
  692. (only for listing/extracting).
  693. * src/xheader.c: New file.
  694. * src/Makefile.am: Added xheader.c
  695. * src/tar.h (struct star_header): New datatype
  696. (XHDTYPE,XGLTYPE): New defines
  697. (enum archive_format:STAR_FORMAT): New member
  698. (struct tar_stat_info): New datatype.
  699. (union block.star_header): New member.
  700. * src/common.h (orig_file_name,current_file_name)
  701. (current_trailing_slash,current_link_name): Removed variables.
  702. (current_stat_info): New variable
  703. (current_stat): Removed
  704. (extended_header): New variable
  705. (decode_header): Changed prototype.
  706. * src/list.c (decode_header): Added initial support for POSIX extended
  707. and STAR headers.
  708. (skip_member): Check oldgnu_header only if current_format is set
  709. to OLDGNU_FORMAT.
  710. * src/buffer.c: Use current_stat_info
  711. * src/compare.c: Likewise.
  712. * src/create.c: Likewise.
  713. * src/delete.c: Likewise.
  714. * src/incremen.c: Likewise.
  715. * src/mangle.c: Likewise.
  716. * src/update.c: Likewise.
  717. * src/extract.c: Likewise.
  718. (make_directories): Improved check for the existence of the directory
  719. * src/tar.c (destroy_stat): New function.
  720. 2003-08-29 Paul Eggert <[email protected]>
  721. * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
  722. was worth (e.g., different users in en_GB disagree about -ize
  723. versus -ise).
  724. * po/en_GB.po: Remove.
  725. 2003-07-28 Sergey Poznyakoff <[email protected]>
  726. * TODO: Updated
  727. * NEWS: Updated
  728. * src/tar.c: Removed support for the obsolete command line
  729. options.
  730. * doc/tar.texi: Removed references to the obsolete command
  731. line options.
  732. 2003-07-27 Sergey Poznyakoff <[email protected]>
  733. * TODO: Updated
  734. * NEWS: Updated
  735. * doc/tar.texi: Updated
  736. * src/common.h (check_links_option): New variable
  737. (orig_file_name): New variable
  738. (check_links): New proto.
  739. * src/create.c (struct link.nlink): New member
  740. (link_table): Static for the module.
  741. (dump_file): Update `link' member when adding new links
  742. to the link_table.
  743. (check_links): New function.
  744. * src/list.c (print_header): Use orig_file_name.
  745. * src/tar.c: New option --check-links. Changed semantics of
  746. -o to comply to UNIX98 when extracting and to its previous
  747. semantics otherwise.
  748. (main): Call check_links if --check-links. was given.
  749. 2003-07-25 Sergey Poznyakoff <[email protected]>
  750. * src/list.c (print_header): Revised
  751. * NEWS: Started the entry for 1.13.26
  752. * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
  753. 2003-07-24 Sergey Poznyakoff <[email protected]>
  754. * .cvsignore: Added to the repository.
  755. * doc/.cvsignore: Likewise.
  756. * lib/.cvsignore: Likewise.
  757. * m4/.cvsignore: Likewise.
  758. * po/.cvsignore: Likewise.
  759. * scripts/.cvsignore: Likewise.
  760. * src/.cvsignore: Likewise.
  761. * tests/.cvsignore: Likewise.
  762. * lib/Makefile.am: Added exitfail.[hc]
  763. * src/misc.c (chdir_do): Fixed call to restore_cwd
  764. * src/buffer.c (flush_read): Fixed behavior on short
  765. reads right after opening the new archive (multiv01.sh test).
  766. (new_volume): Special handling for "-".
  767. * src/list.c (print_header): Print trailing slash if
  768. current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
  769. * tests/multiv01.sh: Minor changes.
  770. * m4/Makefile.am: Added missing files.
  771. 2003-07-05 Paul Eggert <[email protected]>
  772. Finish the checkin begin yesterday.
  773. * NEWS: Document the user-visible changes installed in the last
  774. two days.
  775. * TODO: New file (actually, resurrected; but with new contents).
  776. * src/list.c (read_and): Give full type for procedure arg.
  777. (read_header): Strip trailing slashes, setting current_trailing_slash.
  778. (tartime): Avoid int overflow when printing year (!).
  779. (print_header): New arg specifying block ordinal. All uses changed.
  780. Print link as 'h' type. Give labels for long links and names.
  781. * src/misc.c (contains_dot_dot): Moved to names.c
  782. (must_be_dot_or_slash): New function.
  783. (safer_rmdir): Use it.
  784. (remove_any_file): Now takes enum as option, not boolean.
  785. Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
  786. to unlink a directory.
  787. (deref_stat): Accept bool, not int.
  788. * src/names.c (namelist_match): Allow partial matches only if
  789. recursive.
  790. (hash_string_hasher): Renamed from hash_avoided_name.
  791. (hash_string_compare): Renamed from compare_avoided_anames.
  792. (hash_string_insert, hash_string_lookup): New functions.
  793. (add_avoided_name, is_avoided_name): Use them.
  794. (safer_name_suffix): New function.
  795. (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
  796. * src/rmt.c: Don't include print-copyr.h.
  797. (prepare_input_buffer): New arg FD.
  798. Do not read more than INT_MAX bytes at once,
  799. since it breaks on some brain damaged Tru64 hosts.
  800. Divide size by two
  801. when retrying instead of subtracting 1024; for speed.
  802. (main): Use gettext to translate (C), not print_copyright.
  803. * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
  804. now that gnulib handles this.
  805. Include <stddef.h> and <limits.h> unconditionally, now that we assume
  806. C89 or better.
  807. Assume that offsetof is defined in stddef.h.
  808. Do not include <sys/param.h>.
  809. (realloc, lseek): Do not declare.
  810. (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
  811. (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
  812. declarations, since we now assume C89 or better.
  813. (PARAMS): Remove, as we now assume C89. All uses changed.
  814. (bindtextdomain, textdomain): Include <gettext.h> to define.
  815. Include <unlocked-io.h>.
  816. (valloc): Define if not defined, and if valloc is not declared.
  817. (xstrdup): Remove decl.
  818. * src/tar.c: Do not include <print-copyr.h>.
  819. Include <getdate.h>.
  820. (get_date): Remove decl.
  821. (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
  822. IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
  823. NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
  824. SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
  825. (long_options, decode_options): Use them.
  826. (OVERWRITE_DIR_OPTION): Remove.
  827. (long_options): New options --index-file, --no-overwrite-dir.
  828. Remove --overwrite-dir option.
  829. (usage): Use PACKAGE_BUGREPORT.
  830. (decode_options): Terminate new argv properly.
  831. Use PACKAGE_NAME, PACKAGE_VERSION.
  832. If verbose, report how we grokked any textual date option.
  833. (main): Add support for index-file.
  834. * tests/Makefile.am: Convert to UTF-8.
  835. (AUTOMAKE_OPTIONS): Remove.
  836. (TESTS): Add delete04.sh, multiv01.sh, options.sh.
  837. (INCLUDES): Remove ../intl.
  838. (LDADD): Don't link libtar.a twice.
  839. * tests/genfile.c: Convert to UTF-8.
  840. Don't include <print-copyr.h>.
  841. (DEFAULT_PATTERN): Renamed from DEFAULT.
  842. (ZEROS_PATTERN): Renamed from ZEROS.
  843. (main): Use gettext to translate (C), not print_copyright.
  844. 2003-07-04 Paul Eggert <[email protected]>
  845. Revamp to meet current standards of autoconf, automake,
  846. gettext, and gnulib, and incorporate new translations.
  847. * config/config.guess, config/config.sub, config/depcomp,
  848. config/install-sh, config/mdate-sh, config/missing,
  849. config/mkinstalldirs, config/texinfo.texi:
  850. Moved here from parent directory, or from doc.
  851. * config.hin: Renamed from config.h.in.
  852. * config/config.rpath: New file.
  853. * intl: Remove this subdirectory.
  854. * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
  855. * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
  856. lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
  857. lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
  858. lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
  859. lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
  860. m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
  861. stamp-h.in: Remove.
  862. * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
  863. lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
  864. lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
  865. m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
  866. m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
  867. m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
  868. m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
  869. m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
  870. m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
  871. m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
  872. m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
  873. m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
  874. m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
  875. m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
  876. m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
  877. m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
  878. po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
  879. po/[email protected], po/[email protected], po/en_GB.po,
  880. po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
  881. * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
  882. lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
  883. lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
  884. lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
  885. lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
  886. lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
  887. lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
  888. lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
  889. lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
  890. lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
  891. lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
  892. lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
  893. lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
  894. m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
  895. m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
  896. m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
  897. m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
  898. m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
  899. po/Makefile.in.in:
  900. Upgrade to latest version from external source. The file "bootstrap"
  901. now grabs these automatically, so we needn't keep track of them
  902. in this change long any longer.
  903. * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
  904. (SUBDIRS): Remove intl.
  905. * PORTS: Update for star, Macintosh.
  906. * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
  907. Bison 1.875, gettext 0.12.1.
  908. * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
  909. * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
  910. (AC_CONFIG_AUX_DIR): New.
  911. (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
  912. like coreutils.
  913. (AC_PREREQ): Bump from 2.52 to 2.57.
  914. (AC_GNU_SOURCE): New.
  915. (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
  916. we no longer support K&R C.
  917. (YACC): Remove.
  918. (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
  919. sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
  920. (AC_MBSTATE_T): Remove.
  921. (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
  922. HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
  923. HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
  924. (AM_STDBOOL_H): Add.
  925. (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
  926. jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
  927. (AC_CHECK_TYPE): Remove ssize_t.
  928. (gt_TYPE_SSIZE_T): Add.
  929. (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
  930. jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
  931. AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
  932. AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
  933. jm_FUNC_MKTIME, jm_FUNC_REALLOC):
  934. Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
  935. (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
  936. (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
  937. (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
  938. napms, poll, select, strstr, usleep.
  939. (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
  940. rmdir, strcasecmp, strncasecmp, strtol, strtoul.
  941. (AM_GNU_GETTEXT): Use external and need-ngettext options.
  942. (AM_GNU_GETTEXT_VERSION): New.
  943. (AC_OUTPUT): Remove intl/Makefile.
  944. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  945. ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
  946. * doc/fdl.texi: Update to current GNU version.
  947. * doc/gettext.texi: Update to current coreutils version,
  948. plus a copyright notice.
  949. * doc/tar.texi: Switch to new method for doing copyright notices.
  950. Use @acronym instead of @sc where appropriate.
  951. Remove empty examples. Give a few more examples.
  952. * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  953. (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
  954. are built up in pieces with +=.
  955. (noinst_HEADERS, INCLUDES): Remove.
  956. (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
  957. (libtar_a_LIBADD): Use $ rather than @.
  958. (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
  959. * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
  960. bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
  961. ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
  962. intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
  963. isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
  964. memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
  965. pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
  966. safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
  967. stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
  968. strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
  969. unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
  970. Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
  971. prereq.m4, xstrtoimax.m4.
  972. * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
  973. be translated, since it's not a user-visible tool.
  974. * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  975. * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  976. (INCLUDES): Remove ../intl. Put top-srcdir before ., for
  977. consistency with coreutils.
  978. (LDADD): Link LIBINTL after libtar.a, since
  979. it's now external and should stand by itself.
  980. * src/buffer.c (print_total_written): Adjust to new human.h
  981. interface.
  982. (child_open_for_compress): Do not increase size to BLOCKSIZE.
  983. (open_archive): Open index file name.
  984. Strip trailing slahes from file names.
  985. (flush_write): Set size to 0 if not saving names.
  986. (flush_write, flush_read): Use safer_name_suffix rather than
  987. inline code.
  988. * src/common.h: Include <quote.h>.
  989. (absolute_names_option, atime_preserve_option, backup_option,
  990. block_number_option, checkpoint_option, dereference_option,
  991. force_local_option, ignore_failed_read_option, ignore_zeros_option,
  992. incremental_option, interactive_option, multi_volume_option,
  993. numeric_owner_option, one_file_system_option, recursive_unlink_option,
  994. read_full_records_option, remove_files_option, same_order_option,
  995. show_omitted_dirs_option, sparse_option, starting_file_option,
  996. to_stdout_option, totals_option, touch_option, verify_option,
  997. dev_null_output, now_verifying, we_are_root): Now bool, not int.
  998. (current_trailing_slash, index_file_name, recent_long_name_blocks,
  999. recent_long_link_blocks): New vars.
  1000. (NO_OVERWRITE_DIR_OLD_FILES): New constant.
  1001. (OVERWRITE_OLD_DIRS): Remove.
  1002. (enum remove_option): New enum.
  1003. (remove_any_file): Use it as option arg, not int.
  1004. (is_avoided_name, contains_dot_dot): Return bool, not int.
  1005. (safer_name_suffix): New decl.
  1006. * src/compare.c (now_verifying): Now bool, not int.
  1007. (fill_in_sparse_array): Move to extract.c. Now returns bool;
  1008. all callers changed to test for failure.
  1009. (diff_sparse_files): Take size from current_stat, not from param.
  1010. (diff_archive): Do not count trailing slashes in archives.
  1011. (verify_volume): Test for header failure after loop, not before.
  1012. * src/create.c (relativize): Remove; replaced by safer_name_suffix.
  1013. All callers changed.
  1014. (start_header): Clear devmajor and devminor fields, too.
  1015. (finish_header): New arg block_ordinal.
  1016. (init_sparsearray): Now extern. Set sp_array_size to
  1017. SPARSES_IN_OLDGNU_HEADER if it is zero.
  1018. (dump_file): Keep link table as a hash.
  1019. Do not count "file changed as we read it" as a failure.
  1020. * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
  1021. Move extern decl to common.h.
  1022. * src/extract.c (we_are_root): Now bool, not int.
  1023. (check_time): Warn about implausibly old time stamps.
  1024. (set_stat): Use utimbuf, not stat_info.
  1025. (prepare_to_extract): New arg DIRECTORY.
  1026. (fill_in_sparse_array): Moved here from compare.c.
  1027. (extract_sparse_file): Now returns off_t, giving size left.
  1028. Truncate file at end.
  1029. (extract_archive): Use safer_name_suffix rather than rolling our own.
  1030. Use fill_in_sparse_array rather than rolling our own.
  1031. Strip trailing slashes more effectively.
  1032. Check for unsafe names.
  1033. * src/incremen.c (struct directory): nfs and found are now of type
  1034. bool, not int.
  1035. (gnu_restore): Now takes directory name as argument, not offset
  1036. of directory name in a global. All uses changed.
  1037. (CURRENT_FILE_NAME): Remove.
  1038. New tests.
  1039. * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
  1040. files.
  1041. 2002-09-30 Paul Eggert <[email protected]>
  1042. * src/rmt.c (prepare_input_buffer): Renamed form
  1043. prepare_record_buffer. All uses changed. Do not assume that
  1044. size_t is the same width as int.
  1045. 2002-03-29 Paul Eggert <[email protected]>
  1046. * src/incremen.c (get_directory_contents):
  1047. If ignore_failed_read_option, only warn about
  1048. get_directory_contents failures. Fix suggested by
  1049. Mark Costlow.
  1050. 2002-01-31 Mark W. Eichin <[email protected]>
  1051. * src/buffer.c (child_open_for_compress): Don't try to read
  1052. past the end of the buffer.
  1053. 2001-10-11 Jim Meyering <[email protected]>
  1054. * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
  1055. and quote_n (1, ... to avoid clobbering a buffer.
  1056. 2001-09-26 Paul Eggert <[email protected]>
  1057. * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
  1058. * src/buffer.c (flush_read): Don't diagnose partial blocks before
  1059. end of file; just ignore them silently.
  1060. * src/list.c (read_header): Don't keep around extended name
  1061. and link info indefinitely; keep it only for the next file.
  1062. This fixes a bug introduced in 1.13.24, and removes the need
  1063. for some static variables. Set recent_long_name and
  1064. recent_long_link to zero if there were no long links; this
  1065. avoids a violation of ANSI C rules for pointers in delete.c.
  1066. * THANKS: Add Christian Laubscher.
  1067. 2001-09-26 Jim Meyering <[email protected]>
  1068. * doc/tar.texi (Remote Tape Server): is know -> is known
  1069. 2001-09-25 Paul Eggert <[email protected]>
  1070. * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
  1071. <iconv.h> may define EILSEQ (e.g. libiconv). Define a
  1072. replacement EILSEQ to be ENOENT, not EINVAL, since callers may
  1073. want to distinguish EINVAL and EILSEQ.
  1074. 2001-09-24 Christophe Kalt <[email protected]>
  1075. * src/extract.c (maybe_recoverable):
  1076. Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
  1077. 2001-09-22 Paul Eggert <[email protected]>
  1078. * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
  1079. * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
  1080. with GPL.
  1081. * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
  1082. * PORTS: Add copyright notice, 'star' reference.
  1083. * README-alpha: Add copyright notice, autoconf 2.52 patch.
  1084. * THANKS: Add Christophe Kalt.
  1085. * config.sub: Upgrade to 2001-09-14 version.
  1086. * configure.ac (ALL_LINGUAS): Add ko.
  1087. * po/ko.po: Resurrected file.
  1088. * doc/convtexi.pl: Add coding advice for Emacs.
  1089. * doc/getdate.texi: Add copyright notice.
  1090. * doc/mdate-sh: Upgrade to automake 1.5 version.
  1091. * doc/tar.texi (extracting files): Mention --to-stdout.
  1092. (Option Summary, Dealing with Old Files): New option --overwrite-dir.
  1093. (Overwrite Old Files): Likewise.
  1094. * lib/Makefile.am (noinst_HEADERS):
  1095. Remove copysym.h. Add print-copyr.h, unicodeio.h.
  1096. (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
  1097. * lib/copysym.c, lib/copysym.h: Remove.
  1098. * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
  1099. lib/unicodeio.h: New files.
  1100. * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
  1101. lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
  1102. * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
  1103. (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
  1104. * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
  1105. * m4/isc-posix.m4: Remove.
  1106. * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
  1107. * po/POTFILES.in: Add copyright notice.
  1108. * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
  1109. well as after.
  1110. * tests/Makefile.am (LDADD): Likewise.
  1111. * src/buffer.c (write_archive_buffer, close_archive):
  1112. If an archive is a socket, treat it like a FIFO.
  1113. (records_read, records_written): New vars.
  1114. (write_archive_to_stdout): Now bool, not int.
  1115. (open_archive, flush_write, flush_read): Keep records_read and
  1116. records_written up to date.
  1117. * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
  1118. (write_archive_to_stdout): Now bool, not int.
  1119. (enum read_header): New value HEADER_SUCCESS_EXTENDED.
  1120. (read_header): Now takes bool arg. Existing callers modified
  1121. to pass 0, unless otherwise specified.
  1122. * src/delete.c (records_read): Remove; now a global.
  1123. (acting_as_filter): Now bool, not int.
  1124. (recent_long_name, recent_long_link, recent_long_name_blocks,
  1125. recent_long_link_blocks, records_read, records_written): New decls.
  1126. (records_skipped): New var.
  1127. (move_archive): Don't divide by zero if arg is 0.
  1128. Use the above vars to compute how far to move.
  1129. (write_recent_blocks): New function.
  1130. (delete_archive_member): Pass 1 to read_header, so that it doesn't
  1131. read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
  1132. Keep track of how many records have been skipped.
  1133. Let the buffer code count records.
  1134. When copying a header, copy any extended headers that came before it.
  1135. * src/extract.c (extract_archive): When marking a directory to be
  1136. updated after symlinks, stat all directories after it in the
  1137. delayed-set-stat list too, since they will be checked after
  1138. symlinks. Add support for --overwrite-dir.
  1139. * src/list.c (recent_long_name, recent_long_link,
  1140. recent_long_name_blocks, recent_long_link_blocks): New vars.
  1141. (read_and): Pass 0 to read_header.
  1142. (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
  1143. headers into new vars. Null-terminate incoming symbolic links.
  1144. * src/rmt.c: Include print-copyr.h, not copysym.h.
  1145. (main): Use print_copyright, not copyright_symbol.
  1146. * src/tar.c (decode_options): Likewise.
  1147. (OVERWRITE_DIR_OPTION): New constant.
  1148. (long_options, usage, decode_options): Add --overwrite-dir.
  1149. * src/tar.h: Put copyright notice into documentation.
  1150. * tests/Makefile.am (TESTS): Add delete03.sh.
  1151. * tests/delete03.sh: New file.
  1152. * tests/genfile.c: Include print-copyr.h, not copysym.h.
  1153. (main): Use print_copyright, not copyright_symbol.
  1154. Include <argmatch.h>.
  1155. (pattern_strings): Remove.
  1156. (pattern_args, pattern_types): New constants.
  1157. (main): Use XARGMATCH, not argmatch.
  1158. 2001-09-20 Jim Meyering <[email protected]>
  1159. * lib/xstrtol.c (strtoimax): Guard declaration with
  1160. `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
  1161. The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
  1162. have their own, conflicting declaration of strtoimax in sys/inttypes.h.
  1163. (strtoumax): Likewise, for completeness (it wasn't necessary).
  1164. * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
  1165. Check for declaration of strtoimax.
  1166. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
  1167. Check for declaration of strtoumax.
  1168. 2001-09-16 Paul Eggert <[email protected]>
  1169. * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
  1170. 2001-09-14 Paul Eggert <[email protected]>
  1171. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
  1172. * README-alpha: Describe automake patch.
  1173. * configure.ac (LIBOBJS):
  1174. Remove automake 1.4 workaround, as we're using 1.5 now.
  1175. (USE_INCLUDED_LIBINTL): New AC_DEFINE.
  1176. * lib/copysym.c: Include stddef.h, for size_t.
  1177. Include langinfo.h if needed.
  1178. Use locale_charset only if USE_INCLUDED_LIBINTL;
  1179. if not, use nl_langinfo (CODESET) if available.
  1180. 2001-09-13 Paul Eggert <[email protected]>
  1181. * config.guess, config.sub: Sync with canonical versions.
  1182. * configure.ac (jm_PREREQ_XGETCWD): Add.
  1183. * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
  1184. (libtar_a_SOURCES): Add copysym.c.
  1185. * copysym.c, copysym.h: New files.
  1186. * lib/error.c: Sync with fileutils version.
  1187. * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
  1188. * m4/getcwd.m4: New file.
  1189. * m4/uintmax_t.m4: Remove.
  1190. * m4/gettext.m4 (AM_WITH_NLS):
  1191. Fix bug with calculating version of Bison 1.29.
  1192. Reported by Karl Berry.
  1193. * src/Makefile.am (datadir): Remove.
  1194. * src/rmt.c: Include copysym.h.
  1195. (main): Use copyright_symbol to translate copyright notice,
  1196. instead of gettext.
  1197. * src/tar.c: Likewise.
  1198. * tests/genfile.c: Likewise.
  1199. * src/system.h (MB_LEN_MAX): New symbol.
  1200. 2001-09-11 Paul Eggert <[email protected]>
  1201. * src/extract.c (struct delayed_set_stat): New member
  1202. 'after_symlinks'.
  1203. (delay_set_stat): Initialize it to 0.
  1204. (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
  1205. taking an extra stat ourselves. All callers changed.
  1206. (set_stat): Likewise.
  1207. (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
  1208. If false, stop when encountering a struct whose 'after_symlinks'
  1209. member is true. Otherwise, go through all structures but check
  1210. them more carefully. All callers changed.
  1211. (extract_archive): When extracting a deferred symlink, if its parent
  1212. directory's status needs fixing, then mark the directory as needing
  1213. to be fixed after symlinks.
  1214. (extract_finish): Fix status of ordinary directories, then apply
  1215. delayed symlinks, then fix the status of directories that are
  1216. ancestors of delayed symlinks.
  1217. * src/rtapelib.c (rexec):
  1218. Remove declaration; it ran afoul of prototypes on Crays.
  1219. Reported by Wendy Palm of Cray.
  1220. 2001-09-06 Paul Eggert <[email protected]>
  1221. * lib/strtoimax.c (HAVE_LONG_LONG):
  1222. Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
  1223. (strtoimax): Use sizeof (long), not
  1224. sizeof strtol (ptr, endptr, base),
  1225. to work around bug in IBM C compiler.
  1226. 2001-09-04 Paul Eggert <[email protected]>
  1227. * lib/xgetcwd.c: Include "xalloc.h".
  1228. (xgetcwd): Do not return NULL when memory is exhausted; instead,
  1229. report an error and exit.
  1230. * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
  1231. (jm_PREREQ): Use it.
  1232. 2001-09-03 Paul Eggert <[email protected]>
  1233. * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
  1234. (jm_PREREQ_XGETCWD): New macro.
  1235. * lib/exclude.c (fnmatch_no_wildcards):
  1236. Fix typo that caused us to do case-folding
  1237. search even when that was not desired. This occurred only in the
  1238. no-wildcard case.
  1239. * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
  1240. Do not include xalloc.h.
  1241. (INITIAL_BUFFER_SIZE): New symbol.
  1242. Do not use xmalloc / xrealloc, since the caller is responsible for
  1243. handling errors. Preserve errno around `free' during failure.
  1244. Do not overrun buffer when using getwd.
  1245. * lib/xgetcwd.c (xgetcwd):
  1246. Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
  1247. to decide whether to use getcwd (NULL, 0).
  1248. 2001-09-02 Paul Eggert <[email protected]>
  1249. * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
  1250. 2001-09-01 Jim Meyering <[email protected]>
  1251. * exclude.c: Use `""', not `<>' to #include non-system header files.
  1252. (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
  1253. and strncasecmp as r-values. Unixware didn't have declarations.
  1254. 2001-08-31 Jim Meyering <[email protected]>
  1255. * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
  1256. Use an initial, malloc'd, buffer of length 128 rather than
  1257. a statically allocated one of length 1024.
  1258. 2001-08-30 Paul Eggert <[email protected]>
  1259. * lib/utime.c: Include full-write.h.
  1260. * lib/xstrtol.c (strtoimax): New decl.
  1261. 2001-08-29 Paul Eggert <[email protected]>
  1262. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
  1263. * src/create.c (dump_file): Relativize link names before dumping.
  1264. This fixes a bug reported by Jose Pedro Oliveira.
  1265. * src/create.c (dump_file): Use offsetof when computing sizes for
  1266. struct hack; this avoids wasted space in some cases.
  1267. * src/incremen.c (note_directory, find_directory): Likewise.
  1268. * src/names.c (name_gather, addname): Likewise.
  1269. * src/extract.c (extract_archive): Use strcpy, not memcpy,
  1270. for consistency with other code that does similar things.
  1271. * src/names.c (name_gather): Likewise.
  1272. * src/names.c (read_name_from_file, name_next, name_gather,
  1273. add_hierarchy_to_namelist): Avoid quadratic behavior when
  1274. reallocating buffers. Check for buffer size overflow.
  1275. (addname): Avoid unnecessary clearing of memory.
  1276. 2001-08-29 "Jan D." <[email protected]>
  1277. * src/extract.c (delay_set_stat): Fix off-by-one error in file
  1278. name size allocation that caused core dumps.
  1279. 2001-08-28 Paul Eggert <[email protected]>
  1280. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
  1281. * configure.ac (GNU_SOURCE): Define to 1, not /**/.
  1282. (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
  1283. (daddr_t): Remove; no longer used.
  1284. (jm_PREREQ_HUMAN): Add.
  1285. * acconfig.h: Remove; no longer needed.
  1286. * config.guess, config.sub:
  1287. New files, from automake 1.5. Gettext 0.10.39 needs them.
  1288. * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
  1289. * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
  1290. (SUBDIRS): Put intl before lib, as gettext requires.
  1291. * ABOUT-NLS: Upgrade to gettext 0.10.39.
  1292. * intl: Upgrade entire directory to gettext 0.10.39.
  1293. * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
  1294. New files, from gettext 0.10.39.
  1295. * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
  1296. Upgrade to gettext 0.10.39,
  1297. * po/Makefile.in.in: Likewise, except fix a typo in its copying
  1298. permissions.
  1299. * po/cat-id-tbl.c, po/stamp-cat-id:
  1300. Remove; no longer used by gettext 0.10.39.
  1301. * po/ChangeLog: New file.
  1302. * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
  1303. $(srcdir)/tar.texi: Likewise.
  1304. * doc/freemanuals.texi: New file.
  1305. * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
  1306. `fileds' -> `fields'
  1307. * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
  1308. * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
  1309. (noinst_HEADERS): Add quote.h.
  1310. (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
  1311. * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
  1312. * lib/full-write.c, lib/savedir.c: Comment fix.
  1313. * lib/pathmax.h: Remove.
  1314. * lib/quote.c, lib/quote.h: New files.
  1315. * lib/xgetcwd.c: Don't include pathmax.h.
  1316. Include stdlib.h and unistd.h if available.
  1317. Include xalloc.h.
  1318. (xmalloc, xstrdup, free): Remove decls.
  1319. (xgetcwd): Don't assume sizes fit in unsigned.
  1320. Check for overflow when computing sizes.
  1321. Simplify reallocation code.
  1322. * lib/xmalloc.c: Quote failure tests.
  1323. * lib/strtoumax.c, lib/xstrtoimax.c: New files.
  1324. * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
  1325. similar to strtol.c.
  1326. (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
  1327. (verify): New macro.
  1328. (strtoumax, uintmax_t, strtoull, strtol): Remove.
  1329. (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
  1330. (strtoimax): Renamed from strtoumax. All uses of unsigned values
  1331. changed to signed values. Check sizes at compile-time, not
  1332. run-time. Prefer strtol to strtoll if both work.
  1333. (main): Remove.
  1334. * lib/xstrtol.h (xstrtoimax): New decl.
  1335. * m4/Makefile.am (EXTRA_DIST):
  1336. Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
  1337. longlong.m4, xstrtoimax.m4.
  1338. * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
  1339. Remove; now done by autoconf.
  1340. (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
  1341. Use AC_CHECK_TYPE instead of merely looking for the header.
  1342. * m4/uintmax_t.m4: Use shorter comment.
  1343. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
  1344. Quote first arg of AC_DEFUN.
  1345. Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
  1346. is needed to parse the include file.
  1347. Simplify logic behind the args to AC_REPLACE.
  1348. * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
  1349. * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
  1350. * src/rmt.c (main):
  1351. Use "Copyright %d" to simplify the translator's job in the future.
  1352. Advise translator about circle-C.
  1353. * src/tar.c: (decode_options): Likewise.
  1354. * tests/genfile.c (main): Likewise.
  1355. 2001-08-28 Jim Meyering <[email protected]>
  1356. * lib/argmatch.c: Include "quote.h".
  1357. (argmatch_invalid): Quote the context.
  1358. * lib/dirname.c (dir_name): Fix typo on PC platforms.
  1359. * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
  1360. Use single-quote for local .h files.
  1361. * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
  1362. * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
  1363. glibc versions.
  1364. * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
  1365. invoking mktime the last time.
  1366. * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
  1367. * lib/rename.c: Major rewrite by Volker Borchert to use system
  1368. rename function, but to work around problems with trailing
  1369. slashes.
  1370. * lib/strtoll.c: New file, from glibc.
  1371. * lib/strtoul.c: Update from glibc.
  1372. * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
  1373. Add support for signed numbers, too.
  1374. (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
  1375. is not defined.
  1376. (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
  1377. not defined.
  1378. (strtoumax, uintmax_t, strtoull, strtoul): New macros.
  1379. (main): Use generic names in debugging output.
  1380. * lib/strtoimax.c: Plus add the following changes of my own:
  1381. (main): Use accurate names in debugging output.
  1382. * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
  1383. Don't use PATH_MAX.
  1384. * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
  1385. m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
  1386. m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
  1387. m4/utime.m4, m4/utimes.m4:
  1388. Quote the first argument in each use of AC_DEFUN.
  1389. * m4/getline.m4: Don't use string.h.
  1390. * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
  1391. * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
  1392. 2001-08-27 Paul Eggert <[email protected]>
  1393. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
  1394. The biggest change is the new --exclude semantics and options.
  1395. The basic idea was suggested by Gerhard Poul; thanks!
  1396. * NEWS: Describe new --exclude semantics and options, and bug fixes.
  1397. * README: ignfail.sh fails on some NFS hosts.
  1398. * NEWS, README, lib/xstrtol.h: Add copyright notice.
  1399. * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
  1400. (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
  1401. Remove; the automake bug has been fixed.
  1402. * acinclude.m4: Remove.
  1403. * configure.ac: Renamed from configure.in.
  1404. (AC_PREREQ): Bump from 2.13 to 2.52.
  1405. (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
  1406. 1997-05-30) has an encoding error.
  1407. (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
  1408. (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
  1409. * doc/fdl.texi: Update to current GNU version.
  1410. * doc/tar.texi: Put leading '*' in direntry.
  1411. Accommodate new gfdl sectioning.
  1412. New option --recursion (the default) that is the inverse of
  1413. --no-recursion.
  1414. New options --anchored, --ignore-case, --wildcards,
  1415. --wildcards-match-slash, and their negations (e.g., --no-anchored).
  1416. Along with --recursion and --no-recursion, these control how exclude
  1417. patterns are interpreted. The default interpretation of exclude
  1418. patterns is now --no-anchored --no-ignore-case --recursion
  1419. --wildcards --wildcards-match-slash.
  1420. * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
  1421. * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
  1422. (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
  1423. (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
  1424. Include if available.
  1425. (<xalloc.h>): Include
  1426. (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
  1427. (verify): New macro. Use it to verify that EXCLUDE macros do not
  1428. collide with FNM macros.
  1429. (struct patopts): New struct.
  1430. (struct exclude): Use it, as exclude patterns now come with options.
  1431. (new_exclude): Support above changes.
  1432. (new_exclude, add_exclude_file):
  1433. Initial size must now be a power of two to simplify overflow checking.
  1434. (free_exclude, fnmatch_no_wildcards): New function.
  1435. (excluded_filename): No longer requires options arg, as the options
  1436. are determined by add_exclude. Now returns bool, not int.
  1437. (excluded_filename, add_exclude):
  1438. Add support for the fancy new exclusion options.
  1439. (add_exclude, add_exclude_file): Now takes int options arg.
  1440. Check for arithmetic overflow when computing sizes.
  1441. (add_exclude_file): xrealloc might modify errno, so don't
  1442. realloc until after errno might be used.
  1443. * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
  1444. New macros.
  1445. (free_exclude): New decl.
  1446. (add_exclude, add_exclude_file): Now takes int options arg.
  1447. (excluded_filename): No longer requires options arg, as the options
  1448. are determined by add_exclude. Now returns bool, not int.
  1449. * lib/prepargs.c: Include <string.h>; required for C99 since
  1450. we use strlen.
  1451. * lib/quotearg.c:
  1452. BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
  1453. * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
  1454. diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
  1455. * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
  1456. Remove inttypes_h.m4, largefile.m4, mktime.m4.
  1457. * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
  1458. subsumed by Autoconf 2.50.
  1459. * m4/error.m4: Upgrade to serial 2.
  1460. * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
  1461. remove test for GNU C library. It's not correct, as some
  1462. older glibcs are buggy.
  1463. * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
  1464. * m4/prereq.m4: Upgrade to serial 20, but then:
  1465. (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
  1466. (jm_PREREQ_EXCLUDE): New macro.
  1467. (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
  1468. by autoconf 2.5x.
  1469. * m4/realloc.m4: Upgrade to serial 4.
  1470. * m4/strerror_r.m4: Revert to serial 1002.
  1471. * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
  1472. * m4/utimes.m4: Upgrade to latest version (still "serial 3").
  1473. * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
  1474. (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
  1475. it is now subsumed by autoconf. Add inttypes.h.
  1476. * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
  1477. po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
  1478. * src/buffer.c (new_volume): Stop if the script exits with an error.
  1479. * src/common.h (excluded_with_slash, excluded_without_slash):
  1480. Remove, replacing by:
  1481. (excluded): New decl.
  1482. (link_error): New decl.
  1483. (excluded_name): Now returns bool.
  1484. * src/extract.c:
  1485. (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
  1486. Support hard links to symbolic links.
  1487. (struct delayed_symlink): Remove 'names' member, replacing it with
  1488. 'sources' and 'target' member. All uses changed.
  1489. (struct string_list): New type.
  1490. (delayed_set_stat, extract_archive): Use offsetof when computing sizes
  1491. for struct hack; this avoids wasted space in some cases.
  1492. (extract_archive): Fix test for absolute pathnames and/or "..".
  1493. Use link_error to report errors for links.
  1494. Remove redundant trailing '/' at "really_dir", for all uses, not
  1495. just before invoking mkdir.
  1496. If overwriting old files, do not worry so much about existing
  1497. directories.
  1498. Fix mode computation in the case where the directory exists.
  1499. (apply_delayed_symlinks): If we can't make a hard link to a symbolic
  1500. link, make a copy of the symbolic link.
  1501. * src/incremen.c (get_directory_contents):
  1502. If ignore_failed_read_option, only warn about
  1503. stat failures.
  1504. * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
  1505. However, check for error even for '-' or '+' case.
  1506. (print_header): Try parsing uids and gids as unsigned integers first,
  1507. and as a uid_t or gid_t only if that fails. This adds support for
  1508. listing positive uids and gids that are greater than UID_MAX and
  1509. GID_MAX.
  1510. * src/misc.c (link_error): New function.
  1511. * src/names.c (collect_and_sort_names):
  1512. If ignore_failed_read_option, only warn about
  1513. stat errors.
  1514. (excluded_name): Now returns bool. Simplify, as the fancy
  1515. features are now all in excluded_filename.
  1516. * src/rtapelib.c (base_name): Remove decl, as system.h now
  1517. declares it.
  1518. * src/system.h: Include stddef.h if available.
  1519. (offsetof): Declare if stddef.h doesn't.
  1520. Include <dirname.h>.
  1521. (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
  1522. * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
  1523. NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
  1524. NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
  1525. WILDCARDS_MATCH_SLASH_OPTION):
  1526. New enum values.
  1527. (long_options, usage, decode_options): Add support for --anchored,
  1528. --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
  1529. --no-wildcards-match-slash, --recursion, --wildcards,
  1530. --wildcards-match-slash.
  1531. (decode_options): Implement the new way of interpreting exclude
  1532. patterns.
  1533. (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
  1534. (OPTION_STRING, decode_options): Add -I, -y. Currently these options
  1535. just print error messages suggesting alternatives.
  1536. (add_filtered_exclude): Remove.
  1537. * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
  1538. * tests/extrac04.sh (out): Remove
  1539. directory/subdirectory/file1, as the new semantics for
  1540. --exclude exclude it.
  1541. * tests/genfile.c (main): Don't use non-ASCII char in msgid.
  1542. 2001-08-12 Paul Eggert <[email protected]>
  1543. * lib/addext.c (<errno.h>): Include.
  1544. (errno): Declare if not defined.
  1545. (addext): Work correctly on the Hurd, where pathconf returns -1 and
  1546. leaves errno alone, because there is no limit. Also, work even if
  1547. size_t is narrower than long.
  1548. 2001-07-08 Paul Eggert <[email protected]>
  1549. * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
  1550. 2001-05-10 Paul Eggert <[email protected]>
  1551. * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
  1552. Include <backupfile.h> and <dirname.h> after size_t is defined.
  1553. (addext): Use base_len to trim redundant trailing slashes instead of
  1554. doing it ourselves.
  1555. * lib/backupfile.c (ISSLASH, base_name):
  1556. Remove decls; now in dirname.h.
  1557. Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
  1558. is defined.
  1559. (find_backup_file_name): Rename locals to avoid new functions.
  1560. Use base_len instead of rolling it ourselves.
  1561. Work even if dirlen is 0.
  1562. Use a dir of '.' if given the empty string.
  1563. * lib/basename.c:
  1564. Do not include <stdio.h>, <assert.h>; no longer needed.
  1565. (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
  1566. Include <string.h>, <dirname.h>.
  1567. (base_name): Allow file names ending in slashes, other than names
  1568. that are all slashes. In this case, return the basename followed
  1569. by the slashes.
  1570. * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
  1571. (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
  1572. (dir_len): Renamed from dirlen.
  1573. All callers changed.
  1574. * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
  1575. New macros.
  1576. (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
  1577. 2001-02-16 Paul Eggert <[email protected]>
  1578. * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
  1579. Do not declare or define if HAVE_MBRTOWC,
  1580. since the test for HAVE_MBRTOWC now requires proper declarations.
  1581. * lib/alloca.c (malloc): Undef before defining.
  1582. 2001-02-13 Paul Eggert <[email protected]>
  1583. * src/compare.c (read_and_process): Use off_t for size.
  1584. From Maciej W. Rozycki.
  1585. 2001-01-26 Paul Eggert <[email protected]>
  1586. * lib/quotearg.c: Include stddef.h. From Jim Meyering.
  1587. 2001-01-12 Paul Eggert <[email protected]>
  1588. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
  1589. * lib/savedir.h (savedir): Remove size arg.
  1590. * doc/tar.texi: Add @setchapternewpage odd.
  1591. Remove -I as an alias for -T, for now.
  1592. Add @dircategory.
  1593. Update copyright. Remove "Published by".
  1594. Dates beginning with / or . are taken to be file names.
  1595. * src/tar.c (<time.h>): Do not include;
  1596. (time): Do not declare.
  1597. (usage): Remove -I as an alias for -T.
  1598. (OPTION_STRING): Remove -I.
  1599. (decode_options): Dates that look like an absolute path name,
  1600. or that start with '.', are presumed to be file names whose
  1601. dates are taken.
  1602. Remove 'I' as an aliase for 'T'.
  1603. Update copyright.
  1604. * src/extract.c (<time.h>): Do not include; system.h now does this.
  1605. (make_directories): Skip filesystem prefixes.
  1606. Don't assume '/' is the only separator.
  1607. (extract_sparse_file): Use new full_write semantics.
  1608. On write error, return instead of invoking skip_file.
  1609. Do not free sparsearray; caller does this now.
  1610. (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
  1611. separator.
  1612. (extract_archive): Don't assume file name lengths fit in int.
  1613. Report what got stripped from member name; it might be more than '/'.
  1614. Use new full_write semantics.
  1615. Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
  1616. mkdir to ignore it.
  1617. Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
  1618. * src/buffer.c (<time.h>): Do not include; system.h now does this.
  1619. (time): Remove decl; likewise.
  1620. (child_open_for_uncompress): Use new full_write semantics.
  1621. (flush_write): Use ISSLASH instead of testing for '/'.
  1622. (flush_read): Likewise.
  1623. * src/rmt.h (_remdev): Look for / anywhere in Path.
  1624. * src/misc.c (contains_dot_dot): Skip filesystem prefix.
  1625. Don't assume '/' is the only separator.
  1626. (safer_rmdir): Don't assume '/' is the only separator.
  1627. * src/compare.c (diff_archive): Don't assume '/' is the only separator.
  1628. * lib/dirname.h (dirlen): New decl.
  1629. * src/incremen.c (get_directory_contents):
  1630. Remove path_size arg; all callers changed.
  1631. Don't assume '/' is the only directory separator.
  1632. (gnu_restore): Work even if file name length doesn't fit in int.
  1633. * lib/addext.c (ISSLASH): New macro.
  1634. (addext): Trim any redundant trailing slashes.
  1635. * src/names.c (name_next):
  1636. Don't assume '/' is the only directory separator.
  1637. (namelist_match): Likewise.
  1638. (add_hierarchy_to_namelist): Remove dirsize arg.
  1639. Do not assume '/' is the only directory separator.
  1640. (new_name): Likewise.
  1641. * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
  1642. (libtar_a_SOURCES): Add dirname.c.
  1643. * src/create.c (relativize):
  1644. New function, with much of old start_header's guts.
  1645. Handle filesystem prefixes.
  1646. (start_header): Use this new function.
  1647. (init_sparsearray): Don't bother to zero out the new array;
  1648. it's not needed.
  1649. (deal_with_sparse): Fix array allocation bug.
  1650. (create_archive): Don't assume '/' is the only separator.
  1651. (dump_file): Likewise.
  1652. Don't worry about leading / in symlink targets.
  1653. * lib/savedir.c (savedir):
  1654. Remove size arg; it wasn't portable. All callers changed.
  1655. * lib/utime.c (utime_null): Adjust to new full_write convention.
  1656. * configure.in (YACC): Avoid portability problem with Ultrix sh.
  1657. * lib/backupfile.c: Include <dirname.h>.
  1658. (ISSLASH): New macro.
  1659. (find_backup_file_name): Use dirlen to calculate directory lengths.
  1660. (max_backup_version): Strip redundant trailing slashes.
  1661. * src/common.h: Include <full-write.h>.
  1662. (get_directory_contents): No longer has size arg.
  1663. (gnu_restore): Arg is size_t, not int.
  1664. * src/system.h: Include <time.h>.
  1665. (time): Declare if not defined.
  1666. * lib/full-write.c: Include full-write.h, not safe-read.h.
  1667. full_write returns size_t, with short writes meaning failure.
  1668. All callers changed.
  1669. * src/rtapelib.c: Include full-write.h.
  1670. * src/rmt.c: Include full-write.h.
  1671. (main): Update copyright.
  1672. * doc/getdate.texi: Mention that only English is supported.
  1673. Show how to use "date" so that the output is acceptable to getdate.
  1674. Mention Z as an abbreviation for UTC.
  1675. * lib/full-write.h: New file.
  1676. * src/list.c: system.h now does time.h stuff.
  1677. * lib/dirname.c:
  1678. Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
  1679. stdlib.h.
  1680. Do not include string.h, strings.h, or assert.h; no longer needed.
  1681. (strrchr, memrchr, malloc): Remove decls; no longer needed.
  1682. Include <xalloc.h>.
  1683. (base_name): New decl.
  1684. (BACKSLASH_IS_PATH_SEPARATOR): Remove.
  1685. (dir_name_r): Remove.
  1686. (dirlen): New function.
  1687. (dir_name): Use dirlen instead of dir_name_r.
  1688. (<string.h>, <strings.h>): Include only if test program.
  1689. (main): Use "return 0", not "exit (0)".
  1690. 2000-12-08 Paul Eggert <[email protected]>
  1691. * lib/dirname.h: New file.
  1692. 2000-11-02 Vesselin Atanasov <[email protected]>
  1693. * lib/fnmatch.c: Do not comment out all the code if we are using
  1694. the GNU C library, because in some cases we are replacing buggy
  1695. code in the GNU C library itself.
  1696. 2000-10-30 Paul Eggert <[email protected]>
  1697. * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
  1698. 2000-10-29 Paul Eggert <[email protected]>
  1699. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
  1700. * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
  1701. 2000-10-28 Paul Eggert <[email protected]>
  1702. * doc/tar.texi: --no-recursion now applies to extraction, too.
  1703. * src/create.c (dump_file): no_recurse_option -> ! recursion_option
  1704. * src/names.c (namelist_match, excluded_name):
  1705. Do not match subfiles of a directory
  1706. if --no-recursion is specified.
  1707. * src/tar.c (NO_RECURSE_OPTION): Remove.
  1708. (long_options): Have getopt set the --no-recursion flag.
  1709. (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
  1710. Remove case for NO_RECURSE_OPTION.
  1711. * src/common.h (recursion_option):
  1712. Renamed from no_recurse_option, with sense
  1713. negated, and with FNM_LEADING_DIR being the nonzero value.
  1714. * names.c (namelist_match): New function.
  1715. (name_match, name_scan): Use it to eliminate duplicate code.
  1716. (names_notfound): Remove special case for Amiga.
  1717. 2000-10-27 Paul Eggert <[email protected]>
  1718. * src/misc.c (read_error_details, read_warn_details,
  1719. read_fatal_details): Don't assume size_t is unsigned long.
  1720. * src/buffer.c (flush_read): If read_full_records_option, try to
  1721. fill the input buffer, as --delete -f - needs this.
  1722. 2000-10-24 Paul Eggert <[email protected]>
  1723. * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
  1724. * src/buffer.c (check_label_pattern):
  1725. Make sure header name is a string before
  1726. passing it to fnmatch.
  1727. (init_volume_number): Check for global_volno overflow.
  1728. (new_volume): Check for global_volno overflow.
  1729. * src/tar.c (decode_options):
  1730. Check that volume label is not too long to overflow
  1731. name in tar header block.
  1732. * Makefile.am (EXTRA_DIST): Remove rebox.el.
  1733. * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
  1734. (AC_FUNC_STRERROR_R): Use this instead.
  1735. 2000-10-23 Paul Eggert <[email protected]>
  1736. * src/extract.c: Include <time.h>, since we invoke "time".
  1737. * lib/prepargs.c (prepend_default_options):
  1738. Don't use NULL, for portability.
  1739. * m4/fnmatch.m4: Add "working" to message.
  1740. * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
  1741. Include <hash.h>.
  1742. (getpwuid, getgrgid): Declare only if system headers don't.
  1743. (gid_to_gname): Don't invoke setgrent.
  1744. (namelist): Now static, not global.
  1745. (nametail): New var. All uses of namelast changed to use
  1746. nametail, with one extra level of indirection.
  1747. (name_gather): Use memcpy instead of strncpy + assignment of NUL.
  1748. (name_match): Set nametail too, when setting namelist to null.
  1749. (add_hierarchy_to_namelist): Change type of dir arg from char * to
  1750. struct name *, so that we don't have to look up the name again
  1751. here. Get change_dir from dir rather than as a separate arg. Add
  1752. dirsize arg, and pass it along to get_directory_contents. Remove
  1753. unnecessary check of directory type.
  1754. (new_name): Do not append a slash if PATH already ends in one.
  1755. (avoided_names, struct avoided_name): Remove.
  1756. (avoided_name_table): New var, replacing avoided_names.
  1757. (hash_avoided_name, compare_avoided_names): New function.
  1758. (add_avoided_name, is_avoided_name): Use hash table rather than
  1759. linked list.
  1760. * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
  1761. (child_open_for_compress, child_open_for_uncompress,
  1762. close_archive): Propagate any failure of the compression process
  1763. back to "tar".
  1764. (open_archive, flush_write, flush_read, close_archive): Do not
  1765. allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
  1766. -1. Instead, allocate an array with the size that's needed.
  1767. (open_archive): Don't bother checking S_ISCHR of /dev/null.
  1768. (backspace_output): Don't try to backspace past start of archive.
  1769. (close_archive): Remove special case for DELETE_SUBCOMMAND.
  1770. * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
  1771. DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
  1772. HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
  1773. HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
  1774. PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
  1775. WITH_DMALLOC, WITH_REGEX):
  1776. Remove; now generated automatically.
  1777. * configure.in (_GNU_SOURCE): Define to empty, not 1, for
  1778. compatibility for glibc fragments.
  1779. (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
  1780. HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
  1781. DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
  1782. that we needn't put an entry into acconfig.h.
  1783. (ALL_LINGUAS): Add da.
  1784. (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
  1785. (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
  1786. (for strtol.c).
  1787. (AC_MBSTATE_T): Add.
  1788. (RMT): Append $(EXEEXT).
  1789. (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
  1790. (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
  1791. HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
  1792. HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
  1793. (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
  1794. (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
  1795. (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
  1796. Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
  1797. (EMUL_OPEN3): Remove; no longer needed.
  1798. (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
  1799. * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
  1800. * src/common.h: Do not include basename.h.
  1801. * src/rtapelib.c (base_name): Do not include basename.h;
  1802. declare base_name instead.
  1803. * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
  1804. Remove these files.
  1805. * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
  1806. lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
  1807. * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
  1808. Adjust to the above changes.
  1809. * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
  1810. * src/open3.c: Remove.
  1811. * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
  1812. (tar_SOURCES): Remove open3.c.
  1813. (INCLUDES): Remove -I.., as automake does that.
  1814. (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
  1815. The following changes are to put LOCALEDIR into localedir.h instead
  1816. of passing it on the command line.
  1817. (DEFS): Remove.
  1818. (DISTCLEANFILES): New macro.
  1819. (localedir.h): New rule.
  1820. (rmt.o tar.o): Now depend on localedir.h.
  1821. * tests/delete02.sh, tests/extrac04.sh: New files.
  1822. * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
  1823. (TESTS): Add extrac04.sh, and restore delete02.sh.
  1824. (DEFS): Remove; LOCALEDIR is now done via localedir.h.
  1825. (INCLUDES): Remove -I.. as automake does this now.
  1826. * src/rtapelib.c (rexec): Don't declare unless using it.
  1827. (do_command): Simplify signal-handling code slightly.
  1828. * src/delete.c (blocks_needed): Remove. All uses changed to use
  1829. blocking_factor - new_blocks.
  1830. (acting_as_filter): New var.
  1831. (write_record, delete_archive_members): Use acting_as_filter
  1832. rather than archive == STDIN_FILENO to detect whether we're acting
  1833. as a filter, as open can return STDIN_FILENO in some cases.
  1834. (delete_archive_members): Ignore zero blocks if
  1835. ignore_zeros_option is nonzero. Fix bug that messed up last
  1836. output block: write_eot can't be used here, as it gets confused
  1837. when the input is at end of file.
  1838. * src/compare.c (diff_archive): Do not impose an arbitrary limit on
  1839. symbolic link contents length. Pass directory size to
  1840. get_directory_contents.
  1841. * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
  1842. m4/strerror_r.m4: New files.
  1843. * m4/signedchar.m4: Remove this file.
  1844. * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
  1845. * m4/Makefile.am (EXTRA_DIST): Likewise.
  1846. * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
  1847. * po/da.po: New translation file.
  1848. * src/mangle.c (extract_mangle):
  1849. Fix diagnostic with wrong number of %s'es.
  1850. * lib/fnmatch.c (fnmatch):
  1851. Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
  1852. e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
  1853. * lib/full-write.c (full_write): Some buggy drivers return 0 when you
  1854. fall off a device's end. Detect this.
  1855. * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
  1856. uses changed.
  1857. (open): Remove macro; we no longer support EMUL_OPEN3. Do not
  1858. include <pathmax.h> and directory include files like <dirent.h>;
  1859. no longer used. Include <savedir.h> instead.
  1860. (closedir, signed_char): remove macro; no longer used.
  1861. (bool, false, true): Include <stdbool.h> if you have the include
  1862. file, otherwise define.
  1863. * src/misc.c:
  1864. (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
  1865. opendir_warn, readdir_error): Remove; no longer needed.
  1866. (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
  1867. before deciding whether we're trying to remove ".".
  1868. (remove_any_file): Try unlink first if we are not root. Use
  1869. savedir when recursively removing directories, to avoid exhausting
  1870. file descriptors.
  1871. (savedir_error, savedir_warn, symlink_error): New functions.
  1872. * src/list.c: (read_and): Do not invoke
  1873. apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
  1874. responsible for that. Do not invoke apply_delayed_set_stat; our
  1875. caller is now responsible for that.
  1876. (read_header): Use signed char instead of signed_char. Prevent
  1877. later references to current_header from mistakenly treating it as
  1878. an old GNU header.
  1879. (from_header): Quote invalid base-64 strings in diagnostics.
  1880. (time_from_header): Do not warn about future timestamps in
  1881. archive; check_time now does that.
  1882. (print_header): Quote unknown file types.
  1883. (skip_member): New function, replacing skip_extended_headers and
  1884. now skipping the whole member instead of just the extended
  1885. headers. All callers changed. This makes the code handle
  1886. extended headers uniformly, and fixes some bugs.
  1887. * src/update.c (update_archive): Use skip_member.
  1888. * src/extract.c (we_are_root): Now global.
  1889. (struct delayed_symlink): New type.
  1890. (delayed_symlink_head): New var.
  1891. (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
  1892. not apply_delayed_set_stat.
  1893. (set_mode, set_stat): Pointer args are now const pointers.
  1894. (check_time): New function.
  1895. (set_stat): Warn if setting a file's timestamp to be the future.
  1896. (make_directories): Do not save and restore errno.
  1897. (maybe_recoverable): Set errno to ENOENT if we cannot make missing
  1898. intermediate directories.
  1899. (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
  1900. not in caller. Extract potentially dangerous symbolic links more
  1901. carefully, deferring their creation until the end, and using a
  1902. regular file placeholder in the meantime. Do not remove trailing
  1903. / and /. from file names. Do not bother checking for ".." when
  1904. checking whether a directory loops back on itself, as loopbacks
  1905. can occur with symlinks too. Also, in that case, do not bother
  1906. saving and restoring errno; just set it to EEXIST.
  1907. (apply_nonancestor_delayed_set_stat): A prefix is a potential
  1908. ancestor if it ends in slash too (as well as ending in a char just
  1909. before slash).
  1910. (apply_delayed_set_stat): Remove.
  1911. (apply_delayed_symlinks, extract_finish): New functions.
  1912. * doc/fdl.texi: New file.
  1913. * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
  1914. ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
  1915. * doc/tar.texi: Add Free Documentation License. New section
  1916. "Overwrite Old Files", and revamp that section to make it easier to
  1917. follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
  1918. documentation into getdate.texi. Fix several minor typos. Describe
  1919. TAR_OPTIONS. Describe incompatibility between incremental backups and
  1920. --atime-preserve. Describe incompatibility between --verify and other
  1921. options. Mention that tar normally removes symbolic links rather than
  1922. following them, when extracting a file of the same name.
  1923. * THANKS: Add gpoul. Change skip's address.
  1924. * po/POTFILES.in: Add lib/human.c.
  1925. * src/common.h (namelist, namelast): Remove decls.
  1926. (we_are_root, extract_finish, skip_member, savedir_error,
  1927. savedir_warn, symlink_error, gnu_list_name): New decls.
  1928. (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
  1929. skip_extended_headers, is_dot_or_dotdot, closedir_error,
  1930. closedir_warn, opendir_error, opendir_warn, readdir_error,
  1931. readdir_warn): Remove decls.
  1932. (get_directory_contents): New off_t arg.
  1933. (addname): Now returns struct name *.
  1934. * src/tar.h, tests/genfile.c: Fix comments.
  1935. * src/create.c: Include hash.h.
  1936. (gnu_list_name): Remove decl.
  1937. (struct link): Remove "next" member.
  1938. (linklist): Remove.
  1939. (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
  1940. consistency with other diagnostics.
  1941. (deal_with_sparse): Check for I/O error when closing the file.
  1942. (create_archive): Do not allocate an array of size PATH_MAX, as
  1943. PATH_MAX might be (size_t) -1. Instead, allocate an array with
  1944. the size that's needed.
  1945. (hash_link, compare_links): New functions.
  1946. (dump_file): Do not exhaust open file descriptors when descending
  1947. deeply into a directory, by using savedir rather than
  1948. opendir/readdir. Do not zero-fill the name buffer unnecessarily.
  1949. Hash the set of links already created, instead of using a linked
  1950. list. Fix some bugs in outputting sparse files which caused the
  1951. sparse tables to be incorrect. When a file unexpectedly shrinks,
  1952. output zeros rather than garbage. Do not allocate an array of
  1953. size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
  1954. allocate an array with the size that's needed.
  1955. * src/incremen.c: Include hash.h.
  1956. (struct directory): Remove "next", "dir_text". Change "name" to
  1957. be char[1] with struct hack, not const char *. Add "found".
  1958. (directory_list): Remove. Replaced by directory_table.
  1959. (directory_table): New var.
  1960. (nfs_string): Renamed from nfs.
  1961. (hash_directory, compare_directories): New functions.
  1962. (note_directory): Now returns struct directory *. First arg is
  1963. now const pointer. struct stat arg is now dev_t, ino_t, nfs.
  1964. Remove text arg. New "found" arg, basically corresponding to the
  1965. old text arg not being null. All callers changed.
  1966. (note_directory, find_directory): Use hash table rather than
  1967. linked list.
  1968. (get_directory_contents): New arg "device". Use savedir to do the
  1969. hard work. Save the nfs-ness of stat_data, since it might change
  1970. under us. Use note_directory instead of find_directory to save
  1971. some work. When adding an "A" record, do it with
  1972. add_to_accumulator instead of cheating with strcat.
  1973. (read_directory_file): Use "+" flag before device to indicate
  1974. whether it was NFS. Fix typo in checking for strtoul error.
  1975. (write_directory_file_entry): New function.
  1976. (write_directory_file): Use it, and use the hash routines to
  1977. traverse the directory table.
  1978. (gnu_restore): Use savedir rather than opendir/readdir.
  1979. * src/tar.c: Include localedir.h, prepargs.h.
  1980. (long_options): Now static.
  1981. (long_options, usage, decode_options): -j is now short for
  1982. --bzip2, and -I is now an alias for -T.
  1983. (decode_options, main): argv is not const pointer now.
  1984. (decode_options): Invoke prepend_default_options to support
  1985. TAR_OPTIONS. In diagnostic, mention the string that was the
  1986. invalid blocking factor, tape length, group, owner, or record
  1987. size. --delete is no longer incompatible with -f -, undoing
  1988. 2000-01-07 change.
  1989. (main): Invoke extract_finish at end of extraction.
  1990. * src/rmt.c: Include localedir.h.
  1991. (main): Update copyright date to 2000.
  1992. * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
  1993. following changes: Use @sc where appropriate. Document the ranges of
  1994. supported times more precisely. Add Eggert to getdate authors.
  1995. Document old Latin 12m/12pm tradition. Remove list of alphabetic time
  1996. zone names, as it wasn't correct and people shouldn't be relying on it
  1997. anyway. Relative items also account for non-DST adjustments. Fix
  1998. some misspellings.
  1999. * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
  2000. * tests/ignfail.sh: opendir -> savedir in diagnostics.
  2001. * tests/preset.in: Set LANGUAGE to the empty string, for some
  2002. brain damaged host.
  2003. 2000-10-20 Paul Eggert <[email protected]>
  2004. * m4/fnmatch.m4: Mention the GNU C library.
  2005. 2000-10-19 Paul Eggert <[email protected]>
  2006. * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
  2007. glibc 2.1.95.
  2008. 2000-10-17 Paul Eggert <[email protected]>
  2009. * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
  2010. (CHAR_BIT): Remove.
  2011. * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
  2012. (CHAR_BIT): Define if not defined.
  2013. 2000-09-09 Paul Eggert <[email protected]>
  2014. * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
  2015. 2000-08-07 Paul Eggert <[email protected]>
  2016. * lib/xmalloc.c: Memory exhausted -> memory exhausted
  2017. * lib/xalloc.h (xalloc_msg_memory_exhausted):
  2018. change to array from char *.
  2019. 2000-08-06 Paul Eggert <[email protected]>
  2020. * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
  2021. compatibility with glibc 2.1.3 strftime.c.
  2022. 2000-07-31 Paul Eggert <[email protected]>
  2023. * lib/quotearg.c (quotearg_n_options):
  2024. Don't make the initial slot vector a constant,
  2025. since it might get modified.
  2026. * lib/quotearg.c: Add support for more than one preallocated slot.
  2027. 2000-07-30 Paul Eggert <[email protected]>
  2028. * lib/quotearg.c (quotearg_n_options):
  2029. Preallocate a slot 0 buffer, so that the caller
  2030. can always quote one small component of a "memory exhausted" message
  2031. in slot 0.
  2032. 2000-07-23 Paul Eggert <[email protected]>
  2033. * lib/quotearg.c:
  2034. Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
  2035. mbstate_t is always defined.
  2036. Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
  2037. some GCC installations, and this configuration error is likely to be
  2038. common.
  2039. 2000-07-22 Paul Eggert <[email protected]>
  2040. * lib/quotearg.c:
  2041. When the system forces us to redefine mbstate_t, shadow its mbsinit
  2042. function. From Bruno Haible.
  2043. 2000-07-14 Paul Eggert <[email protected]>
  2044. * lib/xmalloc.c: Simplify exhausted message.
  2045. * lib/quotearg.h: Update copyright date; from Jim Meyering.
  2046. 2000-07-13 Paul Eggert <[email protected]>
  2047. * lib/quotearg.h (enum quoting style):
  2048. New constant clocale_quoting_style.
  2049. * lib/quotearg.c:
  2050. (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
  2051. Add support for clocale_quoting_style, undoing previous change to
  2052. locale_quoting_style.
  2053. 2000-07-10 Paul Eggert <[email protected]>
  2054. * lib/quotearg.c:
  2055. <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
  2056. since otherwise we don't need it.
  2057. (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
  2058. since we don't do multibytes in that case.
  2059. (quotearg_buffer_restyled): If a unibyte locale, don't bother to
  2060. invoke multibyte primitives.
  2061. * m4/mbstate_t.m4 (AC_MBSTATE_T):
  2062. Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
  2063. Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
  2064. and mbstate_t, to a single-part test that simply defines mbstate_t.
  2065. * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
  2066. Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
  2067. to decide whether to define the BeOS workaround macro;
  2068. this adjusts to the change to AC_MBSTATE_T.
  2069. * m4/strerror_r.m4: New file.
  2070. 2000-07-05 Paul Eggert <[email protected]>
  2071. * lib/quotearg.c: Use double-quote to quote.
  2072. * lib/quotearg.c (N_): New macro.
  2073. (gettext_default): New function.
  2074. (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
  2075. "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
  2076. for right quote.
  2077. * lib/quotearg.c (struct quoting_options):
  2078. Simplify quote_these_too dimension.
  2079. From Bruno Haible <[email protected]>.
  2080. * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
  2081. Test for mbstate_t only if the test
  2082. for an object-type mbstate_t fails.
  2083. * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
  2084. 2000-07-03 Paul Eggert <[email protected]>
  2085. * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
  2086. Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
  2087. * lib/quotearg.c (mbrtowc):
  2088. Assign to *pwc, and return 1 only if result is nonzero.
  2089. (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
  2090. 2000-07-02 Paul Eggert <[email protected]>
  2091. * lib/quotearg.c (mbstate_t):
  2092. Do not define; it should be defined with AC_CHECK_TYPE.
  2093. 2000-06-26 Paul Eggert <[email protected]>
  2094. * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
  2095. a bug in glibc 2.1.3.
  2096. * lib/xmalloc.c: Fix inaccorate comment for xrealloc.
  2097. 2000-06-19 Paul Eggert <[email protected]>
  2098. * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
  2099. inclusion of wctype.h to work around solaris2.6 namespace pollution.
  2100. (ISPRINT): Likewise.
  2101. Reported by Tom Tromey.
  2102. 2000-06-15 Paul Eggert <[email protected]>
  2103. * lib/human.c (adjust_value): New function.
  2104. (human_readable_inexact): Apply rounding style even when printing
  2105. approximate values.
  2106. * lib/human.c: Avoid shadowing warnings.
  2107. From Jim Meyering.
  2108. 2000-06-14 Paul Eggert <[email protected]>
  2109. * lib/human.c (human_readable_inexact): Allow an input block size
  2110. that is not a multiple of the output block size, and vice versa.
  2111. * lib/getdate.y (get_date): Apply relative times after time zone
  2112. indicator, not before.
  2113. 2000-05-31 Paul Eggert <[email protected]>
  2114. * m4/largefile.m4: Rewrite so that we don't need to run getconf,
  2115. and thus don't need AC_CANONICAL_HOST.
  2116. (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
  2117. (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
  2118. (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
  2119. CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
  2120. changed. Instead of inspecting the output of getconf, try to
  2121. compile the test program without and with the macro definition.
  2122. (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
  2123. getconf. Instead, check for the needed flags by compiling test
  2124. programs.
  2125. * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
  2126. longer needs it.
  2127. * config.guess, config.sub: Remove these files, for similar reasons.
  2128. 2000-05-03 Paul Eggert <[email protected]>
  2129. * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
  2130. 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
  2131. bug. This avoids a clash when files like regex.c that define
  2132. _GNU_SOURCE.
  2133. 2000-05-02 Paul Eggert <[email protected]>
  2134. * m4/largefile.m4 (AC_SYS_LARGEFILE):
  2135. Define _GNU_SOURCE if this is needed to make
  2136. ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
  2137. inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
  2138. * lib/quotearg.c (mbrtowc, mbstat_t):
  2139. Add definitions if !HAVE_MBSTATE_T_OBJECT.
  2140. (<wctype.h>): Include if HAVE_WCTYPE_H.
  2141. (iswprint): Define to 1 if we lack it
  2142. 2000-04-18 Paul Eggert <[email protected]>
  2143. * m4/mbstate_t.m4: New file.
  2144. 2000-04-17 Bruno Haible <[email protected]>
  2145. * tests/ignfail.sh: Test for uid 0 along with user "root".
  2146. 2000-04-05 Paul Eggert <[email protected]>
  2147. * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
  2148. Don't use -n32 on IRIX if the installer said
  2149. otherwise.
  2150. 2000-02-28 Paul Eggert <[email protected]>
  2151. * lib/quotearg.c (ALERT_CHAR): New macro.
  2152. (quotearg_buffer_restyled): Use it.
  2153. 2000-02-23 Rainer Orth <[email protected]>
  2154. * src/list.c (tartime): Fix off-by-one error when copying year if
  2155. OLD_CTIME.
  2156. 2000-02-18 Paul Eggert <[email protected]>
  2157. * lib/getdate.y: Handle two-digit years with leading zeros correctly.
  2158. (textint): New typedef.
  2159. (parser_control): Changed from struct parser_control to typedef
  2160. (for consistency). Member year changed from int to textint. All
  2161. uses changed.
  2162. (YYSTYPE): Removed; replaced by %union with int and textint
  2163. members.
  2164. (tID): Removed; not used.
  2165. (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
  2166. tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
  2167. tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
  2168. (tSNUMBER, tUNUMBER): Now of type <textintval>.
  2169. (date, number, to_year): Use width of number in digits, not its
  2170. value, to determine whether it's a 2-digit year, or a 2-digit
  2171. time.
  2172. (yylex): Store number of digits of numeric tokens. Return '?' for
  2173. unknown identifiers, rather than (unused) tID.
  2174. 2000-01-16 Paul Eggert <[email protected]>
  2175. * lib/quotearg.c (quotearg_buffer_restyled):
  2176. Do not quote alert, backslash, formfeed,
  2177. and vertical tab unnecessarily in shell quoting style.
  2178. 2000-01-15 Paul Eggert <[email protected]>
  2179. * m4/c-bs-a.m4:
  2180. Change quoting to be compatible with future autoconf versions.
  2181. 2000-01-11 Paul Eggert <[email protected]>
  2182. * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
  2183. 2000-01-07 Paul Eggert <[email protected]>
  2184. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
  2185. Fix bug with fnmatch.h dependency, as follows:
  2186. * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
  2187. * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
  2188. * src/common.h (apply_nonancestor_delayed_set_stat):
  2189. Renamed from apply_delayed_set_stat.
  2190. (apply_delayed_set_stat, decode_mode, chmod_error_details,
  2191. chown_error_details, close_warn, closedir_warn, mkdir_error,
  2192. read_error_details, read_fatal_details, read_warn_details,
  2193. seek_error_details, seek_warn_details, utime_error,
  2194. write_error_details, write_fatal_details): New decls.
  2195. Make diagnostic messages more regular.
  2196. * src/create.c (dump_file): Quote file names with colons if possible.
  2197. * src/compare.c (diff_archive): Likewise.
  2198. * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
  2199. * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
  2200. * src/mangle.c (extract_mangle): Likewise.
  2201. * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
  2202. Likewise.
  2203. * src/buffer.c (archive_write_error, flush_archive, close_archive,
  2204. new_volume, xclose):
  2205. Use error message functions to report errors consistently.
  2206. * src/compare.c (diff_sparse_files, diff_archive): Likewise.
  2207. * src/create.c (finish_sparse_file, dump_file): Likewise.
  2208. * src/extract.c (set_mode, set_stat, extract_sparse_file,
  2209. extract_archive): Likewise.
  2210. * src/list.c (list_archive): Likewise.
  2211. * src/update.c (append_file): Likewise.
  2212. * src/compare.c (diff_init, diff_sparse_files):
  2213. Use xalloc_die to report memory exhaustion.
  2214. * src/incremen.c (gnu_restore): Likewise.
  2215. * src/list.c (read_header): Likewise.
  2216. * src/mangle.c (extract_mangle): Likewise.
  2217. * src/misc.c (maybe_backup_file): Likewise.
  2218. * src/tar.c (decode_options): Likewise.
  2219. * src/compare.c (read_and_process, fill_in_sparse_array,
  2220. diff_sparse_files):
  2221. Use consistent terminology for unexpected-EOF message.
  2222. * src/extract.c (extract_sparse_file, extract_archive): Likewise.
  2223. * src/list.c (list_archive, read_header, skip_file,
  2224. skip_extended_headers): Likewise.
  2225. * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
  2226. (xdup2): Regularize messages with rest of tar.
  2227. * src/buffer.c (flush_read): Don't read past EOF.
  2228. * src/extract.c (extr_init):
  2229. If we run out of memory, invoke apply_delayed_set_stat.
  2230. (prepare_to_extract): Don't complain if we can't remove ".".
  2231. (apply_delayed_set_stat): New function.
  2232. (apply_nonancestor_delayed_set_stat):
  2233. Renamed from apply_delayed_set_stat. All uses changed.
  2234. Don't remove head if it doesn't apply.
  2235. * src/create.c (find_new_file_size):
  2236. Return size instead of storing through pointer.
  2237. All callers changed.
  2238. (deal_with_sparse): Don't keep reading after read errors.
  2239. (finish_sparse_file): Just abort if there is an internal error.
  2240. (dump_file): Fix typo: stat_warn and stat_error were interchanged.
  2241. Don't restore access times on directories during incremental dumps
  2242. until after dealing with the directory.
  2243. If ignoring failed reads, count closedir, read, and unknown
  2244. file errors as warnings, not errors.
  2245. Fix buffer overrun problem when dumping sparse files.
  2246. * src/list.c (read_and):
  2247. Invoke apply_nonancestor_delayed_set_stat on file names
  2248. after handling them.
  2249. (decode_mode): Remove; moved to misc.c.
  2250. * src/misc.c (safer_rmdir): New function.
  2251. (remove_any_file): Use it to avoid problems with rmdir(".").
  2252. (maybe_backup_file): Regularize diagnostics.
  2253. (undo_backup_file): Likewise.
  2254. (decode_mode): Moved here from list.c.
  2255. (chmod_error_details, chown_error_details, close_fatal,
  2256. close_warn, closedir_warn, mkdir_error, read_error_details,
  2257. read_warn_details, read_fatal_details, seek_error_details,
  2258. seek_warn_details, utime_error, write_error_details,
  2259. write_fatal_details): New functions.
  2260. * src/delete.c (save_record): Remove static variable (now local).
  2261. (move_archive): Don't position before start of archive.
  2262. (write_record): Abort if count is zero at inopportune time.
  2263. Plug memory leak.
  2264. * src/tar.c (decode_options): --delete and -f - are now
  2265. incompatible, since we didn't have time to fix their bugs.
  2266. * tests/Makefile.am (TESTS): Remove delete02.sh.
  2267. * tests/ignfail.sh: Adjust to new quoting scheme again.
  2268. 2000-01-06 Paul Eggert <[email protected]>
  2269. * lib/getdate.y: Sync tm_diff with the GNU C Library.
  2270. (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
  2271. (tm_diff): Renamed from difftm. All uses changed.
  2272. Replace body with that taken from GNU C Library 2.1.3pre1.
  2273. (get_date): Prefer tm_gmtoff to tm_diff if available.
  2274. 1999-12-29 "Melissa O'Neill" <[email protected]>
  2275. * tests/incremen.sh: Invoke stat on newly created file so that its
  2276. ctime is updated on Nextstep.
  2277. 1999-12-21 Machael Stone <[email protected]>
  2278. * lib/getdate.y (get_date):
  2279. Fix typo when checking for time_t overflow in time zone calculations.
  2280. 1999-12-13 Paul Eggert <[email protected]>
  2281. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
  2282. * README-alpha: New file.
  2283. * README: New sections for gzip and bzip2, Solaris.
  2284. Remove mention of BACKLOG.
  2285. * configure.in (AC_C_BACKSLASH_A): Add.
  2286. (AC_CHECK_HEADERS): Add wchar.h.
  2287. (AC_CHECK_FUNCS): Add mbrtowc.
  2288. (AC_FUNC_CLOSEDIR_VOID): Add.
  2289. * tests/Makefile.am (TESTS): Add delete02.sh.
  2290. (POSTPONED_TESTS): Remove.
  2291. (EXTRA_DIST): Remove $(POSTPONED_TESTS).
  2292. * tests/preset.in:
  2293. Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
  2294. * tests/ignfail.sh (err): Adjust to new quoting scheme.
  2295. * tests/delete02.sh: Fix typo: need to list archive2, not archive.
  2296. * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
  2297. * src/tar.c ("quotearg.h"): New include.
  2298. (usage): Now has __attribute__ ((noreturn)).
  2299. (confirm): Report errno if we can't open tty.
  2300. (confirm, decode_options):
  2301. Quote arbitrary strings in diagnostics.
  2302. (OVERWRITE_OPTION): New constant.
  2303. (long_options, usage, decode_options): New --overwrite option.
  2304. (decode_options): --keep-old-files, --overwrite, and --unlink-first
  2305. are now mutually exclusive.
  2306. Don't assume that gettext preserves errno.
  2307. (main): Set default quoting style to escape_quoting_style.
  2308. * src/update.c (<quotearg.h>): New include.
  2309. (append_file):
  2310. Don't assume that gettext preserves errno.
  2311. Quote arbitrary strings in diagnostics.
  2312. Check for close error.
  2313. * src/names.c (<quotearg.h>): New include.
  2314. (name_init, name_next, name_close, names_notfound,
  2315. collect_and_sort_names): Don't assume that gettext preserves
  2316. errno. Quote arbitrary strings in diagnostics.
  2317. (excluded_name): Fix typo that caused empty patterns to be
  2318. mishandled.
  2319. * src/misc.c (<quotearg.h>): New include.
  2320. (quote_copy_string): Quote only newline and backslash; the output is no
  2321. longer meant for humans, and is locale-independent.
  2322. (contains_dot_dot): New function.
  2323. (remove_any_file): Don't use lstat; just rmdir the file and then use
  2324. unlink if the rmdir fails because the file isn't a directory.
  2325. Check for readdir and closedir errors.
  2326. (maybe_backup_file): Report "stat" for stat errors.
  2327. (maybe_backup_file, chdir_do):
  2328. Quote arbitrary strings in diagnostics.
  2329. (maybe_backup_file, undo_last_backup):
  2330. Don't assume that gettext preserves errno.
  2331. (call_arg_error, call_arg_fatal, call_arg_warn,
  2332. chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
  2333. mknod_error, open_error, open_fatal, open_warn, opendir_error,
  2334. opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
  2335. readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
  2336. stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
  2337. write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
  2338. * src/system.h (__attribute__): New macro.
  2339. (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
  2340. (S_ISDOOR): New macro.
  2341. (closedir): New macro, if CLOSEDIR_VOID.
  2342. * src/rmt.c, src/rtapelib.c (decode_oflag):
  2343. O_APPEND might not be defined.
  2344. * src/list.c: (read_and, list_archive):
  2345. Quote arbitrary strings in diagnostics.
  2346. (from_header): Use locale_quoting_style to quote diagnostics.
  2347. (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
  2348. * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
  2349. * src/Makefile.am: Use ## for copyright comments.
  2350. * src/extract.c (<quotearg.h>): New include.
  2351. (enum permstatus): New enum.
  2352. (struct delayed_set_stat): file_name is now at end of buffer, to avoid
  2353. two mallocs. New members file_name_len, invert_permissions, permstatus.
  2354. (extr_init): Remove hack that silently adjusted newdir_umask.
  2355. (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
  2356. Use these args to decide whether and how to set modes.
  2357. (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
  2358. Don't assume that gettext preserves errno.
  2359. (set_stat): Remove arg symlink_flag; subsumed by typeflag.
  2360. (delay_set_stat, repair_delayed_set_stat): New functions.
  2361. (make_directories): Avoid mkdir where last part of path is "..".
  2362. Create a struct delayed_set_stat for each directory made.
  2363. (prepare_to_extract): Renamed from unlink_destination, and
  2364. return 0 immediately if to_stdout_option; all callers changed.
  2365. (maybe_recoverable): New parameter interdir_made.
  2366. Add support for --overwrite.
  2367. (extract_sparse_file, extract_archive):
  2368. Quote arbitrary strings in diagnostics.
  2369. (extract_archive): By default, warn about ".." in member names, and skip them.
  2370. Don't open files with O_NONBLOCK or O_APPEND.
  2371. Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
  2372. overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
  2373. minus the current umask. Keep track of intermediate directories made,
  2374. to avoid looping when making x/../x when x doesn't exist; the
  2375. earlier code solved this in a different way that didn't fit well
  2376. into the new scheme. Don't extract permissions onto existing
  2377. directories unless --overwrite is given. Do not add -wx------
  2378. permissions to new directories permanently; just do it temporarily.
  2379. Remove no-longer-needed hack with MSDOS and directory time stamps.
  2380. (apply_delayed_set_stat): New argument specifies which directories to
  2381. fix statuses of. Do not wait until the end of extraction to fix
  2382. statuses; instead, fix a directory's status once we exit that directory.
  2383. This requires less memory and does the right thing in some cases
  2384. where the old method didn't.
  2385. (fatal_exit): New function.
  2386. * src/incremen.c (<quotearg.h>): New include.
  2387. (get_directory_contents, gnu_restore):
  2388. Check for readdir and closedir errors.
  2389. (get_directory_contents, read_directory_file, gnu_restore):
  2390. Quote arbitrary strings in diagnostics.
  2391. (get_directory_contents, read_directory_file, write_directory_file):
  2392. Don't assume that gettext preserves errno.
  2393. * src/create.c (<quotearg.h>): New include.
  2394. (start_header): Use `member names' to refer to archive member names, not
  2395. `archive names'. Warn about `..' in member names.
  2396. (finish_sparse_file, dump_file):
  2397. Quote arbitrary strings in diagnostics.
  2398. (finish_sparse_file, dump_file):
  2399. Don't assume that gettext preserves errno.
  2400. (dump_file): Don't use `access' to determine whether a directory is readable;
  2401. this isn't reliable if tar is setuid. Use `opendir' instead.
  2402. Check for readdir and closedir failures.
  2403. Don't dump sockets as if they were fifos; just warn and skip.
  2404. * src/delete.c (move_archive):
  2405. Don't report fatal error merely because sizes don't fit
  2406. into struct mtop values; fall back on lseek instead.
  2407. Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
  2408. Say `reposition' instead of `re-position'.
  2409. (delete_archive_members):
  2410. Set archive to STDOUT_FILENO before outputting trailing buffer.
  2411. * src/compare.c (<quotearg.h>): New include.
  2412. (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
  2413. and `Cannot' others.
  2414. (report_difference, diff_archive):
  2415. Quote arbitrary strings in diagnostics.
  2416. (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
  2417. Don't assume that gettext preserves errno.
  2418. (diff_archive): Don't open regular files with O_NONBLOCK.
  2419. Preserve access times of files if --atime.
  2420. * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
  2421. (FATAL_ERROR, USAGE): Don't return 0.
  2422. (enum old files): New enum.
  2423. (old_files_option): New variable, replacing keep_old_files_option and
  2424. unlink_first_option.
  2425. (apply_delayed_set_stat): Now takes char const * param.
  2426. (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
  2427. closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
  2428. open_fatal, open_warn, opendir_error, opendir_warn, read_error,
  2429. read_fatal, readdir_error, readdir_warn, readlink_error,
  2430. readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
  2431. truncate_error, truncate_warn, unlink_error, waitpid_error,
  2432. write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
  2433. * src/buffer.c:
  2434. (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
  2435. archive_write_error, archive_read_error, flush_archive, close_archive,
  2436. init_volume_number, new_volume):
  2437. Don't assume that gettext preserves errno.
  2438. (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
  2439. (open_archive): Reject multivolume verify attempts a bit earlier.
  2440. Rename local variable `access', in case it's defined by system header.
  2441. (open_archive, backspace_output): Use `Cannot' uniformly, instead of
  2442. `Could not' sometimes and `Cannot' others.
  2443. (open_archive, flush_read, flush_archive, close_archive, new_volume):
  2444. Quote arbitrary strings in diagnostics.
  2445. (read_error): Set archive to STDOUT_FILENO temporarily when writing
  2446. archive buffer.
  2447. (init_volume_number): Check for input and output errors in volno_file.
  2448. (new_volume): Use new fatal_exit function to exit, and new xfork
  2449. function to fork.
  2450. * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
  2451. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
  2452. * doc/tar.texi: Add --overwrite.
  2453. --absolute-names rejects ".." in names.
  2454. * lib/quotearg.c: Add support for multibyte characters.
  2455. (ISGRAPH): Remove.
  2456. (ISPRINT): New macro.
  2457. (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
  2458. (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
  2459. defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
  2460. (quotearg_buffer_restyled): New function, with most of the old
  2461. quotearg_buffer's contents.
  2462. Major rewrite to support multibyte characters.
  2463. (quotearg_buffer): Now just calls quotearg_buffer_restyled.
  2464. * m4/c-bs-a.m4: New file.
  2465. * lib/Makefile.am: Use ## for copyright notice.
  2466. * scripts/Makefile.am: Use ## on copyright notice.
  2467. * doc/Makefile.am:
  2468. ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
  2469. 1999-12-05 Paul Eggert <[email protected]>
  2470. * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
  2471. src/ChangeLog, tests/ChangeLog: Remove these files.
  2472. * ChangeLog.1: New file, incorporating the above files, plus old
  2473. ChangeLog entries.
  2474. * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
  2475. 1999-12-05 Dale Worley <[email protected]>
  2476. * src/compare.c (<utime.h>, struct utimbuf): Add.
  2477. (diff_archive): Restore access times if --atime.
  2478. * doc/tar.texi: Explain that --atime also preserves modification time.
  2479. 1999-12-04 Gerhard Poul <[email protected]>
  2480. * ABOUT-NLS: Update to latest version from ftp.gnu.org.
  2481. * BACKLOG, TODO: Remove.
  2482. * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
  2483. * README: Bring up to date.
  2484. 1999-12-03 Paul Eggert <[email protected]>
  2485. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
  2486. * src/compare.c (diff_archive):
  2487. Do not set errno to EPIPE; we no longer use perror.
  2488. * src/create.c (dump_file):
  2489. If a parent directory said that a file should be there but it is
  2490. absent, diagnose it as being removed in the meantime.
  2491. Do not pass meaningless errno to ERROR when reporting that the
  2492. file changed as we read it.
  2493. Report that a file changed if its ctime changes; this is more
  2494. sensitive than mtime+size, and more accurate.
  2495. * src/incremen.c (enum children): New type.
  2496. (struct directory): Change old char allnew member to new enum children
  2497. children member.
  2498. All uses changed.
  2499. (get_directory_contents): When doing an incremental dump that does
  2500. not cross filesystem boundaries, dump the mount points, even though
  2501. they are in a different filesystem. This is for convenience when
  2502. restoring, and for consistency with non-incremental dumps.
  2503. This requires a 3-way flag for keeping track of which children we want,
  2504. so we use enum children rather than boolean.
  2505. * src/open3.c (modes): Remove.
  2506. (open3): Remove unportable assumptions about flag encodings.
  2507. Use `stat' instead of `access' for testing file existence,
  2508. to avoid problems with setuid programs.
  2509. * src/names.c (name_next): If file names are given both in the
  2510. command line (e.g. via -C) and in a file (via -T), do not
  2511. ignore the command-line names.
  2512. * m4/uintmax_t.m4: Backport to autoconf 2.13.
  2513. * doc/tar.texi: Clarify getdate authorship.
  2514. 1999-11-23 Paul Eggert <[email protected]>
  2515. * lib/Makefile.am (DISTCLEANFILES): New macro.
  2516. * configure.in (tar_fnmatch_hin):
  2517. Remove; it runs afoul of a bug in autoconf 2.13.
  2518. Instead, always link fnmatch.h to some file, even if it's a throwaway.
  2519. 1999-11-19 Paul Eggert <[email protected]>
  2520. * m4/largefile.m4: Update serial.
  2521. 1999-11-18 Paul Eggert <[email protected]>
  2522. * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
  2523. the QNX shell, which doesn't propagate exit status of failed
  2524. commands inside shell assignments.
  2525. 1999-11-07 Paul Eggert <[email protected]>
  2526. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
  2527. * configure.in (AC_PREREQ): Bump to 2.13.
  2528. (ALL_LINGUAS): Add pt_BR, ja.
  2529. (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
  2530. (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
  2531. for AIX crossbuilds.
  2532. * doc/tar.texi: New node create options for --ignore-failed-read.
  2533. Remove unused version control symbols.
  2534. Modernize texinfo usage.
  2535. * src/tar.c (usage): Add examples.
  2536. * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
  2537. Include fnmatch.h when testing fnmatch.
  2538. * src/common.h (collect_and_sort_names): New decl.
  2539. * src/list.c (from_header):
  2540. Handle 32-bit two's complement negative time stamps
  2541. even if the leading octal digit is 2 or 3.
  2542. * src/extract.c (set_stat): Remove duplicate code.
  2543. * src/create.c (to_chars): Remove trailing newline from warning.
  2544. (dump_file): Ignore doors.
  2545. (finish_header): Report block numbers with origin 0, not origin 1.
  2546. * src/rmt.c: Include getopt.h.
  2547. (long_opts): New constant.
  2548. (usage): New function.
  2549. (main): Implement --help and --version.
  2550. Output usage message if arguments are bad.
  2551. 1999-10-10 Paul Eggert <[email protected]>
  2552. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
  2553. * README: Remove --with-dmalloc.
  2554. Add --disable-largefile.
  2555. Remove old NeXT dirent problems, or AIX valloc problems.
  2556. Remove old union wait advice, and old %lld advice.
  2557. Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
  2558. * doc/tar.texi: Clarify documentation for portable file names.
  2559. * configure.in (AM_WITH_DMALLOC): Remove.
  2560. (ALL_LINGUAS): Add ja.
  2561. * src/tar.c (decode_options):
  2562. Invalid dates are now treated as (time_t) -1.
  2563. Redo version message to conform to GNU standards.
  2564. * src/create.c (dump_file):
  2565. Fix typo: last two args to dump_file were interchanged.
  2566. * src/update.c (update_archive): Likewise.
  2567. * src/common.h (tartime): New decl.
  2568. * src/list.c (tartime): Now extern.
  2569. (read_and): Invalid headers cause errors, not warnings.
  2570. 1999-10-03 Paul Eggert <[email protected]>
  2571. * lib/getdate.y (__attribute__):
  2572. Don't use if GCC claims to be before 2.8; this is
  2573. needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
  2574. 1999-09-25 Paul Eggert <[email protected]>
  2575. * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
  2576. * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
  2577. * tests/incremen.sh: Add yet another sleep.
  2578. 1999-09-24 Paul Eggert <[email protected]>
  2579. * NEWS: A read error now causes a nonzero exit status.
  2580. * src/create.c (to_chars): Fix base-256 output.
  2581. * src/buffer.c (write_error):
  2582. Read error is an error, not just a warning.
  2583. 1999-09-24 Paul Eggert <[email protected]>
  2584. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
  2585. * src/tar.c (<time.h>): Include.
  2586. (time): Declare if not defined.
  2587. (confirm): Don't read past EOF.
  2588. (long_options, usage): Add --no-same-owner, --no-same-permissions.
  2589. (main): Use clock_gettime if available.
  2590. * tests/Makefile.am (TESTS): Add incremen.sh
  2591. (INCLUDES): Add -I../lib, for fnmatch.h.
  2592. * src/update.c (update_archive):
  2593. Remove call to name_expand; had no effect.
  2594. Use chdir_do to change into directory.
  2595. Use deref_stat instead of stat.
  2596. Use add_avoided_name to mark names to be avoided; the old method of
  2597. setting a bit with the name caused all descendants of that name to
  2598. be avoided, in some circumstances.
  2599. * tests/incremen.sh: Remove unnecessary sleeps.
  2600. * src/names.c (name_next): Go back to using plain chdir.
  2601. (name_gather): Use chdir_arg to keep track of arguments to chdir.
  2602. (addname): Likewise.
  2603. (name_match): Use chdir_do to act on chdir args.
  2604. (merge_sort): Moved here from incremen.c.
  2605. (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
  2606. Likewise.
  2607. (name_expand): Remove.
  2608. (name_from_list): Skip fake names.
  2609. Use chdir_do to act on chdir args.
  2610. (struct avoided_name): New struct.
  2611. (avoided_names): New var.
  2612. (add_avoided_name, is_avoided_name): New functions.
  2613. * src/system.h (stat, lstat): Define in terms of statx on
  2614. STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
  2615. (UCHAR_MAX): New macro.
  2616. (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
  2617. * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
  2618. * src/incremen.c (<time.h>): Remove include; no longer used.
  2619. (time): Remove decl.
  2620. (time_now): Remove.
  2621. (get_directory_contents): Use deref_stat.
  2622. Consider a subdirectory to be all new only if
  2623. listed_incremental_option or if it its timestamp is newer than the
  2624. cutoff.
  2625. (add_hierarchy_to_namelist, merge_sort): Move to names.c.
  2626. (read_directory_file): Now extern. Do not set time_now.
  2627. (write_directory_file): Renamed from write_dir_file.
  2628. Use start_time instead of time_now.
  2629. (compare_names, collect_and_sort_names): Move to names.c.
  2630. * src/mangle.c (<time.h>): Remove; not used.
  2631. (time): Do not declare.
  2632. * src/misc.c (chdir_from_initial_wd): Remove.
  2633. (deref_stat): New function.
  2634. (struct wd): New struct.
  2635. (wd, wds, wd_alloc): New variables.
  2636. (chdir_arg, chdir_do): New function.
  2637. * src/compare.c (get_stat_data): Use deref_stat.
  2638. * src/common.h (name_expand): Remove.
  2639. * src/list.c (time): Declare if not defined.
  2640. (base_64_digits): Moved here from create.c.
  2641. (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
  2642. -1.
  2643. (read_and): Don't get time from header unless we need it now;
  2644. as getting time can cause duplicate diagnostics if bogus.
  2645. Remove "Hmm, " from diagnostic.
  2646. Use "Skipping to next header" uniformly.
  2647. (from_header): Renamed from from_chars. All uses changed.
  2648. Allow different forms for unportable 2's complement numbers.
  2649. Don't check for extended forms when parsing checksums.
  2650. Parse base-256 output.
  2651. (gid_from_header): Renamed from gid_from_chars. All uses changed.
  2652. (major_from_header): Renamed from major_from_chars. All uses changed.
  2653. (minor_from_header): Renamed from minor_from_chars. All uses changed.
  2654. (mode_from_header): Renamed from mode_from_chars. All uses changed.
  2655. (off_from_header): Renamed from off_from_chars. All uses changed.
  2656. (size_from_header): Renamed from size_from_chars. All uses changed.
  2657. (time_from_header): Renamed from time_from_chars. All uses changed.
  2658. Warn about future timestamps.
  2659. (uid_from_header): Renamed from uid_from_chars. All uses changed.
  2660. (uintmax_from_header): Renamed from uintmax_from_chars.
  2661. All uses changed.
  2662. (tartime): New function, incorporating isotime.
  2663. (isotime): Delete.
  2664. (print_header): Use tartime.
  2665. * src/create.c (to_chars): Fix typo in decl.
  2666. Don't assign through char const *.
  2667. Rename name_expand back to collect_and_sort_names.
  2668. * src/extract.c (<time.h>): No need to include.
  2669. (time): No need to declare.
  2670. (now): Remove variable.
  2671. (extr_init): Don't initialize `now'.
  2672. Increment same_permissions_option and same_owner_option if we_are_root
  2673. is nonzero; this supports the new --no-same-owner option.
  2674. (set_stat): Use start_time instead of `now'.
  2675. * src/create.c (struct link): Remove unused linkcount member.
  2676. (base_64_digits): Move to list.c.
  2677. (base_8_digits): Remove.
  2678. (to_octal): New function, with some of old contents of to_base.
  2679. (to_base): Remove.
  2680. (to_base256): New function.
  2681. (to_chars): Use base 256, not base 64, for huge values.
  2682. (mode_to_chars): Don't use two's complement in GNU format or POSIX
  2683. format.
  2684. (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
  2685. it means we have an incremental dump where we don't know whether this
  2686. is a top-level call.
  2687. Use deref_stat instead of statx / stat / lstat.
  2688. Cast result of alloca.
  2689. Check for dates if 0 < top_level, not if listed_incremental_option.
  2690. Move multiple-link check after directory check.
  2691. Do not dump avoided names.
  2692. Dump hard links to symbolic names as links, not as separate
  2693. symbolic links.
  2694. start_header cannot return a null pointer, so don't test for it.
  2695. Likewise for find_next_block.
  2696. * src/buffer.c, src/common.h (<human.h>): Include.
  2697. (read_error): Read error is an error, not just a warning.
  2698. (print_total_written): Also print human-readable byte count, and
  2699. bytes/s.
  2700. (open_archive, flush_write): Use start_time, not current time.
  2701. (flush_read): Report about garbage bytes ignored at end of archive,
  2702. but act on non-garbage bytes (instead of ignoring them).
  2703. (new_volume): Use WARN for warnings.
  2704. * doc/Makefile.am:
  2705. ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
  2706. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
  2707. * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
  2708. * lib/Makefile.am (noinst_HEADERS):
  2709. Rename fnmatch.h to fnmatch.hin; add human.h.
  2710. (libtar_a_SOURCES): Add human.c, xstrtoul.c.
  2711. (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
  2712. * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
  2713. * lib/fnmatch.c (strchrnul):
  2714. Define to __strchrnul if _LIBC, to our own replacement otherwise.
  2715. Do not define if !_LIBC and if it already exists.
  2716. (internal_fnmatch): Use it.
  2717. * configure.in (tar_LDADD): New variable, used only when linking tar.
  2718. (rmt_LDADD): Similarly, for rmt.
  2719. (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
  2720. fnmatch.c; otherwise, use the system fnmatch.h.
  2721. * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
  2722. Modernize sample backup script.
  2723. * THANKS: Martin Goik's email address has changed.
  2724. * m4/fnmatch.m4: New file.
  2725. 1999-09-03 Paul Eggert <[email protected]>
  2726. * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
  2727. Use EINVAL instead.
  2728. 1999-08-29 Paul Eggert <[email protected]>
  2729. * lib/getdate.y (get_date):
  2730. Rename outermost local `probe' to `quarter'.
  2731. Rename latter local `tm' to probe_tm.
  2732. From: Jim Meyering <[email protected]>
  2733. Message-ID: <[email protected]>
  2734. 1999-08-28 Paul Eggert <[email protected]>
  2735. * lib/getdate.y (PC): New macro; use it when possible.
  2736. (number): Handle `Nov 11 1996' example correctly.
  2737. See Risks Digest 20.55 (1999-08-27)
  2738. http://catless.ncl.ac.uk/Risks/20.55.html#subj18
  2739. 1999-08-23 Paul Eggert <[email protected]>
  2740. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
  2741. Remove minor cases of lint from many source files: this includes
  2742. unnecessary casts, uses of NULL, etc.
  2743. * configure.in (AC_PROG_YACC): Remove.
  2744. (YACC): Always use bison.
  2745. (AC_STRUCT_TIMEZONE): Add.
  2746. (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
  2747. * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
  2748. Fix spelling.
  2749. * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
  2750. ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
  2751. * lib/strcasecmp.c, lib/strncasecmp.c: New files.
  2752. * src/common.h (merge_sort): Remove decl; no longer exported.
  2753. * src/system.h (voidstar): Remove.
  2754. (memcpy, memcmp): Cast args.
  2755. ("xalloc.h"): Add include.
  2756. (xmalloc, xrealloc): Remove decl.
  2757. * src/mangle.c (time): Do not declare if defined.
  2758. (first_mangle, mangled_num): Remove.
  2759. * src/list.c (from_chars): Report out-of-range values more precisely.
  2760. (off_from_chars): Do not allow negative offsets.
  2761. (uid_from_chars): Allow negative uids.
  2762. * src/create.c (linklist): Now static.
  2763. (to_chars): Fix wording of message to match from_chars.
  2764. * src/misc.c (merge_sort): Move to incremen.c.
  2765. * src/incremen.c (merge_sort): Move here from misc.c; now static.
  2766. It's too painful to make it both generic and portable.
  2767. (read_directory_file): "timestamp" -> "time stamp" in messages.
  2768. * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
  2769. (usage): Fix misspelling.
  2770. (OPTION_STRING): -y is now -I.
  2771. (decode_options): Use -1, not EOF, for getopt_long result.
  2772. Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
  2773. Handle operands after any "--" argument.
  2774. (main): Report any output errors.
  2775. * src/rmt.c (main): status is ssize_t, not long.
  2776. * src/names.c (name_gather): Handle trailing -C option correctly.
  2777. (addname): use memcpy, not strncpy, to copy a string of known length.
  2778. (name_match): Handle trailing -C option correctly.
  2779. Propagate -C option to following files.
  2780. (name_match, name_scan): Remove redundant matching code.
  2781. * src/buffer.c (open_archive): Use American spelling in diagnostic.
  2782. * lib/getdate.y: Major rewrite. Add copyright notice.
  2783. (<stdio.h>): Include only if testing.
  2784. (ISUPPER): Remove.
  2785. (ISLOWER): New macro.
  2786. (<string.h>): Include if HAVE_STRING_H, not USG.
  2787. (bcopy): Remove.
  2788. (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
  2789. bison.
  2790. (EPOCH_YEAR): Renamed from EPOCH.
  2791. (table): Renamed from TABLE.
  2792. (meridian): Now an anonymous enum.
  2793. (struct parser_control): New type.
  2794. (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
  2795. (yyInput, ..., yyRelYear): Migrated into struct parser_control.
  2796. (%pure_parser): Added, so that the parser is pure.
  2797. (%union): Removed; the type is now just plain int.
  2798. All %type directives removed.
  2799. (tLOCAL_ZONE): New %token.
  2800. (month_day_table): Renamed from MonthDayTable.
  2801. (gmtime, localtime, mktime, time): Declare only if not defined.
  2802. (meridian_table): New table.
  2803. (dst_table): New table.
  2804. (units_table): renamed from UnitsTable.
  2805. (relative_time_table): Renamed from OtherTable.
  2806. (time_zone_table): Renamed from TimezoneTable. Modernized.
  2807. (military_table): Renamed from MilitaryTable.
  2808. (to_hour): Renamed from ToHour.
  2809. (to_year): Renamed from ToYear.
  2810. (lookup_zone): New function.
  2811. (LookupWord): Renamed from lookup_word. Use lookup_zone for time
  2812. zones.
  2813. (yylex): Now reentrant. All callers changed.
  2814. (get_date): Add support for local time zone abbreviations.
  2815. Make it reentrant.
  2816. 1999-08-20 Paul Eggert <[email protected]>
  2817. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
  2818. * src/create.c (to_chars): Generate GNU base-64 representation
  2819. if we are generating an old or new GNU format tar file for a
  2820. number that can't be represented with the POSIX format.
  2821. * configure.in (AC_CHECK_FUNCS): Add fchdir.
  2822. (AM_FUNC_GETLINE): Add.
  2823. (LIBOBJS): Add getline.o to workaround comment.
  2824. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
  2825. * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
  2826. * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
  2827. (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
  2828. * lib/getline.c, lib/getline.h, lib/save-cwd.c,
  2829. lib/save-cwd.h, m4/getline.m4: New files.
  2830. * src/misc.c (<save-cwd.h>): Include.
  2831. (chdir_from_initial_wd): New function.
  2832. * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
  2833. (name_gather): Handle `-C x -C y' correctly.
  2834. Do not rely on addname to handle -C.
  2835. (addname): New CHANGE_DIR parameter. All callers changed.
  2836. Remove ugly calls to getcwd; no longer needed.
  2837. (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
  2838. * src/incremen.c (listed_incremental_stream): New var.
  2839. (read_directory_file): Remove arbitrary limits on file name length.
  2840. Do not attempt to get the working directory; we can bypass this
  2841. on fchdir hosts. Open the listed_incremental_option file for both
  2842. read and write instead of opening it twice. Check for I/O errors
  2843. when doing I/O to this file. Check for invalid data in the file,
  2844. and report line numbers of invalid data.
  2845. (write_dir_file): Likewise.
  2846. (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
  2847. Do not invoke write_dir_file; that's our caller's responsibility.
  2848. * src/list.c (max): New macro.
  2849. (isotime): Now takes time_t, not time_t *. Report the decimal values
  2850. of times that can't be broken down.
  2851. (print_header): Don't assume that major and minor device numbers can
  2852. fit into uintmax_t.
  2853. * src/common.h (struct name): change_dir is now char const *.
  2854. (write_directory_file): Remove unused decl.
  2855. (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
  2856. chars; the old `sizeof (b)' broke when b was a pointer not an array.
  2857. (chdir_from_initial_wd): New decl.
  2858. (addname): New 2nd arg.
  2859. * THANKS: Torsten Lull -> Catrin Urbanneck
  2860. 1999-08-18 Paul Eggert <[email protected]>
  2861. * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
  2862. Don't depend on ac_cv_func variables.
  2863. From Albert Chin-A-Young <[email protected]>.
  2864. 1999-08-18 Paul Eggert <[email protected]>
  2865. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
  2866. * m4/signedchar.m4: New file.
  2867. * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
  2868. * src/system.h (signed_char): New macro.
  2869. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
  2870. * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
  2871. * src/create.c (write_eot): Write at least two zero blocks.
  2872. * src/extract.c (extract_archive): Fix sparse array bug:
  2873. we did not find end of array correctly.
  2874. * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
  2875. Don't assume find_next_block yields nonnull.
  2876. * src/extract.c (extract_sparse_file, extract_archive): Likewise.
  2877. * src/list.c (skip_extended_headers): Likewise.
  2878. * src/list.c (read_and, list_archive): Simplify code.
  2879. (read_header): Fix computation of signed checksums on machines where
  2880. char is unsigned.
  2881. Do not consider a block to be zero unless all its bytes are zero,
  2882. even the checksum bytes. Do not attempt to parse the checksum of
  2883. a zero block. Fix memory leak with long names and links.
  2884. (from_chars): Accommodate a buggy tar that outputs leading NUL
  2885. if the previous field overflows.
  2886. * src/misc.c (quote_copy_string): Generate \177 for '\177', not
  2887. \?, for portability to non-ASCII hosts.
  2888. 1999-08-16 Paul Eggert <[email protected]>
  2889. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
  2890. * src/extract.c (make_directories): Do not chown intermediate
  2891. directories, even if we are root.
  2892. * src/list.c (read_header): Fix bugs when interpreting
  2893. POSIX-compliant headers that do not contain null bytes in the
  2894. header or link names.
  2895. 1999-08-14 Paul Eggert <[email protected]>
  2896. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
  2897. * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
  2898. (AC_HEADER_SYS_WAIT): Add.
  2899. (AC_REPLACE_FUNCS): Add waitpid.
  2900. (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
  2901. * lib/waitpid.c: New file.
  2902. * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
  2903. * src/system.h (WCOREDUMP): Remove; no longer used.
  2904. (WIFSTOPPED): Likewise.
  2905. (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
  2906. * src/buffer.c (child_open_for_compress): Undo previous change.
  2907. (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
  2908. (new_volume): Likewise.
  2909. * src/buffer.c, src/extract.c, src/incremen.c (time):
  2910. Don't declare if defined.
  2911. * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
  2912. * src/incremen.c (read_directory_file):
  2913. Invoke `time' the same way everyone else does.
  2914. Check validity of --listed-incremental file contents a bit better.
  2915. Do not worry about --after-date-option; tar.c now checks this.
  2916. * src/list.c (isotime): Report ??? if localtime returns null.
  2917. Don't assume years fit into four digits.
  2918. Don't append trailing newline.
  2919. (print_header): Report ??? if localtime returns null;
  2920. Don't assume years fit into four digits.
  2921. * src/compare.c (diff_archive): Do not fall back on absolute name
  2922. when --absolute-names is not specified.
  2923. * src/create.c (start_header):
  2924. Include text of ignored filesystem prefix in warning.
  2925. (create_archive): Check for excluded names when doing incremental
  2926. pass through directory.
  2927. (dump_file): Do not dump old files explicitly given on command line
  2928. when using --listed-incremental. Do not strip ./ prefix from names.
  2929. * src/tar.c: -g now implies after_date_option = 1.
  2930. -g and -N are now incompatible options.
  2931. * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
  2932. 1999-08-11 Jeff Dairiki <[email protected]>
  2933. * src/list.c (read_header): Don't parse OLDGNU_FORMAT
  2934. incremental headers as POSIX prefixes.
  2935. 1999-08-11 Paul Eggert <[email protected]>
  2936. * NEWS, configure.in: Version 1.13.6.
  2937. * configure.in (ALL_LINGUAS): Add pt_BR.
  2938. * po/pt_BR.po: New file.
  2939. * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
  2940. Renamed from tar.info and header.texi; adjust actions so that
  2941. they work in other directories.
  2942. * doc/tar.texi: Add -y and --bzip2.
  2943. Patterns containing / now exclude only file names whose prefix match.
  2944. * lib/exclude.h (excluded_filename): New option parameter.
  2945. (add_exclude_file): New ADD_FUNC parameter.
  2946. (excluded_pathname): Remove decl.
  2947. * lib/exclude.c (_GNU_SOURCE):
  2948. Remove; no longer needed since we don't use FNM_ macros.
  2949. (excluded_filename): Renamed from excluded_filename_opts.
  2950. (excluded_filename, excluded_pathname): Remove.
  2951. (add_exclude_file): New ADD_FUNC parameter.
  2952. * po/POTFILES.in: Add lib/quotearg.c.
  2953. * src/buffer.c (_GNU_SOURCE): Define.
  2954. (<fnmatch.h>): Include unconditionally.
  2955. (child_open_for_compress): Dup after closing, to avoid possible file
  2956. descriptor exhaustion.
  2957. (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
  2958. (flush_read): Likewise.
  2959. * src/common.h (LG_8, LG_64): New macros.
  2960. (excluded_with_slash, excluded_without_slash): New vars.
  2961. (excluded): Remove.
  2962. (base_64_digits): New decl.
  2963. (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
  2964. off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
  2965. uintmax_to_chars,
  2966. GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
  2967. OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
  2968. UINTMAX_TO_CHARS):
  2969. Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
  2970. off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
  2971. GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
  2972. SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
  2973. respectively. All definitions and uses changed.
  2974. (excluded_name): New decl.
  2975. * src/compare.c (diff_archive):
  2976. Open files with O_NONBLOCK instead of O_NDELAY.
  2977. * src/create.c (base_64_digits): New constant.
  2978. (base_8_digits): New macro.
  2979. (MAX_VAL_WITH_DIGITS): New macro.
  2980. (to_base): First half of old to_oct. Support base 64 too.
  2981. (to_chars): Other half of old to_oct, for 64-bit support.
  2982. (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
  2983. (gid_substitute, uid_substitute): Look up names dynamically if
  2984. GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
  2985. (mode_to_chars): Renamed from mode_to_oct.
  2986. Support negative values in all the _to_chars functions.
  2987. (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
  2988. Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
  2989. (dump_file): Inspect entire pathname, not just new file name
  2990. component, when deciding whether to exclude it.
  2991. * src/extract.c (extract_archive):
  2992. Open files with O_NONBLOCK instead of O_NDELAY.
  2993. * src/incremen.c (get_directory_contents):
  2994. Inspect entire pathname, not just new file name
  2995. component, when deciding whether to exclude it.
  2996. * src/list.c (<fnmatch.h>): Do not include.
  2997. (from_chars): Renamed from from_oct. New parameter specifying
  2998. the negative of the minimum allowed value. Support negative
  2999. and base-64 values.
  3000. (base64_map): New var.
  3001. (base64_init): New function.
  3002. (print_header): Output numeric uids and gids if numeric_owner_option.
  3003. * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
  3004. * src/names.c (_GNU_SOURCE): Define.
  3005. (<fnmatch.h>): Include unconditionally.
  3006. (excluded_name): New function, taking over duties of excluded_pathname.
  3007. All uses changed.
  3008. * src/rmt.c (decode_oflag): New function.
  3009. (main): Use it to support symbolic open flags.
  3010. * src/rtapelib.c (encode_oflag): New function.
  3011. (rmt_open__): Do not allow newlines in the path.
  3012. Propagate errno correctly.
  3013. Decode symbolic open flags, if present.
  3014. * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
  3015. New macros.
  3016. * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
  3017. New -y or --bzip2 option.
  3018. (add_filtered_exclude): New function.
  3019. (decode_options): Put excluded patterns with / into
  3020. excluded_with_slash, and without / into excluded_without_slash.
  3021. Compare newer_mtime_option to its new initial value
  3022. TYPE_MINIMUM (time_t) when deciding whether more than one
  3023. threshold date was specified.
  3024. 1999-07-20 Paul Eggert <[email protected]>
  3025. * NEWS, configure.in: Version 1.13.5.
  3026. * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
  3027. before exiting.
  3028. * src/buffer.c (new_volume): Likewise.
  3029. * src/incremen.c (read_directory_file): Likewise.
  3030. * src/tar.c (decode_options):
  3031. ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
  3032. for consistency.
  3033. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
  3034. * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
  3035. * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
  3036. (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
  3037. (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
  3038. Define to 0 if the corresponding S_IF* macro is not defined.
  3039. (mkfifo): Do not define if already defined, or if S_IFIFO
  3040. is not defined.
  3041. * src/compare.c (diff_archive): Use HAVE_READLINK, not
  3042. S_ISLNK, to determine whether to invoke readlink.
  3043. * src/create.c (dump_file): Likewise.
  3044. * src/extract.c (set_mode):
  3045. Do not chmod unless we are root or the -p option was given;
  3046. this matches historical practice.
  3047. (unlink_destination): New function, which checks for unlink failures.
  3048. (maybe_recoverable): Stay quiet if -U.
  3049. (extract_archive): Use O_EXCL if unlink_first_option.
  3050. Report unlink failures.
  3051. Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
  3052. Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
  3053. mkfifo exists.
  3054. * src/incremen.c (get_directory_contents): Depend on
  3055. S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
  3056. * src/list.c: Remove S_IS* ifdefs.
  3057. * src/misc.c (maybe_backup_file): Likewise.
  3058. * src/misc.c (maybe_backup_file):
  3059. "Virtual memory exhausted" -> "Memory exhausted",
  3060. to conform to the other places this message is issued.
  3061. * src/mangle.c (extract_mangle):
  3062. Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
  3063. * src/rtapelib.c (rmt_open__):
  3064. Remove typo that caused us to omit the first char
  3065. of the basename.
  3066. 1999-07-16 Paul Eggert <[email protected]>
  3067. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
  3068. * doc/tar.texi: A path name is excluded if any of its file name
  3069. components matches an excluded pattern, even if the path name was
  3070. specified on the command line.
  3071. * src/create.c (create_archive): Likewise.
  3072. * src/list.c (read_and): Likewise.
  3073. * src/update.c (update_archive): Likewise.
  3074. * lib/exclude.h (excluded_pathname): New decl.
  3075. * lib/exclude.c (_GNU_SOURCE): Define.
  3076. (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
  3077. (excluded_filename_opts): New function.
  3078. (excluded_pathname): New function.
  3079. * lib/Makefile.am (EXTRA_DIST):
  3080. xstrtol.c moved here from libtar_a_SOURCES.
  3081. (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
  3082. Remove xstrtoul.c; no longer needed.
  3083. * lib/xstrtol.c: Remove.
  3084. * src/tar.c (decode_options):
  3085. Set newer_time_option to TYPE_MINIMUM, so that
  3086. negative timestamps are handled correctly.
  3087. Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
  3088. uniformity (and so that we don't need to have the other fns).
  3089. (main): Remove call to init_total_written; no longer needed.
  3090. * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
  3091. checks for unsigned long and long long.
  3092. * src/arith.c: Remove.
  3093. * src/Makefile.am (tar_SOURCES): Remove arith.c.
  3094. * po/POTFILES.in: Remove src/arith.c.
  3095. * src/arith.h: Use double, to simplify configuration gotchas.
  3096. (tarlong): Now double.
  3097. (TARLONG_FORMAT): New macro.
  3098. (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
  3099. LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
  3100. zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
  3101. add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
  3102. zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
  3103. mult_tarlong, print_tarlong): Remove. All callers replaced with
  3104. arithmetic ops.
  3105. * src/common.h (init_total_written): Remove decl.
  3106. * src/buffer.c (total_written):
  3107. Remove; replaced with prev_written + bytes_written.
  3108. (prev_written): New var.
  3109. (init_total_written): Remove.
  3110. (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
  3111. * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
  3112. Make sure that we can shift, multiply
  3113. and divide unsigned long long values; Ultrix cc can't do it.
  3114. * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
  3115. Check for any unknown bits, not just unknown bits left of the leftmost
  3116. known bit.
  3117. * lib/quotearg.c (quotearg_buffer):
  3118. Don't quote spaces if C quoting style.
  3119. * src/list.c (from_oct):
  3120. Use C quoting style for error; omit trailing NULs.
  3121. 1999-07-14 Paul Eggert <[email protected]>
  3122. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
  3123. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
  3124. <inttypes.h> defines strtoumax as a macro (and not as a function).
  3125. HP-UX 10.20 does this.
  3126. * src/tar.c (usage): [email protected] -> [email protected]
  3127. * PORTS, README, TODO, doc/tar.texi: Likewise.
  3128. 1999-07-12 Paul Eggert <[email protected]>
  3129. * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
  3130. (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
  3131. * src/list.c (decode_header):
  3132. Do not assume that S_IFBLK and S_IFCHR are defined.
  3133. * src/create.c (start_header): Do not assume S_IFMT is defined.
  3134. (dump_file): Remove unnecessary check for screwy apollo lossage.
  3135. Do not assume S_IFBLK and S_IFCHR are defined.
  3136. * src/extract.c (extract_archive):
  3137. Test whether S_IFCHR and S_IFBLK are nonzero,
  3138. not whether they are defined, for consistency with other tests.
  3139. * src/buffer.c (is_regular_file):
  3140. Don't succeed on files that we can't access due to
  3141. permissions problems.
  3142. (open_archive): Fix wording on fatal error message.
  3143. Don't bother to stat /dev/null if the archive is not a character
  3144. special device.
  3145. * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
  3146. Report an error, not a warning, for I/O errors.
  3147. (process_rawdata, process_dumpdir, diff_sparse_files):
  3148. Change ungrammatical "Data differs" to "Contents differ".
  3149. (get_stat_data): Find hidden files on AIX.
  3150. Accept file name as argument; all uses changed.
  3151. (get_stat_data, diff_archive): Use system error message for
  3152. nonexistent files rather than rolling our own.
  3153. (diff_archive): Unknown file types are errors, not warnings.
  3154. Normalize spelling of message to "File type differs".
  3155. Use get_stat_data to get link status, for consistency.
  3156. Do not inspect st_rdev for fifos.
  3157. Do not assume st_mode values contain only file types and mode bits.
  3158. Check for mode changes and device number changes separately.
  3159. * src/update.c (append_file):
  3160. Open the file before statting it, to avoid a race.
  3161. Complain about file shrinkage only when we reach EOF.
  3162. 1999-07-08 Paul Eggert <[email protected]>
  3163. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
  3164. * configure.in (AC_EXEEXT): Add.
  3165. * lib/Makefile.am (noinst_HEADERS):
  3166. Add basename.h, exclude.h. Remove full-write.h.
  3167. (libtar_a_SOURCES): Add exclude.c.
  3168. * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
  3169. New files.
  3170. * lib/full-write.c: Include safe-read.h instead of full-write.h.
  3171. * lib/safe-read.h (safe_read): New decl.
  3172. * src/rmt.c: Include safe-read.h.
  3173. * src/rtapelib.c: Include basename.h, save-read.h.
  3174. (rmt_open__): Use base_name to compute base name.
  3175. * src/common.h:
  3176. Include basename.h, exclude.h; don't include full-write.h.
  3177. (exclude_option): Remove decl.
  3178. (excluded): New decl.
  3179. (add_exclude, add_exclude_file, check_exclude): Remove decls.
  3180. * src/list.c (read_and):
  3181. Use excluded_filename instead of check_exclude.
  3182. Check base name of incoming file name, not entire file name, when
  3183. deciding whether to exclude it.
  3184. * src/create.c (finish_sparse_file):
  3185. Use excluded_filename instead of check_exclude.
  3186. Don't bother to stat excluded file names.
  3187. * src/incremen.c (get_directory_contents): Likewise.
  3188. * src/names.c (exclude_pool, exclude_pool_size,
  3189. allocated_exclude_pool_size, simple_exclude_array,
  3190. simple_excludes, allocated_simple_excludes,
  3191. pattern_exclude_array, pattern_excludes,
  3192. allocated_pattern_excludes, add_exclude, add_exclude_file,
  3193. check_exclude):
  3194. Remove; now done in ../lib/exclude.c.
  3195. * src/tar.c (decode_options): Initialize `excluded'.
  3196. Use new add_exclude_file and add_exclude functions.
  3197. 1999-07-05 Paul Eggert <[email protected]>
  3198. * m4/gettext.m4: Use changequote rather than [[ ]].
  3199. * lib/safe-read.c: Renamed from lib/full-read.c.
  3200. (safe_read): Renamed from full_read. All uses changed.
  3201. * lib/safe-read.h, lib/full-write.h: New files.
  3202. * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
  3203. (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
  3204. * lib/full-write.c: Include full-write.h.
  3205. * src/common.h: Include full-write.h, safe-read.h.
  3206. * src/system.h: (full_read, full_write): Remove decls.
  3207. * src/Makefile.am (datadir): New var; needed for Solaris gettext.
  3208. * src/system.h (bindtextdomain, textdomain): undef before
  3209. defining, to avoid preprocessor warnings with --disable-nls
  3210. on hosts whose locale.h includes libintl.h.
  3211. * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
  3212. expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
  3213. (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
  3214. the above decl.
  3215. 1999-07-02 Paul Eggert <[email protected]>
  3216. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
  3217. * m4/mktime.m4: New file.
  3218. * m4/Makefile.am.in, m4/README: Remove these files.
  3219. * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
  3220. remove README, Makefile.am.in.
  3221. (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
  3222. * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
  3223. not AM_FUNC_MKTIME.
  3224. * src/tar.c: Include signal.h.
  3225. (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
  3226. (main): Ensure SIGCHLD is not ignored.
  3227. (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
  3228. MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
  3229. OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
  3230. RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
  3231. VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
  3232. OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
  3233. OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
  3234. OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
  3235. they don't overlap with char codes. Use an enum instead of a lot
  3236. of #defines.
  3237. * src/system.h (ISASCII): Remove.
  3238. (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
  3239. S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
  3240. S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
  3241. MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
  3242. LONG_MAX): New macros.
  3243. * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
  3244. (read_directory_file): Cast ISSPACE arg to unsigned char.
  3245. * src/misc.c (ISPRINT): Remove; now in system.h.
  3246. (remove_any_file): Add brackets to pacify gcc -Wall.
  3247. * src/list.c: Don't include <ctype.h>; system.h already does this.
  3248. (ISODIGIT, ISSPACE): Remove; now in system.h.
  3249. (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
  3250. does this now.
  3251. (from_oct): Cast ISSPACE arg to unsigned char.
  3252. * src/create.c (mode_to_oct): Translate modes from internal to
  3253. external form.
  3254. * src/list.c (mode_from_oct): Translate modes from external to
  3255. internal form. Do not complain about unrecognized mode bits.
  3256. * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
  3257. TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
  3258. * src/extract.c: (extr_init, make_directories, extract_archive):
  3259. Do not assume mode bits have traditional Unix values.
  3260. * src/list.c (decode_mode): Likewise.
  3261. * src/create.c (start_header, dump_file): Likewise.
  3262. * src/buffer.c (child_open_for_compress,
  3263. child_open_for_uncompress, open_archive, (close_archive): Likewise.
  3264. * src/compare.c (diff_archive): Likewise.
  3265. * src/extract.c (set_mode): Use %04 not %0.4 format.
  3266. (extract_sparse_file): Do not use data_block uninitialized.
  3267. Check for lseek failures.
  3268. * src/rtapelib.c (rmt_lseek__):
  3269. Convert lseek whence values to portable integers on the wire.
  3270. * src/rmt.c (main): Likewise. Check for whence values out of range.
  3271. * src/create.c (finish_sparse_file): Use lseek whence macros
  3272. instead of integers.
  3273. * src/buffer.c (backspace_output): Likewise.
  3274. * src/compare.c (diff_archive, verify_volume): Likewise.
  3275. * src/delete.c (move_archive): Likewise.
  3276. * src/extract.c (extract_sparse_file): Likewise.
  3277. * src/create.c (dump_file): Do not invoke finish_sparse_file
  3278. on a negative file descriptor.
  3279. * src/buffer.c: Add braces to pacify gcc -Wall.
  3280. * src/compare.c (diff_sparse_files): Report lseek errors.
  3281. * configure.in (ALL_LINGUAS): Add cs, es, ru.
  3282. * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
  3283. * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
  3284. message to be internationalized; \a doesn't work with msgfmt.
  3285. * src/tar.c (long_options, main, usage, OPTION_STRING):
  3286. Remove -E or --ending-file.
  3287. * src/list.c (read_and): Likewise.
  3288. * src/common.h (ending_file_option): Likewise.
  3289. * src/buffer.c (close_archive): Likewise.
  3290. * tests/after: Don't run two commands together in a pipeline,
  3291. as some old shells mishandle pipeline exit status.
  3292. 1999-06-28 Paul Eggert <[email protected]>
  3293. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
  3294. * NEWS: Describe changes since 1.12.
  3295. * README: Update bug reporting address; move paxutils ref to NEWS.
  3296. Handle EINTR correctly.
  3297. * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
  3298. * lib/full-read.c, lib/full-write.c: New files.
  3299. * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
  3300. Prefer full_read to read and full_write to write.
  3301. * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
  3302. * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
  3303. Likewise.
  3304. * src/extract.c (extract_sparse_file): Likewise.
  3305. * src/rmt.c (get_string, main, report_error_message,
  3306. report_numbered_error): Likewise.
  3307. * src/rmt.h (rmtread, rmtwrite): Likewise.
  3308. * src/rtapelib.c (do_command, get_status_string, rmt_read__,
  3309. rmt_write__, rmt_ioctl__): Likewise.
  3310. * src/update.c (append_file): Likewise.
  3311. * src/system.h (full_read, full_write): New decls.
  3312. * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
  3313. lib/xmalloc.c, src/arith.c, src/misc.c.
  3314. * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
  3315. New macros. All uses of STDIN and STDOUT changed.
  3316. * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
  3317. instead of 0 and STDOUT_FILENO instead of 1.
  3318. * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
  3319. instead of fileno (stdin) and fileno (stdout) or 0 and 1.
  3320. * src/rmt.c (private_strerror): Avoid const. Translate results.
  3321. * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
  3322. in the presence of NFS clock skew.
  3323. 1999-06-25 Paul Eggert <[email protected]>
  3324. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
  3325. * src/buffer.c (write_archive_buffer): New function.
  3326. (child_open_for_compress, flush_write, flush_read): Use it to write
  3327. buffers.
  3328. (open_archive): Report error if fstat of archive fails.
  3329. Improve efficiency of check for /dev/null.
  3330. Also, fix some corner cases with remote archives and /dev/null checking.
  3331. (close_archive): Test for input fifo only if not remote.
  3332. Truncate output archive only if it's not remote.
  3333. * src/misc.c (remove_any_file):
  3334. Don't terminate if you see . or ..; just skip them.
  3335. 1999-06-18 Paul Eggert <[email protected]>
  3336. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
  3337. Output sizes using a format that's more compatible with
  3338. traditional tar (and with GNU Emacs).
  3339. * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
  3340. MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
  3341. Don't subtract 1 from size.
  3342. * src/create.c (to_oct): Prepend leading zeros, not spaces.
  3343. Output a trailing NUL unless the value won't fit without it.
  3344. (finish_header): No need to append NUL to chksum, now that
  3345. to_oct is doing it.
  3346. 1999-06-16 Paul Eggert <[email protected]>
  3347. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
  3348. * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
  3349. @INTLLIBS@ might invoke rpl_realloc.
  3350. * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
  3351. (intconv): Remove; use xstrto* fns instead.
  3352. ("xstrtol.h"): Include.
  3353. (check_decimal): Remove.
  3354. (long_options, usage, OPTION_STRING, decode_options):
  3355. Remove -y, --bzip2, --unbzip2.
  3356. (decode_options): Use xget_version instead of get_version.
  3357. Check for overflow with -b and -L and RECORD_SIZE_OPTION.
  3358. Replace invocations of check_decimal with xstrtoumax.
  3359. * tests/preset.in (echo_n, echo_c): Remove.
  3360. * tests/after: Don't rely on $echo_c and $echo_n.
  3361. * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
  3362. lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
  3363. lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
  3364. lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
  3365. m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
  3366. m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
  3367. m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
  3368. m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
  3369. m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
  3370. m4/xstrtoumax.m4: New files.
  3371. * configure.in(fp_PROG_ECHO): Remove; no longer needed.
  3372. (AC_SYS_LARGEFILE): Renamed from AC_LFS.
  3373. (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
  3374. (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
  3375. (AC_CHECK_FUNCS): Remove lchown.
  3376. (AC_REPLACE_FUNCS): Remove basename, dirname.
  3377. Add lchown, strtol, strtoul.
  3378. (jm_FUNC_MKTIME): Add.
  3379. (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
  3380. are also built via the ANSI2KNR-filtering rules.
  3381. Use a no-op line to work around bug in automake 1.4 with malloc and
  3382. realloc.
  3383. (AC_OUTPUT): Add m4/Makefile.
  3384. * lib/Makefile.am (EXTRA_DIST):
  3385. Add lchown.c, malloc.c, mktime.c, realloc.c,
  3386. strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
  3387. (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
  3388. (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
  3389. xstrtoul.c, xstrtoumax.c. Remove getversion.c.
  3390. ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
  3391. * src/system.h (uintmax_t): Don't declare; configure now does this.
  3392. * src/common.h (backup_type): New decl.
  3393. * src/common.h, src/misc.c, src/tar.c:
  3394. Move include of backupfile.h to common.h.
  3395. * src/misc.c (maybe_backup_file):
  3396. Pass backup_type to find_backup_file_name.
  3397. * src/list.c (print_header): Change sizes of uform and gform from 11 to
  3398. UINTMAX_STRSIZE_BOUND.
  3399. * doc/tar.texi: Remove --bzip2.
  3400. Fix @xref typos reported by latest makeinfo.
  3401. * Makefile.am (ACLOCAL_AMFLAGS): New macro.
  3402. (SUBDIRS): Add m4.
  3403. (M4DIR, ACINCLUDE_INPUTS): New macros.
  3404. ($(srcdir)/acinclude.m4): New rule.
  3405. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
  3406. HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
  3407. now generated automatically by autoconf.
  3408. 1999-05-15 Paul Eggert <[email protected]>
  3409. * doc/tar.texi: Remove -y.
  3410. 1999-04-09 Paul Eggert <[email protected]>
  3411. * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
  3412. (we were allocating too much storage).
  3413. (uintmax_t): Don't declare; configure now does this.
  3414. * ABOUT-NLS: Update to gettext 0.10.35 edition.
  3415. 1999-03-22 Paul Eggert <[email protected]>
  3416. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
  3417. * acinclude.m4 (AC_LFS_FLAGS):
  3418. Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
  3419. (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
  3420. (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
  3421. * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
  3422. New macros; needed for latest GNU xmalloc.c.
  3423. * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
  3424. (libtar_a_SOURCES): Add quotearg.c.
  3425. * list.c: Include <quotearg.h>.
  3426. (from_oct): Add forward decl.
  3427. (read_header): Return HEADER_FAILURE if we can't parse the checksum.
  3428. (from_oct): Report an error only if TYPE is nonzero.
  3429. Quote any funny characters in bad header.
  3430. 1999-03-20 Paul Eggert <[email protected]>
  3431. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
  3432. * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
  3433. (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
  3434. changed.
  3435. (AC_LFS): Simplify AIX revision number test.
  3436. 1999-03-17 Paul Eggert <[email protected]>
  3437. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
  3438. * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
  3439. Remove; it doesn't work that well
  3440. with AC_CANONICAL_HOST.
  3441. (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
  3442. * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
  3443. * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
  3444. * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
  3445. * tar.texi: Fix bug-report addr.
  3446. * README: Remove --with-included-malloc.
  3447. Upgrade version numbers of build software.
  3448. 1999-03-07 Paul Eggert <[email protected]>
  3449. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
  3450. * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
  3451. where bindtextdomain and gettext require -lintl.
  3452. (AC_LFS_FLAGS): Simplify so that it only gets the flags;
  3453. `no' means it failed.
  3454. (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
  3455. (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
  3456. _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
  3457. to add anything to the command line (it's all in config.h).
  3458. Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
  3459. 1999-03-01 Paul Eggert <[email protected]>
  3460. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
  3461. * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
  3462. * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
  3463. mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
  3464. uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
  3465. like OFF_MAX, which are not reliable
  3466. (e.g. OFF_MAX in AIX 4.2 is incorrect).
  3467. * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
  3468. SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
  3469. * src/incremen.c (get_directory_contents):
  3470. Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
  3471. Have statx depend on STX_HIDDEN, not AIX.
  3472. * src/create.c (to_oct):
  3473. New parameter substitute, giving a substitute value to use
  3474. when the original value is out of range. Do not append a space to the
  3475. output; modern tars don't. When a value is out of range, specify the
  3476. maximum value, not the number of bits.
  3477. (GID_NOBODY, UID_NOBODY): New macros.
  3478. (gid_to_oct, uid_to_oct): Use them as substitutes.
  3479. (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
  3480. (dump_file): Check whether the file changed as we read it.
  3481. * src/rmt.c (main): Remove suspicious AIX/386 code.
  3482. 1999-02-19 Paul Eggert <[email protected]>
  3483. * intl/localealias.c (read_alias_file): Don't assume that memcpy
  3484. returns a type compatible with char *; it doesn't on SunOS
  3485. 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
  3486. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
  3487. * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
  3488. * doc/tar.texi: Add --bzip2, --unbzip2 options.
  3489. * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
  3490. Add.
  3491. (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
  3492. (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
  3493. * acinclude.m4 (AM_WITH_NLS):
  3494. Update to latest gettext version (serial 5).
  3495. (AC_LFS_FLAGS): New macro
  3496. (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
  3497. working only with unset variables. Append to CFLAGS, not CPPFLAGS.
  3498. Work properly in cross-compilation scenario, by checking for getconf
  3499. with AC_CHECK_TOOL and by ditching uname in favor of
  3500. AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
  3501. * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
  3502. replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
  3503. * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
  3504. since getdate.y now uses ANSI code.
  3505. * config.guess, config.sub: New files; taken from automake 1.4.
  3506. * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
  3507. intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
  3508. intl/explodename.c, intl/finddomain.c, intl/gettext.c,
  3509. intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
  3510. intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
  3511. intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
  3512. Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
  3513. 1999-02-01 Paul Eggert <[email protected]>
  3514. * src/tar.c: Update copyright.
  3515. * NEWS: 1.12.64004
  3516. 1999-02-01 Paul Eggert <[email protected]>
  3517. * NEWS, configure.in: Version 1.12.64004
  3518. * configure.in (AC_LFS): Use this macro, instead of open-coding it.
  3519. * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
  3520. * src/extract.c (extract_archive): Fix bug when extracting sparse
  3521. files: they were trashing the tar file header.
  3522. * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
  3523. Add -y or --bzip2 or --bunzip2 option.
  3524. 1999-01-30 Paul Eggert <[email protected]>
  3525. * src/names.c (cached_no_such_uname, cached_no_such_gname,
  3526. cached_no_such_uid, cached_no_such_gid): New vars.
  3527. (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
  3528. Cache failures, too.
  3529. * src/tar.c (decode_options):
  3530. Don't pass names longer than UNAME_FIELD_SIZE to
  3531. uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
  3532. 1999-01-27 Paul Eggert <[email protected]>
  3533. * NEWS, configure.in: Version 1.12.64003
  3534. * src/buffer.c (backspace_output, close_archive): Cast
  3535. rmtlseek position arg to off_t, for benefit of K&R compilers
  3536. with long long.
  3537. * src/compare.c (verify_volume): Likewise.
  3538. * NEWS, configure.in: Version 1.12.64002
  3539. * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
  3540. off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
  3541. Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
  3542. * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
  3543. mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
  3544. uid_from_oct): Likewise.
  3545. 1999-01-25 Paul Eggert <[email protected]>
  3546. * incremen.sh: Fix timing bug in regression test.
  3547. 1999-01-22 Paul Eggert <[email protected]>
  3548. * NEWS, configure.in: Update version
  3549. * Makefile.am (localedir): Change to $(datadir)/locale.
  3550. (DEFS): New macro, defining LOCALEDIR.
  3551. (tar.o, tar._o, rmt.o, rmt._o): Remove.
  3552. (INCLUDES): Add -I..
  3553. * Makefile.am (localedir): Change to $(datadir)/locale.
  3554. 1999-01-21 Paul Eggert <[email protected]>
  3555. * NEWS, README, configure.in: Unofficial version 1.12.64001.
  3556. * tests/Makefile.am (localedir): Change to $(datadir)/locale.
  3557. * src/Makefile.am (localedir): Likewise.
  3558. (DEFS): New macro, defining LOCALEDIR.
  3559. (tar.o, tar._o, rmt.o, rmt._o): Remove.
  3560. (INCLUDES): Add `-I..'.
  3561. * tests/incremen.sh: Fix timing bug.
  3562. 1999-01-20 Paul Eggert <[email protected]>
  3563. * NEWS, README, configure.in: Unofficial version 1.12.64000.
  3564. `lfs.7' changed to `64000' in version number
  3565. to conform to gnits standards.
  3566. * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
  3567. mkinstalldirs, ansi2knr.c: Update to latest public versions.
  3568. Rebuild with automake 1.4 and autoconf 2.13, to work around some
  3569. porting problems.
  3570. 1998-12-07 Paul Eggert <[email protected]>
  3571. * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
  3572. * src/list.c (read_header):
  3573. Accept file names as specified by POSIX.1-1996 section 10.1.1.
  3574. 1998-11-30 Paul Eggert <[email protected]>
  3575. * configure.in: Quote the output of uname.
  3576. * src/extract.c (set_stat): chmod after chown even when not root;
  3577. if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
  3578. 1998-11-15 Paul Eggert <[email protected]>
  3579. * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
  3580. * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
  3581. ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
  3582. 1998-10-28 Paul Eggert <[email protected]>
  3583. * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
  3584. * src/system.h (voidstar): Use void * if __STDC__ is defined,
  3585. not merely nonzero.
  3586. * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
  3587. On many installations, rexec is disabled.
  3588. 1998-08-07 Paul Eggert <[email protected]>
  3589. * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
  3590. * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
  3591. for nameless users and groups.
  3592. 1998-02-17 Paul Eggert <[email protected]>
  3593. * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
  3594. * NEWS, README: Add explanation of why this isn't an official version.
  3595. 1998-02-02 Paul Eggert <[email protected]>
  3596. * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
  3597. This is an unofficial version.
  3598. 1997-12-17 Paul Eggert <[email protected]>
  3599. * src/incremen.c (ST_DEV_MSB): New macro.
  3600. (NFS_FILE_STAT): Use most significant bit of st_dev,
  3601. even if it's unsigned.
  3602. 1997-12-08 Paul Eggert <[email protected]>
  3603. * src/system.h (ST_NBLOCKS): Fix typo in definition.
  3604. 1997-11-19 Paul Eggert <[email protected]>
  3605. * configure.in (HAVE_INTTYPES_H):
  3606. Don't ignore cache variable if it's already set.
  3607. 1997-11-10 Paul Eggert <[email protected]>
  3608. * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
  3609. * src/delete.c (records_read): Now off_t.
  3610. (move_archive): Don't assume mt_count is of type daddr_t.
  3611. 1997-10-30 Paul Eggert <[email protected]>
  3612. * configure.in (CPPFLAGS, LDFLAGS, LIBS):
  3613. Set to appropriate values if large file support
  3614. needs explicit enabling.
  3615. (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
  3616. ssize_t):
  3617. New macros to configure.
  3618. (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
  3619. * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
  3620. major_t, minor_t, ssize_t): New macros.
  3621. * src/arith.h (TARLONG_FORMAT):
  3622. Fix typo: %uld -> %lu. Use unsigned when long long
  3623. (%lld -> %llu).
  3624. (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
  3625. (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
  3626. * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
  3627. 2nd arg is now unsigned long.
  3628. * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
  3629. (prepare_record_buffer): Arg is now size_t.
  3630. Remove now-useless casts.
  3631. (main): Use `long' for status, so that it can store ssize_t.
  3632. Use daddr_t, mode_t, size_t, off_t when appropriate.
  3633. Convert daddr_t and off_t values ourselves, since they might be longer
  3634. than long. Convert other types using `long' primitives.
  3635. When processing MTIOCTOP, do not try to pass resulting
  3636. count back, since it won't work (it could be too large) and it's
  3637. not expected anyway.
  3638. * src/update.c:
  3639. (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
  3640. now-useless casts. Use unsigned long to print *_t types, except use
  3641. STRINGIFY_BIGINT for off_t.
  3642. (update_archive): Cast -1 to dev_t when necessary.
  3643. * src/tar.c (check_decimal):
  3644. Now returns 1 if successful, 0 otherwise, and returns
  3645. uintmax_t value into new arg. Check for arithmetic overflow.
  3646. (decode_options): Avoid overflow if record_size fits in size_t but not int.
  3647. Check for overflow on user or group ids.
  3648. * src/compare.c (diff_init, process_rawdata, read_and_process,
  3649. diff_sparse_files, diff_archive):
  3650. Use off_t, pid_t, size_t, ssize_t when appropriate.
  3651. Remove now-useless casts. Use unsigned long to print *_t types,
  3652. except use STRINGIFY_BIGINT for off_t.
  3653. (process_noop, process_rawdata, process_dumpdir, read_and_process):
  3654. Size arg is now size_t.
  3655. (diff_sparse_files): Arg is now off_t. Check for size_t overflow
  3656. when allocating buffer.
  3657. * src/rtapelib.c:
  3658. (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
  3659. Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
  3660. Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
  3661. off_t.
  3662. (get_status_string, get_status_off): New function.
  3663. (get_status): Now returns long, so that it can store ssize_t.
  3664. Invoke get_status_string to do the real work.
  3665. (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
  3666. (rmt_lseek__): Now returns off_t, using new get_status_off function.
  3667. (rmt_ioctl__): Convert mt_count by hand,
  3668. since it might be longer than long.
  3669. * src/mangle.c (extract_mangle):
  3670. Check for overflow when converting off_t to size_t.
  3671. Use off_t, size_t when appropriate. Remove now-useless casts.
  3672. * src/system.h (mode_t): Remove; now done by autoconf.
  3673. (ST_NBLOCKS): Do not overflow if st_size is near maximum.
  3674. Return number of ST_NBLOCKSIZE-byte blocks,
  3675. not number of 512-byte blocks;
  3676. this also helps to avoid overflow.
  3677. (st_blocks): Declare if needed.
  3678. (ST_NBLOCKSIZE): New macro.
  3679. (<limits.h>, <inttypes.h>): Include if available.
  3680. (CHAR_BIT): New macro.
  3681. (uintmax_t): New typedef.
  3682. (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
  3683. UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
  3684. OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
  3685. * src/names.c (name_init):
  3686. Fix typo in error message: FILE* was passed, but char*
  3687. was wanted.
  3688. (read_name_from_file, name_gather, addname, name_match, name_scan,
  3689. add_exclude): Use size_t when appropriate. Remove now-useless casts.
  3690. (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
  3691. * src/extract.c (newdir_umask, current_umask): Now mode_t.
  3692. (extract_sparse_file): Args now use off_t.
  3693. (set_mode, set_stat, make_directories, extract_sparse_file,
  3694. extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
  3695. now-useless casts. Use unsigned long to print *_t types, except use
  3696. STRINGIFY_BIGINT for off_t.
  3697. * src/misc.c (quote_copy_string):
  3698. Use size_t when appropriate. Remove now-useless casts.
  3699. * src/list.c (read_and, list_archive, read_header, decode_mode,
  3700. print_header, print_for_mkdir):
  3701. Use mode_t, off_t, size_t when appropriate. Remove
  3702. now-useless casts. Use unsigned long to print *_t types, except use
  3703. STRINGIFY_BIGINT for off_t.
  3704. (read_header): Check for overflow when converting header size.
  3705. (from_oct): Now static. Now returns uintmax_t. `where' arg is now
  3706. const char *. Size arg is now size_t. Now takes new type and maxval
  3707. args. Compute result using uintmax_t, not long. Report error if
  3708. field does not contain octal number in range.
  3709. (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
  3710. off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
  3711. uintmax_from_oct): New functions.
  3712. (stringify_uintmax_t_backwards): New function.
  3713. (decode_mode, print_for_mkdir): Mode arg is now mode_t.
  3714. (skip_file): Offset arg is now off_t.
  3715. * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
  3716. real_s_totsize, real_s_sizeleft, current_block_ordinal):
  3717. Now off_t.
  3718. (write_error): Arg is now ssize_t.
  3719. (child_pid): Now pid_t.
  3720. (available_space_after): Now size_t.
  3721. (child_open_for_compress, child_open_for_uncompress, flush_write,
  3722. open_archive, flush_write, write_error, flush_read, close_archive):
  3723. Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
  3724. casts. Use unsigned long to print *_t types, except use
  3725. STRINGIFY_BIGINT for off_t.
  3726. * src/delete.c (records_read): Now daddr_t.
  3727. (move_archive): Arg is now daddr_t. Check for overflow when
  3728. computing offset.
  3729. (move_archive, delete_archive_members): Use daddr_t, off_t when
  3730. appropriate. Remove now-useless casts.
  3731. * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
  3732. (rmt_lseek): Now returns off_t.
  3733. * src/create.c (to_oct):
  3734. Now static. Value arg is now uintmax_t. Accept new args
  3735. giving name of type of octal field, for error messages. Report an
  3736. error if the value is too large to fit in the field.
  3737. (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
  3738. size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
  3739. (write_eot, write_long, finish_header, deal_with_sparse,
  3740. finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
  3741. appropriate. Remove now-useless casts. Use unsigned long to print
  3742. *_t types, except use STRINGIFY_BIGINT for off_t.
  3743. (find_new_file_size): 1st arg is now off_t*.
  3744. (finish_sparse_file): Args now use off_t, not long.
  3745. Check for lseek error.
  3746. (create_archive, dump_file): Cast -1 to dev_t when necessary.
  3747. (dump_file): Device arg is now dev_t.
  3748. Avoid overflow when testing whether file has holes
  3749. by using the new ST_NBLOCKSIZE macro.
  3750. * src/incremen.c (struct accumulator, add_to_accumulator,
  3751. get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
  3752. Use size_t for sizes.
  3753. (struct directory, get_directory_contents, add_hierarchy_to_namelist):
  3754. Use dev_t, ino_t for devices and inodes.
  3755. (gnu_restore): Use off_t for file offsets.
  3756. (struct directory): Use char for flags. Add new flag `nfs'.
  3757. (nfs): New constant
  3758. (NFS_FILE_STAT): New macro.
  3759. (note_directory): Accept struct stat * instead of
  3760. device and inode number. All callers changed.
  3761. (note_directory, get_directory_contents):
  3762. Use NFS_FILE_STAT to determine whether directory is an NFS directory.
  3763. (write_dir_file): Cast time_t to unsigned long before printing as %lu.
  3764. * src/common.h (record_size, struct name, struct sp_array,
  3765. available_space_after):
  3766. Use size_t for sizes.
  3767. (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
  3768. Use off_t for file offsets.
  3769. (struct name): dir_contents is now const char *, not char *.
  3770. (dump_file, get_directory_contents): Use dev_t for devices.
  3771. (to_oct): Remove decl.
  3772. (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
  3773. UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
  3774. GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
  3775. OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
  3776. UINTMAX_FROM_OCT): New macros.
  3777. (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
  3778. size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
  3779. stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
  3780. minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
  3781. time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
  3782. (print_for_mkdir): 2nd arg is now mode_t.
  3783. See ChangeLog.1 for earlier changes.
  3784. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software
  3785. Foundation, Inc.
  3786. This file is part of GNU tar.
  3787. GNU tar is free software; you can redistribute it and/or modify
  3788. it under the terms of the GNU General Public License as published by
  3789. the Free Software Foundation; either version 2, or (at your option)
  3790. any later version.
  3791. GNU tar is distributed in the hope that it will be useful,
  3792. but WITHOUT ANY WARRANTY; without even the implied warranty of
  3793. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3794. GNU General Public License for more details.
  3795. You should have received a copy of the GNU General Public License
  3796. along with GNU tar; see the file COPYING. If not, write to
  3797. the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  3798. Boston, MA 02111-1307, USA.