ChangeLog 171 KB

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