ChangeLog 164 KB

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