ChangeLog 239 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490
  1. 2005-07-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2. * tests/pipe.at: Pipe the output from `tar xfv' through sort.
  3. 2005-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  4. * src/sparse.c (tar_sparse_init): Fill structure with zeros. Call
  5. sparse_select_optab(). All callers updated.
  6. (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
  7. 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  8. * src/sparse.c (pax_sparse_member_p): Checking member size
  9. vs. file size is not reliable enough. Use sparse_map_avail.
  10. * tests/star/gtarfail.at: Adapt to the new output format
  11. * tests/star/gtarfail2.at: Likewise
  12. * tests/star/multi-fail.at: Likewise
  13. * tests/star/pax-big-10g.at: Likewise
  14. * tests/star/ustar-big-2g.at: Likewise
  15. * tests/star/ustar-big-8g.at: Likewise
  16. * tests/sparse03.at: New test.
  17. * tests/Makefile.am: Add sparse03.at
  18. * tests/testsuite.at: Likewise
  19. * src/xheader.c (size_decoder): Do not set archive_file_size.
  20. Fix bugs introduced yesterday:
  21. * src/sparse.c (tar_sparse_init): Initialize
  22. dimped_size to 0.
  23. (sparse_scan_file): Initialize archive_file_size to 0. The
  24. variable keeps size of the file *as stored in the archive*, not
  25. the size reported by stat.
  26. 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
  27. A sweep of the sparse code prompted by a bug report by Jim Meyering.
  28. * src/sparse.c: Include <inttostr.h>.
  29. (struct tar_sparse_file): offset and dumped_size are off_t, not
  30. size_t. optab is now const *.
  31. (dump_zeros): Return bool success flag, not off_t.
  32. All callers changed.
  33. Use a constant-zero buffer rather than clearing a buffer each time.
  34. Don't mess up if write fails.
  35. (dump_zeros, check_sparse_region):
  36. Don't assume off_t is no wider than size_t.
  37. (tar_sparse_init): Don't bother clearing a field that is already clear.
  38. (zero_block_p): First arg is const *, not *.
  39. (clear_block, SPARSES_INIT_COUNT): Remove.
  40. (sparse_add_map): First arg is now struct start_stat_info *, not
  41. struct tar_sparse_file *. All callers changed.
  42. Use x2nrealloc to check for size_t overflow.
  43. (parse_scan_file): Cache commonly-used parts of file.
  44. Use an auto buffer, not a static one.
  45. Don't bother clearing the buffer; not needed.
  46. Don't bother clearing items that are already clear.
  47. (oldgnu_optab, star_optab, pax_optab): Now const.
  48. (sparse_dump_region): Don't bother clearing the buffer before
  49. reading into it; just clear the parts that aren't read into.
  50. (sparse_dump_file): Clear the whole local variable 'file'.
  51. (diff_buffer): Remove; now a local var.
  52. (check_sparse_region): Don't bother clearing buffer before
  53. reading into it. Don't assume off_t is promoted to long.
  54. (oldgnu_get_sparse_info, star_get_sparse_info):
  55. Use an auto status, not static.
  56. * src/tar.h (struct tar_stat_info): had_trailing_slash is
  57. now bool, not int.
  58. * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
  59. Rewrite to avoid cast.
  60. (sparse_offset_decoder, sparse_numbytes_decoder):
  61. Diagnose excess entries rather than crashing.
  62. 2005-06-22 Jim Meyering <jim@meyering.net>
  63. * src/common.h (timespec_lt): Add a return type: bool.
  64. 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
  65. Further improvements inspired by Jim Meyering's fixes.
  66. * NEWS: Better support for full-resolution time stamps.
  67. The -v option now prints time stamps only to 1-minute resolution.
  68. * gnulib.modules: Add utimens.
  69. * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
  70. offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
  71. * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
  72. * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
  73. * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
  74. lib/obstack.c.
  75. * src/buffer.c (set_start_time, compute_duration, start_time):
  76. Use gettime rather than rolling our own code.
  77. * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
  78. (newer_ctime_option): Remove.
  79. (timespec_lt): New function.
  80. (OLDER_STAT_TIME): Use it.
  81. (string_to_chars): First arg is char const *, not char *.
  82. (tartime): Time arg is now struct timespec. New bool arg.
  83. All callers changed.
  84. (code_ns_fraction): New decl.
  85. (sys_stat_nanoseconds): Remove decl.
  86. (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
  87. (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
  88. * src/compare.c: Include utimens.h rather than rolling our own.
  89. (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
  90. Prototype.
  91. (diff_dumpdir, diff_multivol): Prototype.
  92. (diff_file): Support higher-resolution time stamps.
  93. * src/create.c: Include utimens.h rather than rolling our own.
  94. (MAX_OCTAL_VAL): New macro.
  95. (tar_copy_str, string_to_chars): Don't bother to zero-fill;
  96. the destination is already zeroed.
  97. (string_to_chars): First arg is char const *.
  98. (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
  99. for minor device number.
  100. (write_header_name, dump_hard_link, dump_file0):
  101. Simplify test for old GNU format.
  102. (start_header): Put in placeholders for uid, etc., even when
  103. using extended headers, for benefit of older "tar" implementations.
  104. Don't assume uintmax_t is wider than 32 bits.
  105. Output extended header for mtime if needed.
  106. (dump_regular_finish, dump_file0):
  107. Support extended time stamp resolution.
  108. * src/extract.c: Include utimens.h rather than rolling our own.
  109. (check_time): Support extended time stamp resolution.
  110. * src/list.c: Include <inttostr.h>.
  111. (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
  112. * src/xheader.c: Include <inttostr.h>.
  113. Do not include <xstrtol.h>.
  114. (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
  115. (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
  116. (BILLION, LOG10_BILLION): New constants.
  117. (to_decimal): Remove; superseded by inttostr. All callers changed
  118. to use umaxtostr.
  119. (xheader_format_name): Don't assume pids and uintmax_t values
  120. fit in 63 bytes (!) when printed.
  121. (decode_record): Don't bother to check for ERANGE; an out of range
  122. value must be treater than len_max anyway.
  123. If the length is out of range, output it in the diagnostic.
  124. (format_uintmax): Remove; all callers changed to use umaxtostr.
  125. (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
  126. (out_of_range_header): New function.
  127. (decode_time): Use it.
  128. (code_time): Accept struct timespec, not time_t and unsigned long.
  129. All callers changed. Size sbuf properly, and remove unnecessary check.
  130. Don't assume time stamps can fit in 199 bytes.
  131. Handle negative time stamps. Handle fractional time stamps
  132. more consistently. Don't output unnecessary trailing zeros.
  133. (decode_time): Yield struct timespec, not time_t and unsigned long.
  134. All callers changed.
  135. Handle negative time stamps. Truncate towards minus infinity
  136. consistently. Improve overflow checks, and output a better
  137. diagnostic on overflow.
  138. (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
  139. (decode_num): New function, for better diagnostics.
  140. (atime_coder, atime_decoder, gid_decoder, ctime_coder):
  141. (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
  142. (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
  143. (sparse_offset_decoder, sparse_numbytes_decoder):
  144. Use decode_num, etc., instead of xstrtoumax, etc.
  145. 2005-06-21 Jim Meyering <jim@meyering.net>
  146. Carefully crafted invalid headers can cause buffer overrun.
  147. Invalid header fields go undiagnosed.
  148. Some valid time strings are ignored.
  149. * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
  150. of `calloc'. Use xcalloc instead.
  151. (decode_time, gid_decoder, size_decoder, uid_decoder):
  152. (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
  153. Ensure that the result of calling xstrtoumax is no larger than
  154. the maximum value for the target type. Upon any failure, exit with
  155. a diagnostic.
  156. (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
  157. use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
  158. (decode_time): Rewrite to accept time strings like
  159. 1119018481.000000000. Before, such strings were always ignored.
  160. 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  161. * src/create.c (dump_file0): Check for is_avoided_name()
  162. first. Fixes bug reported by Martin Lohmeier
  163. <martin@mein-horde.de>
  164. * tests/update.at: New file
  165. * tests/Makefile.am (TESTSUITE_AT): Add update.at
  166. * tests/testsuite.at: Likewise
  167. 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  168. * configure.ac (AC_STRUCT_ST_BLKSIZE)
  169. (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
  170. 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
  171. * src/names.c (excluded_name): excluded_filename ->
  172. excluded_file_name, because the name was changed in gnulib.
  173. 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  174. * src/tar.c (read_name_from_file,update_argv): Automatically
  175. detect nul-terminated list files.
  176. * NEWS: Updated
  177. 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  178. * scripts/backup.sh.in: Bugfixes.
  179. 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  180. * scripts/backup.in: Minor fixes
  181. * scripts/backup.sh.in (mt_begin,mt_rewind)
  182. (mt_offline,mt_status): Use $MT to invoke mt
  183. (init_common): Set --rsh-command option for mt if TAPE_FILE is a
  184. remote archive.
  185. * doc/tar.texi: Document new backup scripts behavior
  186. 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  187. * lib/.cvsignore: Updated
  188. * lib/Makefile.tmpl: Add new paxutils files
  189. * po/POTFILES.in: Likewise
  190. * src/buffer.c: Update invocations of safer_name_suffix()
  191. * src/create.c: Likewise
  192. * src/extract.c: Likewise
  193. * src/xheader.c: Likewise
  194. * src/common.h: Include paxlib.h instead of paxerror.h
  195. (safer_name_suffix,removed_prefixes_p): Removed. The functions are
  196. imported from paxutils
  197. * src/names.c (hash_string_hasher,hash_string_compare)
  198. (hash_string_insert,hash_string_lookup,removed_prefixes_p)
  199. (safer_name_suffix): Moved to paxutils
  200. 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  201. * bootstrap (copy_files): Accept optional third argument: a prefix
  202. to be appended to destination file names.
  203. Import paxutils/paxlib files.
  204. * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
  205. by paxutils.
  206. * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
  207. paxconvert.c
  208. * po/POTFILES.in: Likewise.
  209. * src/common.h: Remove defines and declarations imported from
  210. paxutils
  211. * src/misc.c: Likewise
  212. * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
  213. 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
  214. * src/misc.c (remove_any_file): Fix typo in previous change.
  215. 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
  216. Port to Solaris 10's treatment of unlinking directories.
  217. * gnulib-modules: Add unlinkdir.
  218. * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
  219. * src/common.h (we_are_root): Remove extern decl; it's now static.
  220. * src/extract.c (we_are_root): Now static.
  221. * src/misc.c: Include <unlinkdir.h>.
  222. (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
  223. * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
  224. README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
  225. doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
  226. lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
  227. scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
  228. scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
  229. src/arith.h, src/buffer.c, src/common.h, src/compare.c,
  230. src/create.c, src/delete.c, src/extract.c, src/incremen.c,
  231. src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
  232. src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
  233. src/xheader.c, tests/Makefile.am, tests/append.at,
  234. tests/append01.at, tests/comprec.at, tests/delete01.at,
  235. tests/delete02.at, tests/delete03.at, tests/delete04.at,
  236. tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
  237. tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
  238. tests/gzip.at, tests/ignfail.at, tests/incremental.at,
  239. tests/link01.at, tests/listed01.at, tests/listed02.at,
  240. tests/long01.at, tests/longv7.at, tests/multiv01.at,
  241. tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
  242. tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
  243. tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
  244. tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
  245. tests/testsuite.at, tests/truncate.at, tests/version.at,
  246. tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
  247. tests/star/multi-fail.at, tests/star/pax-big-10g.at,
  248. tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
  249. tests/star/ustar-big-8g.at:
  250. Update FSF postal mail address.
  251. 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  252. * NEWS: Updated
  253. * THANKS: Updated
  254. * bootstrap: Install files from paxutils/doc
  255. * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
  256. * doc/tar.texi (Genfile): New appendix
  257. * src/compare.c (diff_file): diff_handle was not initialized
  258. * src/create.c (dump_regular_file): Correctly pad archive members
  259. that shrunk during archiving. Repored by Frank Heckenbach.
  260. * src/extract.c (file_newer_p): Return false if file does not
  261. exist
  262. (prepare_to_extract): Correct warning wording.
  263. * tests/truncate.at: New test case
  264. * tests/Makefile.am: Add truncate.at
  265. * tests/testsuite.at: Likewise.
  266. * doc/.cvsignore: Updated
  267. * lib/.cvsignore: Updated
  268. * tests/.cvsignore: Updated
  269. 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
  270. * tests/multivol04.at: Tell awk to read from /dev/null.
  271. Adjust to recent gnulib changes.
  272. * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
  273. * src/common.h (initial_umask): New var.
  274. * src/create.c (start_ueader): Use it, and adjust to new modechange
  275. API.
  276. (hash_link): unsigned -> size_t parameters and result.
  277. * src/incremen.c (hash_directory): Likewise.
  278. * src/names.c (hash_string_hasher): Likewise.
  279. * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
  280. 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  281. * tests/Makefile.am: Add shortrec.at.
  282. 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
  283. * src/buffer.c (reading_from_pipe): Remove. All uses removed.
  284. (short_read): Don't warn about short reads; they're normal.
  285. * tests/shortrec.at: New file.
  286. * tests/testsuite.at: Include it.
  287. * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
  288. it is sometimes left behind as a garbage file (maybe due to the
  289. multiple traps?).
  290. 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  291. * src/list.c: Handle Solaris 'X' type flag
  292. * src/tar.h (SOLARIS_XHDTYPE): New define
  293. 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
  294. * src/tar.c: Minor fixes to text messages. Proposed by Benno
  295. Schulenberg.
  296. * src/extract.c: Likewise
  297. (extract_file): Assign orig_file_name
  298. to save_name uniformly over the program. This fixes matching
  299. directory names at the start of an archive volume.
  300. * src/buffer.c (flush_write): Warn when the name of the archive
  301. straddling volume boundary is longer than 100 characters. Earlier
  302. behavior was to issue a fatal error.
  303. (struct zip_magic): Reverted part of changes from 2005-04-04.
  304. They make the maintenance too costly. Removing `unsigned'
  305. qualifier from `magic' member should be enough.
  306. * src/compare.c (diff_init): Read directory file if in listed
  307. incremental. This prevents spurious 'Contents differ' diagnostics.
  308. (diff_archive): Minor fixes to text messages
  309. (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
  310. to save_name uniformly over the program. This fixes matching
  311. directory names at the start of an archive volume.
  312. * src/create.c: Assign orig_file_name
  313. to save_name uniformly over the program. This fixes matching
  314. directory names at the start of an archive volume.
  315. * src/list.c: Likewise
  316. * tests/multiv03.at: Modified to match the new behavior
  317. * tests/multiv04.at: New file. Test splittind directory members between
  318. the archive volumes.
  319. * tests/Makefile.am: Add multiv04.at
  320. * tests/testsuite.at: Likewise.
  321. 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
  322. * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
  323. for reasons discussed in the thread beginning at
  324. <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
  325. * .cvsignore: Remove config; add build-aux.
  326. * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
  327. The unsigned char * pointer ran afoul of pedantic C compilers, and
  328. we didn't need pointers anyway. Put the size field before the
  329. data to avoid unnecessary padding. All uses changed.
  330. (magic) Make it const, since it doesn't change. All uses changed.
  331. 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
  332. * src/xheader.c (decode_record): Don't dump core when given
  333. a corrupted extended header. Problem reported by Jim Meyering.
  334. Also, check for other ways that the header might be invalid,
  335. e.g., missing newline at end. Do not allow keys with nulls.
  336. Allow blanks before and after length, as POSIX requires.
  337. Do not allow leading "-" in length. Check for length overflow.
  338. (xheader_decode, xheader_decode_global): Let decode_record
  339. check for exhaustion of record.
  340. (xheader_read): Null-terminate the extended record;
  341. decode_record relies on this.
  342. 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
  343. * bootstrap (TP_URL): Change from
  344. <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
  345. <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
  346. some redirection glitches.
  347. Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
  348. * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
  349. * lib/.cvsignore: Add intprops.h (new gnulib file).
  350. 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  351. * src/list.c (print_header): Print UID/GID in case of
  352. empty user/group name. This could occur when dumping
  353. files belonging to non-existing users and when listing
  354. broken archives.
  355. Reported by Igor Lautar.
  356. * src/create.c: Correctly parse empty uname/gname
  357. * src/sparse.c (sparse_scan_file): Bugfix. offset had
  358. incorrect type.
  359. * scripts/backup.in: Use `head -n 1'. Provide missing
  360. argument to ${MT_STATUS}. Proposed by Jan Merka.
  361. * scripts/backup.sh.in: Likewise. Fixed typo in
  362. MT_OFFLINE assignment.
  363. * scripts/restore.in (restore_fs): Use root_fs
  364. 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  365. * src/create.c: Replace strdup with xstrdup
  366. * src/names.c: Likewise
  367. * src/tar.c: Likewise
  368. * tests/append01.at: Added reference to bug-tar archive
  369. * tests/listed02.at: Use -print with find.
  370. 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  371. * THANKS: Added Tim Adye. Fixed UTF.
  372. * src/list.c (read_header): Removed assignment to
  373. oldgnu_header.isextended. It was breaking append mode.
  374. * tests/append01.at: New test.
  375. * tests/Makefile.am: Added append01.at
  376. * tests/testsuite.at: Likewise
  377. 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  378. * gnulib.modules: New file. List of required gnulib
  379. modules.
  380. * bootstrap: Merge list of required modules from
  381. paxutils with that from tar proper.
  382. * src/tar.c: Various fixes in help and diagnostic messages.
  383. 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  384. * src/common.h (EXTRACT_OVER_PIPE): New macro
  385. * src/compare.c: Code clean up.
  386. * src/extract.c (extract_archive): Do not check for
  387. EXTRACT_OVER_PIPE, decode_options() does this.
  388. * src/misc.c (exec_error,fork_error,dup2_error)
  389. (pipe_error): Removed unneeded functions.
  390. * src/system.c (sys_exec_command): Use xclose, xpipe,
  391. xfork, xdup2 and exec_fatal.
  392. * src/tar.c (options): Improved sorting. Document --backup=off.
  393. (decode_options): Clear backup_option if necessary.
  394. 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  395. Initial implementation of --to-command option proposed
  396. by Hansjoerg Lipp.
  397. * bootstrap: Get setenv module from gnulib
  398. * src/buffer.c: Do not use 8-bit chars in comments
  399. * src/common.h (to_command_option)
  400. (ignore_command_error_option): New globals
  401. (sys_exec_command,sys_wait_command): New commands
  402. * src/extract.c (extract_file): Handle to_command_option
  403. Fix error recovery: decrease `size' by `written', not
  404. by `count', otherwise tar misses the next header
  405. Do not diagnose write error if to_command_option
  406. is set, since the command may have exited prematurely.
  407. It would be better to check for sigpipe, though.
  408. (prepare_to_extract): Handle to_command_option
  409. * src/misc.c (exec_error, fork_error, dup_error)
  410. (pipe_error): New functions
  411. * src/system.c (sys_exec_command)
  412. (sys_wait_command): New functions
  413. * src/tar.c: Handle new options --to-command,
  414. --ignore-command-error
  415. * THANKS: Added Hansjoerg Lipp
  416. 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
  417. * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
  418. All uses changed. Fix typo that sometimes suppressed all "Archive
  419. contains obsolescent base-64 headers" warnings, not just the first
  420. one.
  421. (tar_checksum): Accept only octal checksums, since they aren't
  422. supposed to overflow into weird formats.
  423. Adjust to gnulib changes.
  424. * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
  425. memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
  426. mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
  427. this file). Sort entries.
  428. 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  429. * src/extract.c: Further rewrite.
  430. * src/buffer.c: Removed unused variables.
  431. * src/list.c: Likewise
  432. * src/tar.c (update_argv): Changed type to void
  433. * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
  434. * src/create.c (start_private_header,write_header_name)
  435. (dump_hard_link): Restore compatibility with 1.13.25
  436. * src/extract.c (extract_archive): Rewritten
  437. * src/list.c: Add translators' comments
  438. * src/tar.c (options) Minor spelling fix
  439. * tests/star/quicktest.sh: Determine path to the tar executable.
  440. 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  441. * po/POTFILES.in: Added tests/genfile.c
  442. * src/buffer.c (short_read): Use ngettext()
  443. (new_volume): use quote().
  444. * src/create.c: Use quote()
  445. * src/extract.c: Likewise
  446. * src/xheader.c: Likewise
  447. * src/misc.c: Add comments to translators
  448. * tests/same-order01.at: sort ls output
  449. * tests/sparse01.at (RE_CHECK): Added missing space
  450. * tests/sparse02.at: Test extracting sparse files over a pipe.
  451. * tests/Makefile.am: Added sparse02.at
  452. * tests/testsuite.at: Likewise
  453. * tests/listed02.at: Skip the test on filesystems that do not
  454. update ctime of a file when renaming it. To be reverted when
  455. the new incremental mode is ready.
  456. * tests/sparse01.at: Extract and compare sparse file
  457. 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  458. * src/sparse.c: Extract sparse files even if the output
  459. fd is not seekable.
  460. 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  461. * bootstrap: Add a comment to lib/Makefile.am saying that this
  462. is an autogenerated file.
  463. Exit with code 1 if any of autotools fails.
  464. * lib/Makefile.tmpl: Insert Emacs magic to the first line.
  465. * tests/Makefile.am: Add append.at
  466. * m4/.cvsignore: Ignore all *.m4 files
  467. 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  468. Rewritten handling of -T (--files-from) option. Now it
  469. inserts the file names immediately into argv array which allows
  470. for:
  471. 1) any valid tar options (including another -T) to be used in the file
  472. 2) any number of -T options to be given in command line
  473. * configure.ac: Raised version number to 1.15.2
  474. * src/common.h: Include obstack.h
  475. (files_from_option): Removed
  476. (unquote_option): New variable
  477. (stat_fatal): New function
  478. (name_close): Removed function.
  479. * src/incremen.c: Remove inclusion of obstack.h
  480. * src/xheader.c: Likewise.
  481. * src/misc.c (stat_fatal): New function
  482. * src/names.c (name_file): Removed variable.
  483. (read_name_from_file): Removed function. All callers changed.
  484. (name_close): Removed function. All callers changed.
  485. * src/tar.c: New options --unquote (--no-unquote) and
  486. --add-file
  487. (add_file_id,read_name_from_file,update_argv): New functions
  488. (parse_opt): Rewritten handling of -T option. Handle hidden
  489. --HANG option for debugging purposes.
  490. (decode_options): Init unquote_option to true. Init argv_stk.
  491. Remove unneeded references to files_from_option
  492. * doc/tar.texi: Document new options.
  493. Moved rendition macros and option value definitions into
  494. separate files
  495. * doc/rendition.texi: New file
  496. * doc/value.texi: New file
  497. * doc/Makefile.am: Updated
  498. 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
  499. * tests/testsuite.at (RE_CHECK): Use "join - file", not
  500. "join file -", to work around a bug in Solaris 8 join.
  501. Problem reported by Tomohiro Suzuki.
  502. 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  503. * src/list.c (read_header): Fixed calculation of the
  504. size for GNU long name/link. Tar was reading one block
  505. more if name_size was divisible by 512. Thanks Josef
  506. Bauer.
  507. * tests/long01.at: New file. Test listing of GNU long names
  508. divisible by 512.
  509. * tests/pipe.at: Sort tar output.
  510. * tests/Makefile.am: Added long01.at
  511. * tests/testsuite.at: Likewise.
  512. * THANKS: Added Josef Bauer
  513. * lib/.cvsignore: Updated
  514. * m4/.cvsignore: Updated
  515. * NEWS: Updated
  516. 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  517. * directory: Updated for 1.15.1
  518. * doc/Makefile.am: Use gendocs.sh to generate web documentation
  519. * doc/gendocs_template: Template file for gendocs.sh
  520. * doc/tar.texi: Updated docs for --[no-]same-permissions
  521. * src/tar.c: Reworded docstrings for --[no-]same-permissions
  522. 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  523. * bootstrap: Create m4/paxutils.m4
  524. * configure.ac: Call tar_PAXUTILS
  525. * tests/options02.at: Test that tar correctly handles non-option
  526. arguments interspersed with options.
  527. * tests/Makefile.am: Add options02.at
  528. * tests/testsuite.at: Likewise
  529. * tests/listed02.at: Do not create useless directory
  530. 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  531. * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
  532. Mike Frysinger <vapier@gentoo.org> for reporting.
  533. 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
  534. * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
  535. needless sed command. Problem reported by Paul Jarc.
  536. 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
  537. Accommodate latest gnulib.
  538. * doc/.cvsignore: Add getdate.texi.
  539. * bootstrap: Do not treat alloca-opt specially; this is no
  540. longer needed (and breaks builds) with latest gnulib.
  541. 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  542. * src/tar.c (main): Reverted recent changes (#ifdef).
  543. 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  544. * configure.ac: Raise version number to 1.15.1
  545. Check for locale.h
  546. * NEWS: Entry for 1.15.1
  547. * src/buffer.c: Bugfix. Changes introduced 2004-11-26
  548. broke extraction from stdin.
  549. * src/list.c (from_header, tar_checksum): Changed declaration.
  550. All callers updated.
  551. * src/common.h: Likewise
  552. * src/tar.c (main): Protect invocation of setlocale by
  553. ifdef.
  554. * tests/comprec.at: New test
  555. * tests/pipe.at: New test
  556. * tests/Makefile.am (comprec.at,pipe.at): New tests
  557. * tests/testsuite.at: Likewise
  558. * tests/gzip.at: Use AT_GZIP_PREREQ
  559. * tests/star/pax-big-10g.at: Likewise
  560. * tests/star/ustar-big-2g.at: Likewise
  561. * tests/star/ustar-big-8g.at: Likewise
  562. * tests/extrac04.at: Discard stderr from sort, on some
  563. systems it spits out lots of irrelevant info.
  564. * tests/listed02.at: Likewise
  565. * doc/index.html.in: Rewritten in xhtml to follow recent
  566. GNU site standards.
  567. * THANKS: Updated
  568. 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  569. Released version 1.15. Sources up to this point are
  570. tagged release_1_15.
  571. * configure.ac: Raised version number to 1.15
  572. * NEWS: Likewise
  573. * directory: Updated
  574. * bootstrap (update_po): Give -r to wget. Always remove index.html
  575. Ignore alloca-opt module (it duplicates alloca)
  576. * tests/Makefile.am: Distribute star/quicktest.sh
  577. * tests/star/README: Document quicktest.sh
  578. * tests/star/qucktest.sh: Removed.
  579. * tests/star/quicktest.sh: New file.
  580. 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  581. * NEWS: Updated
  582. * doc/tar.texi: Document auto-detection of compressed archive
  583. formats.
  584. * src/tar.c (decode_options): Ignore --seek if used with --delete.
  585. Delete.c is based on the assumption that the archive is being
  586. actually read, not lseeked.
  587. * tests/delete05.at: New file
  588. * tests/extrac02.at: Fixed typo in AT_SETUP
  589. * tests/Makefile.am: Added delete05.at
  590. * tests/testsuite.at: Likewise.
  591. 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  592. * src/delete.c (delete_archive_members): Bugfix: when
  593. attempting to delete an nonexistent member, the last
  594. blocking_factor blocks were zeroed.
  595. 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
  596. * TODO: Mention sub-second resolution, lutimes, lchmod.
  597. 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
  598. Adjust to recent gnulib changes.
  599. * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
  600. * .cvsignore: Add rmt, rmt/*, rmt/*/*.
  601. * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
  602. charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
  603. localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
  604. ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
  605. xstrdup.c.
  606. * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
  607. localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
  608. pathmax.m4, realloc.m4.
  609. 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  610. * configure.ac: Raised version number to 1.14.91
  611. * scripts/tarcat: New file
  612. * scripts/Makefile.am: Added tarcat
  613. * src/buffer.c (hit_eof): Changed type to boolean
  614. (read_full_records,reading_from_pipe): New variables
  615. (check_compressed_archive,open_compressed_archive): New functions
  616. (open_archive): Autodetect compressed archives and act accordingly.
  617. Set reading_from_pipe. This fixes controversial set of changes
  618. introduced 2004-05-11,2004-03-22.
  619. * src/list.c (tar_checksum): New function
  620. (read_header): Use tar_checksum().
  621. * src/common.h (tar_checksum): New function
  622. * tests/star/README: Updated
  623. * NEWS: Updated
  624. * PORTS: Updated
  625. 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  626. * src/tar.c (decode_options): Fixed -o semantics. Thanks
  627. Jean Delvare <khali@linux-fr.org>
  628. 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  629. * bootstrap: Add localcharset
  630. * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
  631. makefile snippet from localcharset uses '+=' on them.
  632. * src/Makefile.am (LDADD): Add LIBICONV
  633. * src/list.c (decode_header): Set uname/gname to NULL if their
  634. header counterparts are empty
  635. * src/tar.c (options): Use OPTION_NO_TRANS
  636. * src/utf8.c: Use locale_charset() from gnulib
  637. * tests/star/README: Updated
  638. * NEWS: Updated
  639. * TODO: Minor fix
  640. 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  641. * THANKS: Added Bryan Ford
  642. * doc/Makefile.am (.text): Fixed rule
  643. * po/POTFILES.in: Added argp-help.c
  644. 2004-10-04 Bryan Ford <baford@mit.edu>
  645. * src/tar.c: New option --exclude-caches, to exclude
  646. cache directories automatically on archive creation.
  647. Cache directories are directories containing a
  648. standardized tag file, as specified at:
  649. http://www.brynosaurus.com/cachedir/spec.html
  650. * src/common.h: New variable exclude_caches_option.
  651. * src/create.c: New function check_cache_directory(),
  652. called from dump_dir0() if exclude_caches_option is set,
  653. to check for a cache directory tag and exclude the directory
  654. if such a tag is found.
  655. * doc/tar.texi: Updated accordingly.
  656. 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  657. * doc/tar.texi: Minor fix
  658. * src/tar.c (options): Minor fix
  659. 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  660. * TODO: Updated
  661. * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
  662. * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
  663. * src/extract.c: Normalized use of remove_any_file().
  664. * src/misc.c: Likewise.
  665. * src/tar.c (parse_opt): Emit warning if -l option is used.
  666. (show_default_settings): REMOTE_SHELL may be undefined
  667. 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  668. Test suite rewritten in autotest.
  669. * configure.ac: Updated for autotest
  670. * src/tar.c (argp_program_version): Modified.
  671. * tests/Makefile.am: Rewritten for autotest.
  672. * tests/.cvsignore: Updated
  673. * tests/append.at: New file
  674. * tests/atlocal.in: New file
  675. * tests/delete01.at: New file
  676. * tests/delete02.at: New file
  677. * tests/delete03.at: New file
  678. * tests/delete04.at: New file
  679. * tests/extrac01.at: New file
  680. * tests/extrac02.at: New file
  681. * tests/extrac03.at: New file
  682. * tests/extrac04.at: New file
  683. * tests/extrac05.at: New file
  684. * tests/gzip.at: New file
  685. * tests/ignfail.at: New file
  686. * tests/incremental.at: New file
  687. * tests/link01.at: New file
  688. * tests/listed01.at: New file
  689. * tests/listed02.at: New file
  690. * tests/longv7.at: New file
  691. * tests/multiv01.at: New file
  692. * tests/multiv02.at: New file
  693. * tests/multiv03.at: New file
  694. * tests/old.at: New file
  695. * tests/options.at: New file
  696. * tests/recurse.at: New file
  697. * tests/same-order01.at: New file
  698. * tests/same-order02.at: New file
  699. * tests/sparse01.at: New file
  700. * tests/testsuite.at: New file
  701. * tests/version.at: New file
  702. * tests/volume.at: New file
  703. * tests/star/gtarfail.at: New file
  704. * tests/star/gtarfail2.at: New file
  705. * tests/star/multi-fail.at: New file
  706. * tests/star/pax-big-10g.at: New file
  707. * tests/star/ustar-big-2g.at: New file
  708. * tests/star/ustar-big-8g.at: New file
  709. * tests/preset.in: Removed
  710. * tests/before: Removed
  711. * tests/after: Removed
  712. * tests/version.sh: Removed.
  713. * tests/append.sh: Removed.
  714. * tests/delete01.sh: Removed.
  715. * tests/delete02.sh: Removed.
  716. * tests/delete03.sh: Removed.
  717. * tests/delete04.sh: Removed.
  718. * tests/extrac01.sh: Removed.
  719. * tests/extrac02.sh: Removed.
  720. * tests/extrac03.sh: Removed.
  721. * tests/extrac04.sh: Removed.
  722. * tests/extrac05.sh: Removed.
  723. * tests/gzip.sh: Removed.
  724. * tests/incremen.sh: Removed.
  725. * tests/ignfail.sh: Removed.
  726. * tests/link01.sh: Removed.
  727. * tests/listed01.sh: Removed.
  728. * tests/listed02.sh: Removed.
  729. * tests/longv7.sh: Removed.
  730. * tests/multiv01.sh: Removed.
  731. * tests/multiv02.sh: Removed.
  732. * tests/multiv03.sh: Removed.
  733. * tests/old.sh: Removed.
  734. * tests/options.sh: Removed.
  735. * tests/same-order01.sh: Removed.
  736. * tests/same-order02.sh: Removed.
  737. * tests/volume.sh: Removed.
  738. * tests/recurse.sh: Removed.
  739. * tests/sparse01.sh: Removed.
  740. * tests/star/gtarfail.sh: Removed.
  741. * tests/star/gtarfail2.sh: Removed.
  742. * tests/star/multi-fail.sh: Removed.
  743. * tests/star/ustar-big-2g.sh: Removed.
  744. * tests/star/ustar-big-8g.sh: Removed.
  745. * tests/star/pax-big-10g.sh: Removed.
  746. 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  747. * bootstrap: Install genfile.c from paxutils
  748. * tests/genfile.c: Removed. Integrated into
  749. paxutils.
  750. * tests/mksparse.c: Removed. Integrated into
  751. (paxutils) genfile.c
  752. * tests/Makefile.am: Removed mksparse
  753. * tests/sparse01.sh: Use genfile instead of mksparse
  754. 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  755. Started merging with cpio into paxutils. Sources before
  756. this point are tagged alpha-1_14_90
  757. * Makefile.am: Updated for use with paxutils
  758. * README-alpha: Likewise
  759. * bootstrap: Likewise
  760. * configure.ac: Likewise
  761. * lib/Makefile.tmpl: Likewise
  762. * po/POTFILES.in: Likewise
  763. * src/Makefile.am: Likewise
  764. * src/buffer.c: Likewise
  765. * src/common.h: Likewise
  766. * src/compare.c: Likewise
  767. * src/create.c: Likewise
  768. * src/delete.c: Likewise
  769. * src/extract.c: Likewise
  770. * src/incremen.c: Likewise
  771. * src/list.c: Likewise
  772. * src/mangle.c: Likewise
  773. * src/misc.c: Likewise
  774. * src/names.c: Likewise
  775. * src/sparse.c: Likewise
  776. * src/system.c: Likewise
  777. * src/tar.c: Likewise
  778. * src/update.c: Likewise
  779. * src/utf8.c: Likewise
  780. * src/xheader.c: Likewise
  781. * src/system.h: Removed
  782. * src/rmt.c: Removed
  783. * src/rmt.h: Removed
  784. * src/rtapelib.c: Removed
  785. 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  786. * tests/listed02.sh: Do not depend on any particular ordering
  787. of output.
  788. 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  789. * doc/tar.texi: Document the use of -C option in
  790. file lists. Document --seek option.
  791. * configure.ac: New option --with-rmt. New configuration variable
  792. DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
  793. * src/Makefile.am: Install rmt into rmtdir
  794. * src/tar.c (usage): Minor fix.
  795. * NEWS: Updated.
  796. * README: Updated.
  797. 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  798. * configure.ac: Raised version number to 1.14.90
  799. * src/common.h (is_individual_file): New prototype
  800. * src/create.c (dump_file0): Fix bug introduced
  801. 2004-02-21.
  802. * src/names.c (register_individual_file)
  803. (is_individual_file): New functions.
  804. * tests/listed01.sh: Use genfile instead of dd.
  805. * tests/listed02.sh: New file.
  806. * tests/Makefile.am: Added listed02.sh
  807. * NEWS: Updated
  808. 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  809. * src/sparse.c (sparse_add_map): Fixed improper initializations
  810. of sparse_map_size. We assume that whatever number it contains
  811. describes adequately the current size of sparse_map. The only
  812. number we need to reset is sparse_map_avail.
  813. * src/compare.c (verify_volume): Call set_next_block_after
  814. if read_header returns HEADER_FAILURE
  815. Destroy and reinitialize content of current_stat_info and
  816. extended_header after each iteration (bug reported by
  817. John L. Males <jlmales@yahoo.com>).
  818. Issue a warning if the created archive contains some members
  819. whose file names were stripped off their leading prefixes.
  820. This is a temporary fix of the issue reported by Bdale Garbee
  821. <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
  822. <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
  823. * src/names.c (removed_prefixes_p): New function.
  824. * src/buffer.c: When computing write rate do not take
  825. into account the time needed to verify the archive(s).
  826. The bug reported by John L. Males <jlmales@yahoo.com>
  827. (set_start_time,compute_duration): New functions.
  828. (print_total_written): Use the result of compute_duration().
  829. (close_archive): Call compute_duration.
  830. * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
  831. * src/list.c (decode_header): Fixed initialization
  832. of stat_info->is_sparse
  833. * src/tar.c (main): Call set_start_time().
  834. * src/misc.c (unquote_string): Unquote '\a' and '\v'.
  835. Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
  836. * NEWS: Updated
  837. * THANKS: Updated
  838. 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  839. * src/tar.c: Fix copy-n-paste errors in the license
  840. 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  841. * scripts/backup.in: Renamed LIBPATH to LIBDIR.
  842. Use ROOT_FS with -C option. Do not send mail
  843. if ADMINISTRATOR is set to NONE.
  844. * scripts/backup.sh.in (test_root): Append / to
  845. ROOT_FS if it does not already end in it.
  846. * scripts/restore.in: Renamed LIBPATH to LIBDIR.
  847. New option -a (--all). Do not start restore unless
  848. -a or patterns are given.
  849. (restore_fs,restore_files): Fixed use of --listed option.
  850. * doc/tar.texi: Updated
  851. * NEWS: Updated
  852. 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  853. * src/tar.c (find_argp_option): Fixed typo
  854. 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
  855. Merge argp, getopt, xalloc changes from gnulib.
  856. * bootstrap (gnulib_modules): Add xalloc-die.
  857. Remove code to test for patches; we don't have patches now.
  858. Set LC_ALL=C so that file names sort consistently.
  859. Prefer the gnulib copies of gettext.m4, glibc21.m4,
  860. lib-ld.m4, lib-prefix.m4, po.m4 too.
  861. * patches/getopt.diff: Remove; gnulib now works unpatched.
  862. * configure.ac (_getopt_long_only_r): Remove check.
  863. gl_ARGP now does this for us.
  864. * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
  865. xalloc-die.c.
  866. * src/extract.c: Adjust to changes to gnulib xalloc module.
  867. (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
  868. (xalloc_die): New function.
  869. 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  870. * NEWS: Updated
  871. * src/buffer.c (flush_write): Limit filenames
  872. of the members that straddle multivolume archive
  873. boundary to 100 characters.
  874. (flush_read): Use strncmp when comparing multivolume member
  875. names.
  876. * tests/multiv03.sh: New file
  877. * tests/Makefile.am: Added multiv03.sh
  878. 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  879. * src/list.c (read_and): Call decode_header before
  880. calling skip_member()
  881. (skip_member): Use is_sparse field to determine if the
  882. member is a sparse file.
  883. * tests/Makefile.am: Added extrac05.sh
  884. * tests/extrac05.sh: New file
  885. * tests/append.sh: Rearranged leading comments. Added explicit
  886. references to report messages wherever available.
  887. * tests/delete01.sh: Likewise
  888. * tests/delete02.sh: Likewise
  889. * tests/delete03.sh: Likewise
  890. * tests/delete04.sh: Likewise
  891. * tests/extrac01.sh: Likewise
  892. * tests/extrac02.sh: Likewise
  893. * tests/extrac03.sh: Likewise
  894. * tests/extrac04.sh: Likewise
  895. * tests/gzip.sh: Likewise
  896. * tests/ignfail.sh: Likewise
  897. * tests/incremen.sh: Likewise
  898. * tests/link01.sh: Likewise
  899. * tests/listed01.sh: Likewise
  900. * tests/longv7.sh: Likewise
  901. * tests/multiv01.sh: Likewise
  902. * tests/multiv02.sh: Likewise
  903. * tests/old.sh: Likewise
  904. * tests/options.sh: Likewise
  905. * tests/recurse.sh: Likewise
  906. * tests/same-order01.sh: Likewise
  907. * tests/same-order02.sh: Likewise
  908. * tests/sparse01.sh: Likewise
  909. * tests/version.sh: Likewise
  910. * tests/volume.sh: Likewise
  911. 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  912. * bootstrap: Extended --update-po option to take an
  913. optional argument specifying the po file to update.
  914. * src/create.c: Improved compatibility with 1.13.25
  915. * tests/link01.sh: New file.
  916. * tests/Makefile.am: Added link01.sh
  917. 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
  918. Merge from gnulib.
  919. * patches/argp.diff: Remove; no longer needed.
  920. * lib/.cvsignore: Add stat-macros.h.
  921. Remove addext.c, malloc.c, realloc.c.
  922. * src/extract.c: Include <getcwd.h>.
  923. (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
  924. * src/extract.c (make_directories):
  925. FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
  926. * src/misc.c (must_be_dot_or_slash): Likewise.
  927. * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
  928. Likewise.
  929. * src/tar.c (parse_opt): Likewise.
  930. * src/incremen.c (purge_directory): Fix format buffer typos in warning
  931. strings.
  932. * src/tar.c (options): Add missing initializers to pacify gcc.
  933. (decode_options): Remove unused var.
  934. 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
  935. * bootstrap (gnulib_modules): Add getpagesize.
  936. * configure.ac (valloc): Remove check; valloc no longer used.
  937. * lib/.cvsignore: Add getpagesize.h.
  938. * m4/.cvsignore: Add getpagesize.m4.
  939. * src/buffer.c (record_buffer): New var.
  940. (open_archive): Don't use valloc; on older or buggy hosts, you can't
  941. free the result. Use page_aligned_alloc instead.
  942. * src/compare.c (diff_init): Likewise.
  943. * src/buffer.c (open_archive): Record the pointer to be freed
  944. into record_buffer.
  945. (close_archive): Free record_buffer.
  946. * src/common.h (page_aligned_alloc): New decl.
  947. * src/misc.c (quote_n, quote): Remove these redundant functions.
  948. (ptr_align): New function, from coreutils/src/system.h.
  949. (page_aligned_alloc): New function.
  950. * src/system.h (valloc): Remove.
  951. 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
  952. * src/extract.c (extract_archive): Do not report an error
  953. when hard-linking X to X when X exists. Problem reported by
  954. Toby Peterson.
  955. * lib/.cvsignore: Add fchown-stub.c.
  956. 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  957. * NEWS: Updated
  958. * src/common.h (root_device): New global.
  959. (gnu_restore): Renamed to purge_directory().
  960. * src/extract.c (extr_init): Save the device number
  961. of the root device.
  962. (extract_archive): Renamed gnu_restore() to purge_directory().
  963. * src/incremen.c (gnu_restore): Renamed to purge_directory().
  964. Do not attempt to purge the directory if it is on a different
  965. device and one_file_system_option is set.
  966. 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  967. * doc/tar.texi: The actual default for exclude patterns
  968. is --no-anchored. Fixed.
  969. * src/tar.c (options): Likewise.
  970. Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
  971. 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  972. * doc/tar.texi: Fixed several inconsistencies.
  973. * src/tar.c: Fixed docstring for --checkpoint option.
  974. 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  975. * src/buffer.c (seek_archive): New function
  976. * src/common.h (seek_archive): New function
  977. (seekable_archive): New global.
  978. * src/list.c (skip_file): Use seek_archive() if
  979. possible.
  980. * src/tar.c (struct fmttab): Accept 'pax' as alias
  981. for 'posix'
  982. (options): New option -n (--seek).
  983. * src/update.c: Determine type of the archive before
  984. appending to it.
  985. * TODO: Updated.
  986. 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  987. * bootstrap: New option --update-po
  988. * src/tar.c: New option -H (short alias to --format)
  989. * doc/tar.texi: Document -H option
  990. * src/names.c (safer_name_suffix): Fixed bug introduced
  991. 2004-05-11.
  992. 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  993. * bootstrap: Apply patches from patch subdirectory
  994. * patches: New dir
  995. * patches/argp.diff: New file
  996. * patches/getopt.diff: New file
  997. * configure.ac: Check for _getopt_long_only_r and
  998. force using included version of getopt if the function
  999. is not available.
  1000. * src/tar.c: Use argp for command line parsing.
  1001. * src/system.h: Minor formatting fix
  1002. * m4/.cvsignore: Updated
  1003. * lib/.cvsignore: Updated
  1004. * doc/tar.texi: Minor fix.
  1005. * src/extract.c: Fix improper use of 'path' term
  1006. * src/incremen.c: Likewise
  1007. * src/list.c: Likewise
  1008. * src/misc.c: Likewise
  1009. * src/names.c: Likewise
  1010. * src/rmt.h: Likewise
  1011. * src/rtapelib.c: Likewise
  1012. * src/update.c: Likewise
  1013. * src/xheader.c: Likewise
  1014. * tests/star/README: Minor fix
  1015. 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1016. * configure.ac: Raised version number to 1.14.1
  1017. * src/tar.c: Renamed --strip-path to --strip-components
  1018. Changed improper use of _() to ngettext().
  1019. * src/extract.c: Renamed strip_path_option to strip_components_option
  1020. * src/common.h: Likewise.
  1021. * NEWS: Updated.
  1022. * doc/tar.texi: Updated
  1023. 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1024. * src/system.c (sys_child_open_for_uncompress): Do not
  1025. set read_full_records_option: the compressed archive is
  1026. likely not to contain integer number of records. Should
  1027. the user wish to use reblocking, he may always give tar
  1028. -B option. This is a minor improvement over the change
  1029. dated 2004-03-22.
  1030. * src/buffer.c (open_archive): Removed assignment to
  1031. read_full_records_option.
  1032. * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
  1033. as the format argument, rather than a possibly-translated variable
  1034. string. Patch provided by Jim Meyering <jim@meyering.net>
  1035. * src/tar.c (decode_options): Fixed typo in the comment.
  1036. * tests/star/README: Minor correction
  1037. 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1038. * directory: New file. GNU directory entry for tar.
  1039. * doc/Makefile.am: Rewritten. Added rules for generating
  1040. documentation for the project's website.
  1041. * doc/.cvsignore: Updated
  1042. * doc/index.html.in: New file.
  1043. 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1044. * configure.ac: Raised version number to 1.14
  1045. * NEWS: Updated.
  1046. * tests/after: Added copyleft statement
  1047. * tests/before: Added copyleft statement
  1048. * tests/preset.in: Added copyleft statement
  1049. Tar 1.14 is released. Sources up to this point are tagged
  1050. release_1_14
  1051. 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1052. * configure.ac: Fixed prerequisite headers for sys/buf.h
  1053. (needed on FreeBSD)
  1054. * src/system.h: Likewise.
  1055. * tests/after (compare): Fixed argument quoting under eval
  1056. * tests/before: Quote TAR_ARCHIVE_FORMATS
  1057. 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1058. * NEWS: Updated
  1059. * README: Updated
  1060. * PORTS: Updated
  1061. * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
  1062. DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
  1063. the pathname of the rmt utility.
  1064. New option --enable-backup-scripts.
  1065. * doc/tar.texi: Updated
  1066. * scripts/Makefile.am: Install the scripts only if requested
  1067. by the configure.
  1068. * scripts/backup.in: Fixed --version output.
  1069. Fixed initialization of the listing files and printing
  1070. the time of the last previous level dump.
  1071. * scripts/restore.in: Fixed --version output.
  1072. * src/Makefile.am (localedir.h rule): Generate correct
  1073. DEFAULT_RMT_COMMAND variable.
  1074. * src/common.h (rmt_command_option): New variable.
  1075. * src/list.c (read_and): Print block number before
  1076. issuing 'Skipping to next header' diagnostics, if
  1077. requested by block_number_option.
  1078. * src/rtapelib.c: Use rmt_command_option instead of
  1079. hardcoded "/etc/rmt".
  1080. * src/tar.c: New option --rmt-command.
  1081. (decode_options): Handle --rmt-command. Initialize
  1082. rmt_command_option to DEFAULT_RMT_COMMAND.
  1083. 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1084. * doc/tar.texi: Further update.
  1085. 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1086. * configure.ac: Minor fix
  1087. * scripts/Makefile.am: Updated
  1088. * scripts/backup-specs: Updated
  1089. * scripts/backup.in: Minor fixes
  1090. * scripts/backup.sh: Removed
  1091. * scripts/backup.sh.in: New file. Source for backup.sh
  1092. * scripts/restore.in: New file
  1093. * scripts/.cvsignore: Updated
  1094. * scripts/WARNING: Removed
  1095. * doc/tar.texi: Updated
  1096. * NEWS: Updated
  1097. 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1098. * src/names.c (name_gather): Bugfix: Honor single -C with
  1099. --same-order.
  1100. * tests/same-order01.sh: New file
  1101. * tests/same-order02.sh: New file
  1102. * tests/Makefile.am: Updated
  1103. * tests/append.sh: Added copyleft header
  1104. * tests/delete01.sh: Likewise
  1105. * tests/delete02.sh: Likewise
  1106. * tests/delete04.sh: Likewise
  1107. * tests/extrac01.sh: Likewise
  1108. * tests/extrac02.sh: Likewise
  1109. * tests/extrac03.sh: Likewise
  1110. * tests/extrac04.sh: Likewise
  1111. * tests/gzip.sh: Likewise
  1112. * tests/ignfail.sh: Likewise
  1113. * tests/incremen.sh: Likewise
  1114. * tests/multiv01.sh: Likewise
  1115. * tests/old.sh: Likewise
  1116. * tests/options.sh: Likewise
  1117. * tests/recurse.sh: Likewise
  1118. * tests/version.sh: Likewise
  1119. * tests/volume.sh: Likewise
  1120. * tests/star/gtarfail.sh: Likewise
  1121. * tests/star/gtarfail2.sh: Likewise
  1122. * tests/star/multi-fail.sh: Likewise
  1123. * tests/star/pax-big-10g.sh: Likewise
  1124. * tests/star/qucktest.sh: Likewise
  1125. * tests/star/ustar-big-2g.sh: Likewise
  1126. * tests/star/ustar-big-8g.sh: Likewise
  1127. * doc/.cvsignore: Updated
  1128. 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1129. * configure.ac: Check whether date accepts +format argument
  1130. (for backup scripts).
  1131. * scripts/level-0: Removed
  1132. * scripts/level-1: Removed
  1133. * scripts/weekly.new: Removed
  1134. * scripts/dump-remind: Removed
  1135. * scripts/backup.in: New file
  1136. * scripts/backup.sh: New file
  1137. * scripts/dump-remind.in: New file
  1138. * scripts/backup-specs: Updated
  1139. * scripts/Makefile.am: Updated for new directory contents.
  1140. * scripts/.cvsignore: Updated
  1141. 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1142. * TODO: Updated
  1143. * doc/tar.texi: Updated
  1144. * src/tar.c: --utc implies -vv
  1145. 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1146. * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
  1147. does not define it if it fails to find iconv.h.
  1148. 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1149. * bootstrap: Use gnulib-tool to generate lib/Makefile.am
  1150. and parts of configure.ac
  1151. * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
  1152. * lib/Makefile.am: Removed
  1153. * lib/Makefile.tmpl: New file.
  1154. * lib/.cvsignore: Updated
  1155. * m4/.cvsignore: Updated
  1156. * src/xheader.c: Include stpcpy.h
  1157. * src/create.c: Produce an error, not warning, if the
  1158. filename is too long.
  1159. * tests/longv7.sh: Synchronized with the recent changes.
  1160. 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1161. * configure.ac: Fixed test for iconv_t
  1162. * src/rmt.h: Bugfix by Jürgen Weigert
  1163. * THANKS: Add Jürgen Weigert
  1164. * tests/star/README: Fixed typo
  1165. 2004-04-04 Paul Eggert <eggert@twinsun.com>
  1166. Merge getdate documentation changes from coreutils.
  1167. * doc/getdate.texi: Update from coreutils CVS.
  1168. * doc/tar.texi: Fix getdate menu to match getdate.texi's.
  1169. Merge recent gnulib changes, and remove some lint.
  1170. Improve support for nanosecond-resolution time stamps.
  1171. * bootstrap: Add gettime, timespec modules.
  1172. * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
  1173. * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
  1174. timespec.h): Add.
  1175. * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
  1176. * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
  1177. st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
  1178. * src/common.h (newer_mtime_option): Now a struct timespec, not
  1179. time_t. All uses changed.
  1180. (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
  1181. * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
  1182. * src/incremen.c (scan_path): Likewise.
  1183. * src/list.c (read_and): Likewise.
  1184. * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
  1185. whether newer_mtime_option is initialized.
  1186. * src/tar.c (decode_options): Likewise.
  1187. * src/tar.c (decode_options): Adjust to new signature for get_date.
  1188. * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
  1189. result of safe_read, full_write, and similar functions.
  1190. Detect safe_read error by comparing to SAFE_READ_ERROR;
  1191. detect full_write error by comparing to 0.
  1192. All uses changed.
  1193. * src/common.h (write_error_details, sys_write_archive_buffer):
  1194. Likewise.
  1195. * src/misc.c (write_error_details): Likewise.
  1196. * src/rmt.c (main): Likewise.
  1197. * src/rmt.h (rmt_read__, rmt_write__): Likewise.
  1198. * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
  1199. * src/sparse.c (sparse_scan_file, sparse_dump_region,
  1200. check_sparse_region, check_data_region): Likewise.
  1201. * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
  1202. sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
  1203. * src/update.c (append_file): Likewise.
  1204. * src/buffer.c (clear_read_error_count): Use explicit (void)
  1205. to indicate a function with no arguments.
  1206. * src/create.c (check_links): Likewise.
  1207. * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
  1208. sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
  1209. sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
  1210. sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
  1211. Likewise.
  1212. * src/utf8.c (get_input_charset): Likewise.
  1213. * src/xheader.c (xheader_ghdr_name, xheader_write_global,
  1214. xheader_decode_global, extended_header_init): Likewise.
  1215. * tests/mksparse.c (usage): Likewise.
  1216. * src/buffer.c (new_volume): Rename local variables to avoid
  1217. shadowing warnings.
  1218. * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
  1219. sparse_file_p, sparse_member_p, sparse_fixup_header,
  1220. sparse_dump_file, sparce_extract_file, sparse_skip_file,
  1221. sparse_diff_file): Likewise.
  1222. * src/compare.c (diff_archive): Likewise.
  1223. * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
  1224. dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
  1225. Likewise.
  1226. * src/extract.c (repair_delayed_set_stat): Likewise.
  1227. * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
  1228. Likewise.
  1229. * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
  1230. tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
  1231. sparse_dump_file, sparse_file_p, sparse_member_p,
  1232. sparse_fixup_header, sparse_extract_file, sparse_skip_file,
  1233. check_data_region, sparse_diff_file): Likewise.
  1234. * src/system.c (sys_stat_nanoseconds): Likewise.
  1235. * src/xheader.c (xheader_format_name): Likewise.
  1236. * src/common.h (enum old_files): Remove comma before }; not portable.
  1237. * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
  1238. * src/rmt.c (usage): Likewise.
  1239. * src/xheader.c (xheader_set_single_keyword): Likewise.
  1240. * tests/genfile.c (usage): Likewise.
  1241. * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
  1242. to die.
  1243. * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
  1244. some gcc warnings.
  1245. * src/names.c (uname_to_uid, gname_to_gid): Likewise.
  1246. * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
  1247. langtab.charset, charset_lookup): Likewise.
  1248. * src/common.h (name_init): Remove unused args. All callers changed.
  1249. * src/names.c (name_init): Likewise.
  1250. * src/common.h (usage, xheader_write, xheader_write_global,
  1251. sys_reset_uid_gid): New decls.
  1252. * src/compare.c (report_difference, process_noop): Add
  1253. __attribute__ ((unused)) for unused attributes.
  1254. * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
  1255. Likewise.
  1256. * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
  1257. gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
  1258. path_coder, size_coder, uid_coder, uname_coder,
  1259. sparse_numblocks_coder): Likewise.
  1260. * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
  1261. dump_file0): Now static.
  1262. * src/utf8.c (charset_lookup): Likewise.
  1263. * src/xheader.c (xheader_protected_pattern_p,
  1264. xheader_protected_keyword_p, xheader_set_single_keyword,
  1265. xheader_keyword_deleted_p, xheader_keyword_override_p,
  1266. xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
  1267. Likewise.
  1268. * tests/genfile.c (usage): Likewise.
  1269. * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
  1270. Likewise.
  1271. * src/create.c (hash_link): Rewrite to avoid cast.
  1272. * src/extract.c (file_newer_p): Use parameter, not global var.
  1273. * src/misc.c (write_error_details): Likewise.
  1274. * src/extract.c (prepare_to_extract): Remove directory arg; not
  1275. used. All callers changed.
  1276. * src/misc.c (close_fatal): Remove; not used.
  1277. * src/system.c (sys_utimes): Likewise.
  1278. * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
  1279. * src/rmt.c (main): Update copyright date to 2004.
  1280. * src/tar.c (decode_options): Likewise.
  1281. * src/rtapelib.c (get_status_string): Don't lose errno when
  1282. skipping the error messages.
  1283. (get_status): Report an error if atol returns a negative number.
  1284. * src/utf8.c (struct langtab, langtab, charset_lookup,
  1285. get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
  1286. definitions.
  1287. (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
  1288. Use macros, not definitions, to avoid type clashes with system
  1289. headers.
  1290. (charset_lookup): Local var is now auto, not static.
  1291. (utf8_convert): Use ICONV_CONST instead of const, to avoid
  1292. type clashes.
  1293. * src/utf8.c (langtab): Initialize all elements of struct, to
  1294. avoid gcc warning.
  1295. * src/xheader.c (xhdr_tab): Likewise.
  1296. * src/xheader.c: Include fnmatch.h, since we use fnmatch.
  1297. * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
  1298. 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
  1299. * NEWS: Updated
  1300. * configure.ac: Raised version number to 1.13.94
  1301. * src/system.h: Protect inclusion of <sys/time.h>
  1302. by ifdef.
  1303. Declare time() if HAVE_DECL_TIME is 0
  1304. * tests/.cvsignore: Added mksparse
  1305. * tests/sparse01.sh: New file
  1306. * tests/multiv02.sh: New file
  1307. * tests/Makefile.am: Add sparse01.sh and multiv02.sh
  1308. * tests/longv7.sh: Added missing call to 'after'
  1309. * src/common.h: Added missing prototypes
  1310. * src/compare.c (diff_archive): Use is_sparse member
  1311. instead of GNUTYPE_SPARSE.
  1312. * src/create.c: Removed unused variables
  1313. * src/extract.c (extract_archive): Use sparse_member_p instead
  1314. of GNUTYPE_SPARSE.
  1315. Removed unused variables
  1316. * src/list.c (decode_header): Use sparse_fixup_header to correct
  1317. the st_size value.
  1318. (print_header): Do not rely on GNUTYPE_SPARSE type.
  1319. Use st->stat.st_size to print real file size.
  1320. (skip_member): Assign stat_info.file_name to save_name. This fixes
  1321. bug reported by Mads Martin Joergensen <mmj@suse.de>
  1322. Use sparse_skip_file() to skip sparse members.
  1323. * src/rtapelib.c: include "common.h"
  1324. * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
  1325. (struct tar_sparse_optab.fixup_header): New member
  1326. (tar_sparse_member_p): New function.
  1327. (tar_sparse_init): Return true if decode_header is not provided
  1328. (tar_sparse_fixup_header)
  1329. (sparse_member_p,sparse_fixup_header)
  1330. (sparse_skip_file)
  1331. (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
  1332. (star_fixup_header, pax_sparse_member_p): New function
  1333. (pax_decode_header): Remove
  1334. * src/system.h: Include <sys/time.h> and <utime.h> when available
  1335. * src/tar.c (usage): Prototype moved to common.h
  1336. * src/tar.h (struct tar_stat_info.is_sparse): New member
  1337. * src/utf8.c (utf8_convert): Changed prototype
  1338. (get_input_charset): Removed unused variable
  1339. * src/xheader.c: include <fnmatch.h>
  1340. (size_decoder): Assign to both st->archive_file_size and
  1341. st->stat.st_size.
  1342. (st->stat.st_size): Assign to st->stat.st_size
  1343. (sparse_numbytes_decoder): Removed unused variable
  1344. * src/.cvsignore: Added .gdbinit
  1345. * THANKS: Added Mads Martin Joergensen
  1346. 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1347. * src/create.c (write_long_name): Do not allow more than
  1348. NAME_FIELD_SIZE-1 characters in a file name for V7 format
  1349. archives.
  1350. * tests/longv7.sh: New file.
  1351. * tests/Makefile.am: Add longv7.sh
  1352. 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1353. * src/buffer.c (open_archive): Clear read_full_records_option
  1354. if reading from a pipe.
  1355. (short_read): Display warning about the deduced record size
  1356. if version > 1
  1357. * tests/star/pax-big-10g.sh: Updated to match the above changes.
  1358. * tests/star/ustar-big-2g.sh: Likewise.
  1359. * tests/star/ustar-big-8g.sh: Likewise.
  1360. * configure.ac: Added gl_FUNC_STRTOULL
  1361. * src/create.c (start_header): Check for GNU_FORMAT
  1362. if incremental_option is set.
  1363. * src/xheader.c (to_decimal): New function.
  1364. (xheader_format_name): Use to_decimal() instead of snprintf.
  1365. * tests/listed01.sh: Use genfile instead of dd
  1366. * tests/multiv01.sh: Likewise.
  1367. 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1368. * src/list.c (read_and): Stop processing the archive after
  1369. encountering a single zero record. Many old archives contain
  1370. arbitrary garbage after it.
  1371. The warning is issued anyway.
  1372. 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1373. * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
  1374. conversion buffer was not null terminated. Fix provided
  1375. by Leland Lucius <llucius@tiny.net>
  1376. * THANKS: Added Leland Lucius
  1377. * src/utf8.c (utf8_convert): Indentation fix.
  1378. 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1379. * src/buffer.c (flush_read): Bugfix: the
  1380. condition at line 714 included
  1381. || (status > 0 && !read_full_records_option)
  1382. which is grossly wrong, since even if new_volume() below succeeds,
  1383. the subsequent call to rmtread will overwrite the chunk of data
  1384. already read in the buffer and thus spoil everything.
  1385. * src/system.c (sys_child_open_for_uncompress): Minor stylistic
  1386. fix.
  1387. * tests/star/multi-fail.sh: New test.
  1388. * tests/Makefile.am: Added multi-fail.sh
  1389. * tests/star/README: Updated
  1390. 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1391. * NEWS: Updated
  1392. * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
  1393. * src/common.h (utc_option): new global
  1394. (enum old_files.KEEP_NEWER_FILES): New element
  1395. * src/extract.c: Handle --keep-newer-files option
  1396. * src/list.c (tartime): Print UTC if --utc was given.
  1397. * src/tar.c: New options: --utc and keep-newer-files
  1398. * tests/Makefile.am: Added new tests
  1399. * tests/after: Rewritten
  1400. * tests/before: Rewritten
  1401. * tests/preset.in: Rewritten
  1402. * tests/delete03.sh: Accommodate for the new testsuite logic
  1403. * tests/gzip.sh: Likewise
  1404. * tests/incremen.sh: Likewise
  1405. * tests/listed01.sh: Likewise
  1406. * tests/multiv01.sh: Likewise
  1407. * tests/old.sh: Likewise
  1408. * tests/options.sh: Likewise
  1409. * tests/version.sh: Likewise
  1410. * tests/volume.sh: Likewise
  1411. * tests/star: New directory
  1412. * tests/star/README: New file
  1413. * tests/star/gtarfail.sh: New file
  1414. * tests/star/gtarfail2.sh: New file
  1415. * tests/star/pax-big-10g.sh: New file
  1416. * tests/star/qucktest.sh: New file
  1417. * tests/star/ustar-big-2g.sh: New file
  1418. * tests/star/ustar-big-8g.sh: New file
  1419. 2004-02-26 Paul Eggert <eggert@twinsun.com>
  1420. * doc/tar.texi (dircategory Individual utilities): Append period,
  1421. as suggested by Karl Berry.
  1422. 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1423. * src/list.c (decode_header): Call xheader_decode before
  1424. the assignment to current_stat_info.archive_file_size.
  1425. 2004-02-23 Paul Eggert <eggert@twinsun.com>
  1426. * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
  1427. 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1428. 1.13.93 released.
  1429. * NEWS: Updated
  1430. * tests/before: Move testing of the prerequisite archive formats
  1431. to the separate function 'prereq'. Do not expect any arguments
  1432. * tests/delete03.sh: Use prereq() instead of passing arguments
  1433. to 'before'.
  1434. * tests/incremen.sh: Likewise.
  1435. * tests/listed01.sh: Likewise.
  1436. * tests/multiv01.sh: Likewise.
  1437. 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1438. Added UTF-8 support. Finished global extended header
  1439. support.
  1440. * NEWS: Minor fix
  1441. * configure.ac: Detect libiconv
  1442. * src/utf8.c: New file. Conversions to and from utf-8.
  1443. * src/Makefile.am: Added utf8.c
  1444. * src/create.c (write_header_name) In pax format, use
  1445. "path" keyword if the file name is not ASCII
  1446. (start_header): Likewise for uname and gname.
  1447. * src/list.c: Decode encountered global headers.
  1448. * src/xheader.c: Use keywords from the global
  1449. headers.
  1450. Correctly handle UTF-8 conversions.
  1451. (xheader_list_destroy): New function.
  1452. (xheader_set_single_keyword,xheader_set_keyword_equal): Added
  1453. missing gettext markers
  1454. (decode_record): Rewritten using caller-provided handler and
  1455. data closure.
  1456. * tests/listed01.sh: Give credit to Andreas Schuldei.
  1457. 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1458. * src/create.c (dump_file0): The conditional at line
  1459. 1296 prevented incremental backups on individual files
  1460. from working, as reported by Andreas Schuldei
  1461. <andreas@schuldei.org>.
  1462. This is due to the condition
  1463. (0 < top_level || !incremental_option)
  1464. Removing it makes incremental backups work for individual
  1465. files as well as for directories. On the other hand, it does
  1466. not affect other functionality, as shown by the reasoning below:
  1467. To begin with, the two parts of this condition are mutually
  1468. superfluous, because
  1469. 1) when top_level < 0, incremental_option == 1
  1470. so the condition yields false
  1471. 2) when top_level >= 0, incremental_option == 0
  1472. so the condition yields true.
  1473. In other words, it is completely equivalent to
  1474. (!incremental_option)
  1475. Now, let's consider the effect of its removal. There are two cases:
  1476. 1) when incremental_option==1
  1477. This means incremental backup in progress. In this case dump_file
  1478. is invoked only for directories or for files marked with 'Y' by
  1479. get_directory_contents. The latter are those that did not meet the
  1480. condition in incremen.c:242, which is exactly the same condition
  1481. as this at create.c:1296. So, for these files the check
  1482. (!incremental_option) is useless, since the rest of the
  1483. conditional will yield false anyway. On the other hand, if
  1484. dump_file is invoked on a directory, the conditional will yield
  1485. false due to !S_ISDIR assertion, so these will be processed as usual.
  1486. Thus, for this case the extra condition (!incremental_option) is
  1487. irrelevant, and its removal won't alter the behavior of tar,
  1488. *except* that it will enable incremental backups on individual
  1489. files, which is the wanted effect.
  1490. 2) when incremental_option==0
  1491. In this case the condition yields true and its removal does not
  1492. affect the functionality.
  1493. * THANKS: Updated
  1494. * configure.ac: Raised patchlevel to 93
  1495. * src/incremen.c: Minor stylistic fixes.
  1496. * tests/listed01.sh: New test. Check listed incremental
  1497. backups on individual files.
  1498. * tests/Makefile.am: Added listed01.sh
  1499. 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1500. * src/common.h (simple_finish_header,start_private_header): New
  1501. declarations
  1502. (xheader_ghdr_name): Changed declaration
  1503. * src/create.c (start_private_header): Removed static qualifier.
  1504. (write_extended): Removed superfluous last argument. Use
  1505. xheader_write()
  1506. (simple_finish_header): New function.
  1507. (finish_header): Use simple_finish_header() to break recursive
  1508. dependency between this function and write_extended().
  1509. * src/tar.c (assert_format): Do not bail out if several
  1510. --format arguments are given. This is a common case when
  1511. TAR_OPTIONS are used.
  1512. (decode_options): New option --show-defaults displays the
  1513. compiled-in defaults.
  1514. Use POSIX format if no --format option was given and
  1515. --pax-option was specified.
  1516. Do not allow to use --pax-option unless the archive format is
  1517. set to POSIX (or reading subcommand is requested).
  1518. * src/update.c (update_archive): Write global extended header if
  1519. constructed.
  1520. * src/xheader.c (xheader_format_name): Bugfix.
  1521. (xheader_xhdr_name): Changed the default extended header name
  1522. to '%d/PaxHeaders.%p/%f', as POSIX requires.
  1523. (xheader_ghdr_name): Removed unused argument.
  1524. (xheader_write,xheader_write_global): New function.
  1525. (xheader_decode): Modified to honor overrides whatever
  1526. the current archive format is.
  1527. * src/delete.c (delete_archive_members): Call xheader_decode
  1528. unconditionally.
  1529. * src/list.c (decode_header): Likewise.
  1530. * src/incremen.c (sort_obstack): Fixed typo in the comment
  1531. * doc/tar.texi: Document new default for extended
  1532. header names.
  1533. * tests/before: Accept an optional list of allowed archive
  1534. formats. Exit with the status 77 if the current archive
  1535. format does not match any of them.
  1536. * tests/delete03.sh: Require gnu, oldgnu or posix format
  1537. * tests/incremen.sh: Require gnu or oldgnu format
  1538. * tests/multiv01.sh: Likewise
  1539. 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1540. * doc/tar.texi (Option Summary): Documented --pax-option
  1541. * src/tar.c: Likewise.
  1542. * NEWS: Likewise.
  1543. * src/create.c (to_chars): Added a comment.
  1544. * src/tar.h: Comment to GNU_FORMAT
  1545. 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1546. * README: Updated
  1547. * configure.ac: Added stpcpy
  1548. * bootstrap: Likewise
  1549. * lib/Makefile.am: Likewise
  1550. * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
  1551. functions
  1552. * src/create.c (write_extended): Call xheader_xhdr_name
  1553. instead of using hardcoded "././@PaxHeader" name.
  1554. * src/tar.c: New option --pax-option (equivalent to -o option
  1555. of pax).
  1556. * src/xheader.c: Implement pax -o option. Fixed misleading
  1557. heading comment (introduced 2003-09-02).
  1558. * src/incremen.c: Minor fixes
  1559. * m4/.cvsignore: Updated
  1560. 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1561. * src/incremen.c: Removed accumulator stuff in favor of obstack.
  1562. (get_directory_contents): Split into two functions
  1563. * src/update.c: Minor changes
  1564. * doc/tar.texi: Fixed typo
  1565. 2004-02-15 Paul Eggert <eggert@twinsun.com>
  1566. Fix Debian bug 230872, originally reported by Jeff King in
  1567. <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
  1568. * doc/tar.texi (posix compliance): Remove. The whole section
  1569. was a misunderstanding of what POSIXLY_CORRECT is supposed to
  1570. mean. The GNU Coding Standards says that POSIXLY_CORRECT
  1571. is for disabling extensions that are incompatible with POSIX:
  1572. it is not for disabling compatible extensions. All references
  1573. to this section removed.
  1574. (posix): This format is created only if the posix format is
  1575. specified; it is no longer created if gnu format is specified
  1576. and POSIXLY_CORRECT is set.
  1577. * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
  1578. POSIX does not specify the behavior of tar, so we should
  1579. not worry about POSIXLY_CORRECT here.
  1580. 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1581. * Makefile.am: Removed m4
  1582. * configure.ac: Require automake-1.8/autoconf-2.59. Removed
  1583. m4/Makefile.
  1584. * README-alpha: Updated
  1585. * bootstrap: Updated TP URL, improved help output. Default
  1586. to :ext:anoncvs and set CVS_RSH, unless already set.
  1587. * m4/Makefile.am: Removed
  1588. 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1589. * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
  1590. Use $option instead of $1 so all options will be parsed.
  1591. 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1592. Started rewriting buffer.c ...
  1593. * bootstrap: New option --no-po
  1594. * src/buffer.c (new_volume,check_label_pattern): Changed return type.
  1595. (time_to_start_writing): Changed data type
  1596. (file_to_switch_to): Removed. Variable never assigned to.
  1597. (open_archive) Moved option compatibility checks to tar.c
  1598. Other minor changes.
  1599. * src/common.h (maybe_backup_file): Changed return type
  1600. * src/misc.c: Likewise.
  1601. * src/create.c: Updated invocations of safer_name_suffix
  1602. * src/extract.c: Likewise
  1603. * src/delete.c: Updated assignment to write_archive_to_stdout
  1604. * src/tar.c (decode_options): More option compatibility checks
  1605. (moved from buffer.c)
  1606. * src/update.c (time_to_start_writing): Changed data type.
  1607. * tests/recurse.sh: New test case.
  1608. * tests/mksparse.c: New file.
  1609. * tests/Makefile.am: Added recurse.sh and mksparse.c
  1610. 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1611. * src/sparse.c (sparse_diff_file): Bugfix. Thanks
  1612. Martin Simmons for the patch.
  1613. * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
  1614. <pius@pld-linux.org> for the patch.
  1615. 2003-12-26 Paul Eggert <eggert@twinsun.com>
  1616. Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
  1617. and translation website.
  1618. * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
  1619. intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
  1620. isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
  1621. a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
  1622. files are replaced by autoreconf. Also, there seems to be a bug
  1623. in gettext/autoconf/automake if we try to omit these files after
  1624. autoreconf has replaced them, even though the gettext manual says
  1625. they're optional. So give up and just include them for now, even
  1626. though they make 'configure' longer and slower.
  1627. Change translation URL from
  1628. <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
  1629. <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
  1630. accommodate translator website revamp.
  1631. Fail if autoreconf fails.
  1632. * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
  1633. signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
  1634. ignore files now supplied by gettext 0.13.1.
  1635. 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1636. Synchronized with the backup repository on Mirddin
  1637. 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1638. * configure.ac: Check for varios members of struct stat
  1639. that may represent file modification times with a subsecond
  1640. precision.
  1641. Check for utimes (for future use)
  1642. * src/buffer.c (short_read): Issue a warning on short reads.
  1643. * src/common.h (sys_stat_nanoseconds): New function
  1644. * src/create.c (dump_file0): Use sys_stat_nanoseconds().
  1645. * src/list.c (read_and): Treat only two successive zero
  1646. filled blocks as an EOF indicator. Issue a warning if
  1647. a single one is encountered.
  1648. * src/system.c (sys_stat_nanoseconds): New function
  1649. * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
  1650. members.
  1651. * src/xheader.c (code_time,decode_time): Support for subsecond
  1652. precision.
  1653. (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
  1654. (mtime_coder,mtime_decoder): Update invocations of code_time and
  1655. decode_time.
  1656. (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
  1657. (sparse_numblocks_decoder,sparse_offset_decoder)
  1658. (sparse_numbytes_decoder): Updated
  1659. 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1660. * src/names.c (safer_name_suffix): Reverted change made
  1661. 2003-11-14. Reason: Discussion with Paul Eggert and
  1662. Jean-Louis Martineau. See also ChangeLog entry from
  1663. 1999-08-14.
  1664. * tests/delete03.sh: Likewise.
  1665. * tests/extrac04.sh: Likewise.
  1666. * tests/multiv01.sh: Likewise.
  1667. 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1668. * src/incremen.c (write_directory_file): Use sys_truncate
  1669. * src/list.c (print_header): Use archive_file_size member
  1670. when printing real file size.
  1671. * src/sparse.c (sparse_scan_file): Correctly handle files with
  1672. a hole at the end.
  1673. (sparse_dump_region,sparse_extract_region): Allow for zero size
  1674. trailing blocks
  1675. 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1676. * configure.ac: Raised version number to 1.13.92
  1677. * src/list.c (decode_header): Discern between pax and ustar
  1678. formats
  1679. Initialize current_stat_info.archive_file_size.
  1680. NOTE: Modifications from this date on are temporarily
  1681. stored on local CVS on mirddin. This repository will
  1682. be synchronized with Savannah as soon as the latter
  1683. becomes operational again.
  1684. 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1685. * TODO: Updated
  1686. * src/sparse.c: Initial implementation of GNU/pax sparse
  1687. file format.
  1688. * src/common.h (xheader_store): Changed prototype.
  1689. * src/create.c: Update calls to xheader_store
  1690. * src/extract.c (extract_archive): Check reported size vs.
  1691. archive file size to determine if we have to do with a
  1692. sparse file.
  1693. * src/tar.c (usage): Cleaned up the sample argument to --newer
  1694. option.
  1695. (decode_options): Allow --sparse for POSIX_FORMAT archives.
  1696. * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
  1697. extra argument
  1698. Implemented GNU.sparse.* keywords.
  1699. 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1700. * configure.ac: Check for setlocale. Thanks Bruno Haible for
  1701. reporting.
  1702. 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1703. * src/create.c (write_gnu_long_link): Use oldgnu
  1704. magic with @LongLink blocks.
  1705. 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1706. * src/tar.h: Support for star sparse format.
  1707. * src/sparse.c: Likewise.
  1708. 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1709. * src/sparse.c (sparse_diff_file): New function
  1710. * src/common.h (sys_compare_uid,sys_compare_gid): New functions
  1711. (sys_compare_uid_gid): Removed.
  1712. (sys_compare_links,report_difference): Changed prototype
  1713. (sparse_diff_file): New function
  1714. * src/system.c (sys_compare_uid,sys_compare_gid): New functions
  1715. (sys_compare_uid_gid): Removed.
  1716. (sys_compare_links): Changed declaration
  1717. * src/compare.c (diff_archive): Use sparse_diff_file.
  1718. 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1719. Rewritten sparse file handling.
  1720. * src/sparse.c: New file. Provides a universal framework
  1721. for various methods for sparse files handling.
  1722. * src/Makefile.am: Added sparse.c
  1723. * src/common.h (struct sp_array,sparsearray,sp_array_size)
  1724. (init_sparsearray,fill_in_sparse_array): Removed
  1725. (enum dump_status): New data type
  1726. (pad_archive,close_diag,open_diag,read_diag_details)
  1727. (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
  1728. functions.
  1729. (sparse_file_p,sparse_dump_file,sparse_extract_file): New
  1730. functions.
  1731. (print_header): Changed prototype declaration.
  1732. * src/tar.h (struct sp_array): Declaration from common.h
  1733. (struct tar_stat_info): New members archive_file_size,
  1734. sparse_map_avail,sparse_map.
  1735. * src/create.c: Major rewrite.
  1736. * src/extract.c: Use new sparse file interface.
  1737. * src/compare.c (diff_sparse_files): Temporary placeholder.
  1738. * src/buffer.c: Minor changes
  1739. * src/tar.c: Likewise.
  1740. * src/list.c: Likewise.
  1741. * src/misc.c (close_diag,open_diag,read_diag_details)
  1742. (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
  1743. diagnostics functions.
  1744. * src/incremen.c: Use new diagnostics functions.
  1745. * src/names.c: Likewise.
  1746. 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1747. * configure.ac: Fixed check for setsockopt
  1748. * src/create.c: Do not zero-terminate name field if
  1749. the name is exactly 100 characters long.
  1750. (write_ustar_long_name): Fixed cheking for unsplittable
  1751. names.
  1752. 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1753. * src/create.c (start_header): Removed debugging hook
  1754. (dump_file): Fixed handling of linkname field.
  1755. * src/names.c (safer_name_suffix): If the input
  1756. file name ends with a slash, output one should do so
  1757. as well.
  1758. * doc/tar.texi: Documented --format=ustar
  1759. 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1760. * src/tar.h (archive_format): USTAR_FORMAT: New type.
  1761. * src/create.c: Added POSIX.1-1988 support.
  1762. * src/names.c (safer_name_suffix): Skip leading ./
  1763. * src/tar.c: New option --format=ustar forces
  1764. POSIX.1-1988 archive format.
  1765. * tests/delete03.sh: Updated.
  1766. * tests/extrac04.sh: Updated.
  1767. * tests/multiv01.sh: Updated.
  1768. 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1769. * src/list.c (read_and): Initialize current_stat_info
  1770. and extended_header at the start of the loop.
  1771. * src/names.c (all_names_found): Check if the argument
  1772. contains valid filename. Fixes coredump on `not_a_tar_file'
  1773. * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
  1774. (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
  1775. Fixes `pax-big-10g' bug.
  1776. 2003-11-12 Paul Eggert <eggert@twinsun.com>
  1777. Fix some C compatibility bugs reported by Joerg Schilling.
  1778. * src/common.h (stripped_prefix_len): Fix misspelling
  1779. "stripped_path_len" in declaration.
  1780. * src/rmt.c (main): Use "return FOO;" rather than
  1781. "exit (FOO);"; we no longer have to worry about
  1782. pre-ANSI hosts that mishandled returned values from "main".
  1783. * src/tar.c (main): Likewise. This avoids warnings on some
  1784. compilers.
  1785. * src/system.c: Include signal.h, for 'kill'.
  1786. * src/system.h (DEV_BSIZE): Remove.
  1787. (DEFAULT_ST_BLKSIZE): New macro.
  1788. (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
  1789. * src/tar.c (enum): Remove comma just before }.
  1790. 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1791. * src/list.c (decode_header): Initialize st_atime and
  1792. st_ctime.
  1793. 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1794. * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
  1795. Bunk <bunk@fs.tum.de> for reporting.
  1796. * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
  1797. <martin@xemacs.org> for spotting.
  1798. 2003-11-04 Paul Eggert <eggert@twinsun.com>
  1799. * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
  1800. C99 require this.
  1801. 2003-10-26 Paul Eggert <eggert@twinsun.com>
  1802. * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
  1803. Bug reported by Christian Weisgerber.
  1804. 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1805. * AUTHORS: Updated
  1806. * NEWS: Updated
  1807. * src/tar.c (decode_options): Removed superfluous archive format
  1808. check
  1809. * doc/tar.texi: Documented new features.
  1810. 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1811. * NEWS: Updated
  1812. * THANKS: Added Wojciech Polak
  1813. * configure.ac: Added checks for missing functions. Raised
  1814. version number to indicate alpha release.
  1815. * lib/Makefile.am: Added missing headers
  1816. * lib/waitpid.c: Added missing includes.
  1817. * src/extract.c: Likewise.
  1818. * src/names.c: Removed spurious includes.
  1819. * src/xheader.c: Likewise.
  1820. * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
  1821. macro overriding broken mkdir prototypes.
  1822. 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1823. * configure.ac: Check for dev_t and ino_t.
  1824. * m4/Makefile.am: Added missing files.
  1825. * src/system.c: New file.
  1826. * src/Makefile.am: Added system.c
  1827. * src/common.h: Prototypes for functions from system.c
  1828. * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
  1829. * src/buffer.c: Moved system dependencies to system.c
  1830. * src/compare.c: Likewise.
  1831. * src/create.c: Likewise.
  1832. * src/delete.c: Likewise.
  1833. * src/extract.c: Likewise.
  1834. * src/rtapelib.c: Likewise.
  1835. 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1836. Implemented --occurrence option.
  1837. * NEWS: Updated.
  1838. * src/tar.c: New option --occurrence.
  1839. * src/common.h (occurrence_option): New global
  1840. (struct name): Changed `found' member to `uintmax_t
  1841. found_count'.
  1842. (names_done): Removed
  1843. (all_names_found): Changed prototype.
  1844. (ISFOUND,WASFOUND): New macros
  1845. * src/delete.c (delete_archive_members): Honor --occurrence
  1846. option.
  1847. * src/list.c (read_and): Likewise.
  1848. * src/names.c: Count number of occurrences of each name in the
  1849. archive.
  1850. (name_match): Honor --occurrence option.
  1851. (names_done): Removed
  1852. (all_names_found,names_notfound): Rewritten.
  1853. 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1854. * src/tar.c: Removed extra precaution regarding
  1855. subcommand_option == CAT_SUBCOMMAND
  1856. * lib/Makefile.am: Updated
  1857. 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1858. * src/common.h (names_done): New function.
  1859. * src/names.c: Likewise.
  1860. * src/list.c (read_and): Use all_names_found() as `while'
  1861. condition.
  1862. * src/tar.c: New option --first-copy
  1863. * NEWS: Updated
  1864. 2003-09-24 Paul Eggert <eggert@twinsun.com>
  1865. * src/rmt.c (main): Don't translate Copyright string; international
  1866. law says the word "Copyright" should be in English.
  1867. * src/tar.c (decode_options): Likewise.
  1868. 2003-09-22 Paul Eggert <eggert@twinsun.com>
  1869. * doc/tar.texi (extracting untrusted archives): New section.
  1870. * src/common.h (stripped_path_len): Renamed from cut_path_elements.
  1871. Return size_t, not pointer, so that we don't have to worry about
  1872. violating the C standard by converting char const * to char *.
  1873. All callers changed.
  1874. * src/names.c (stripped_path_len): Likewise. Strip file system
  1875. prefix, too. Count adjacent slashes as if they were one slash;
  1876. that is the POSIX standard.
  1877. 2003-09-17 Paul Eggert <eggert@twinsun.com>
  1878. * README-alpha: Document maintainer tool assumptions a bit. GNU
  1879. 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
  1880. Debian bug 211447. Fix minor misspellings/whitespace nits.
  1881. * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
  1882. gl_USE_SYSTEM_EXTENSIONS.
  1883. * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
  1884. * m4/.cvsignore: Add restrict.m4, time_r.m4.
  1885. 2003-09-17 Paul Eggert <eggert@twinsun.com>
  1886. * bootstrap: Don't use "for option; do";
  1887. Solaris 8 /bin/sh doesn't like that.
  1888. 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1889. * README-alpha: Updated
  1890. * bootstrap: Updated
  1891. 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1892. * README-alpha: Updated
  1893. * bootstrap: Updated
  1894. * po/POTFILES.in: Added src/xheader.c
  1895. * src/common.h (cut_path_elements): Added proto.
  1896. 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1897. * src/buffer.c: Use ngettext where appropriate.
  1898. * src/compare.c: Likewise.
  1899. * src/create.c: Likewise.
  1900. * src/misc.c: Likewise.
  1901. * src/tar.c: Likewise.
  1902. * src/update.c: Likewise.
  1903. 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1904. * .cvsignore: Added *.shar.gz
  1905. * NEWS: Updated
  1906. * TODO: Updated
  1907. * src/common.h (strip_path_elements): New variable.
  1908. * src/extract.c (extract_archive): Implemented --strip-path
  1909. * src/names.c (cut_path_elements): New function.
  1910. * src/tar.c: New option --strip-path=NUM.
  1911. (decode_options) Assign boolean values to bool variables.
  1912. 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1913. * src/delete.c: Fixed deletion from the POSIX archives.
  1914. * src/list.c (read_header): Minor change.
  1915. * src/tar.c (main): Do not check for volume_label_option
  1916. if subcommand_option is not CREATE_SUBCOMMAND.
  1917. * src/xheader.c (xheader_decode): Store the header as
  1918. well (for eventual delete).
  1919. * tests/incremen.sh: Explicitly request GNU format. This will
  1920. disappear when GNU extended header keywords are working.
  1921. * tests/multiv01.sh: Likewise
  1922. * tests/volume.sh: Likewise
  1923. 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1924. * src/create.c: Support for "linkpath" extended keyword.
  1925. * src/xheader.c (decode_record): Reversed the return
  1926. condition.
  1927. 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1928. * configure.ac: Allow to redefine the default output format.
  1929. * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
  1930. (archive_format_string): New function.
  1931. (usage): Updated help output.
  1932. * README: Updated.
  1933. * NEWS: Updated.
  1934. * TODO: Updated.
  1935. 2003-09-02 Paul Eggert <eggert@twinsun.com>
  1936. * src/common.h (destroy_stat, xheader_decode, xheader_store,
  1937. xheader_read, xheader_finish, xheader_destroy): Add decls;
  1938. C99 requires this.
  1939. * src/create.c (write_extended): Remove unused local 'bufsize'.
  1940. * src/delete.c (delete_archive_members): Handle case of
  1941. HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
  1942. * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
  1943. occurs, as it's not possible.
  1944. * src/update.c (update_archive): Likewise.
  1945. Use "const" when possible in new code.
  1946. * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
  1947. (fmttab): Now const. All uses changed.
  1948. * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
  1949. (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
  1950. decode_record, xheader_store, xheader_print, code_string, code_time,
  1951. code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
  1952. gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
  1953. linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
  1954. mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
  1955. uid_coder, uid_decoder, uname_coder, uname_decoder):
  1956. Use pointers to const when possible.
  1957. (xhdr_tab): Now const.
  1958. * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
  1959. (set_archive_format): Report an error if no format name matches,
  1960. instead of returning an undefined value.
  1961. * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
  1962. atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
  1963. ctime_decoder, mtime_decoder, path_decoder, size_decoder,
  1964. uid_decoder, uname_decoder): Remove unused keyword arg.
  1965. All uses changed.
  1966. * src/tar.c (set_archive_format): Now static.
  1967. * src/xheader.c (xhdr_tab, format_uintmax): Now static.
  1968. * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
  1969. atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
  1970. linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
  1971. ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
  1972. size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
  1973. Remove forward decls; no longer needed.
  1974. (xhdr_tab): Move to end, so that the forward decls aren't needed.
  1975. Add a forward declaration.
  1976. Use 'bool' in new code, when appropriate.
  1977. * src/xheader.c (decode_record): Return bool, not int.
  1978. * src/common.h (read_header): Since it accepts bool, change
  1979. all callers to use false and true rather than 0 and 1.
  1980. * src/xheader.c (decode_record): Fix misspelling in diagnostic
  1981. "extended headed" -> "extended header".
  1982. GNU coding style fixes.
  1983. * src/xheader.c (decode_record, xheader_decode):
  1984. Do not use decls like "char *p, *q;".
  1985. Minor style fixes.
  1986. (xheader_store): Avoid parentheses around object operand of sizeof.
  1987. 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1988. * src/create.c (start_header): Store long file names
  1989. in "path" keyword of an extended header if in POSIX
  1990. mode.
  1991. (finish_header): print header before calling write_extended().
  1992. * src/list.c (list_archive): Always decode the header. This
  1993. is necessary so the extended header is processed and the correct
  1994. filename is printed no matter what the state of verbose_option.
  1995. * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
  1996. for the time being).
  1997. 2003-09-01 Paul Eggert <eggert@twinsun.com>
  1998. Update from gnulib, and correct fnmatch to fnmatch-gnu.
  1999. * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
  2000. Sort.
  2001. * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
  2002. of AC_GNU_SOURCE.
  2003. * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
  2004. * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
  2005. copying rules from gnulib module descriptions.
  2006. (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
  2007. Update from gnulib modules alloca, fnmatch, getline, stdbool.
  2008. * m4/.cvsignore: Add utimes-null.m4. Sort.
  2009. 2003-09-01 Sergey Poznyakoff
  2010. Added initial support for creating POSIX headers.
  2011. * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
  2012. (string_to_chars): New functions
  2013. (struct xheader): Changed structure
  2014. (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
  2015. prototypes.
  2016. * src/create.c (string_to_chars): New function.
  2017. (write_extended): New function
  2018. (start_header): Create extended POSIX headers if necessary.
  2019. (finish_header): Likewise.
  2020. * src/list.c (print_header): Take user/group from
  2021. current_stat_info.
  2022. * src/names.c (gid_to_gname,gname_to_gid)
  2023. (uid_to_uname,uname_to_uid): Changed prototypes.
  2024. * src/tar.c: New option --format.
  2025. * src/tar.h (OLDGNU_COMPATIBILITY): Removed
  2026. (struct extra_header): Removed unused structure.
  2027. (union block.extra_header): Removed unused member.
  2028. * src/xheader.c: Implemented coder functions.
  2029. * bootstrap: Added obstack.
  2030. * lib/.cvsignore: Likewise.
  2031. * configure.ac: Added 'gl_OBSTACK'
  2032. * m4/Makefile.am: Added new files.
  2033. * m4/.cvsignore: Likewise.
  2034. * TODO: Minor formatting change
  2035. 2003-08-31 Sergey Poznyakoff
  2036. Added initial support for POSIX extended and STAR headers
  2037. (only for listing/extracting).
  2038. * src/xheader.c: New file.
  2039. * src/Makefile.am: Added xheader.c
  2040. * src/tar.h (struct star_header): New datatype
  2041. (XHDTYPE,XGLTYPE): New defines
  2042. (enum archive_format:STAR_FORMAT): New member
  2043. (struct tar_stat_info): New datatype.
  2044. (union block.star_header): New member.
  2045. * src/common.h (orig_file_name,current_file_name)
  2046. (current_trailing_slash,current_link_name): Removed variables.
  2047. (current_stat_info): New variable
  2048. (current_stat): Removed
  2049. (extended_header): New variable
  2050. (decode_header): Changed prototype.
  2051. * src/list.c (decode_header): Added initial support for POSIX extended
  2052. and STAR headers.
  2053. (skip_member): Check oldgnu_header only if current_format is set
  2054. to OLDGNU_FORMAT.
  2055. * src/buffer.c: Use current_stat_info
  2056. * src/compare.c: Likewise.
  2057. * src/create.c: Likewise.
  2058. * src/delete.c: Likewise.
  2059. * src/incremen.c: Likewise.
  2060. * src/mangle.c: Likewise.
  2061. * src/update.c: Likewise.
  2062. * src/extract.c: Likewise.
  2063. (make_directories): Improved check for the existence of the directory
  2064. * src/tar.c (destroy_stat): New function.
  2065. 2003-08-29 Paul Eggert <eggert@twinsun.com>
  2066. * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
  2067. was worth (e.g., different users in en_GB disagree about -ize
  2068. versus -ise).
  2069. * po/en_GB.po: Remove.
  2070. 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2071. * TODO: Updated
  2072. * NEWS: Updated
  2073. * src/tar.c: Removed support for the obsolete command line
  2074. options.
  2075. * doc/tar.texi: Removed references to the obsolete command
  2076. line options.
  2077. 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2078. * TODO: Updated
  2079. * NEWS: Updated
  2080. * doc/tar.texi: Updated
  2081. * src/common.h (check_links_option): New variable
  2082. (orig_file_name): New variable
  2083. (check_links): New proto.
  2084. * src/create.c (struct link.nlink): New member
  2085. (link_table): Static for the module.
  2086. (dump_file): Update `link' member when adding new links
  2087. to the link_table.
  2088. (check_links): New function.
  2089. * src/list.c (print_header): Use orig_file_name.
  2090. * src/tar.c: New option --check-links. Changed semantics of
  2091. -o to comply to UNIX98 when extracting and to its previous
  2092. semantics otherwise.
  2093. (main): Call check_links if --check-links. was given.
  2094. 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2095. * src/list.c (print_header): Revised
  2096. * NEWS: Started the entry for 1.13.26
  2097. * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
  2098. 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2099. * .cvsignore: Added to the repository.
  2100. * doc/.cvsignore: Likewise.
  2101. * lib/.cvsignore: Likewise.
  2102. * m4/.cvsignore: Likewise.
  2103. * po/.cvsignore: Likewise.
  2104. * scripts/.cvsignore: Likewise.
  2105. * src/.cvsignore: Likewise.
  2106. * tests/.cvsignore: Likewise.
  2107. * lib/Makefile.am: Added exitfail.[hc]
  2108. * src/misc.c (chdir_do): Fixed call to restore_cwd
  2109. * src/buffer.c (flush_read): Fixed behavior on short
  2110. reads right after opening the new archive (multiv01.sh test).
  2111. (new_volume): Special handling for "-".
  2112. * src/list.c (print_header): Print trailing slash if
  2113. current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
  2114. * tests/multiv01.sh: Minor changes.
  2115. * m4/Makefile.am: Added missing files.
  2116. 2003-07-05 Paul Eggert <eggert@twinsun.com>
  2117. Finish the checkin begin yesterday.
  2118. * NEWS: Document the user-visible changes installed in the last
  2119. two days.
  2120. * TODO: New file (actually, resurrected; but with new contents).
  2121. * src/list.c (read_and): Give full type for procedure arg.
  2122. (read_header): Strip trailing slashes, setting current_trailing_slash.
  2123. (tartime): Avoid int overflow when printing year (!).
  2124. (print_header): New arg specifying block ordinal. All uses changed.
  2125. Print link as 'h' type. Give labels for long links and names.
  2126. * src/misc.c (contains_dot_dot): Moved to names.c
  2127. (must_be_dot_or_slash): New function.
  2128. (safer_rmdir): Use it.
  2129. (remove_any_file): Now takes enum as option, not boolean.
  2130. Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
  2131. to unlink a directory.
  2132. (deref_stat): Accept bool, not int.
  2133. * src/names.c (namelist_match): Allow partial matches only if
  2134. recursive.
  2135. (hash_string_hasher): Renamed from hash_avoided_name.
  2136. (hash_string_compare): Renamed from compare_avoided_anames.
  2137. (hash_string_insert, hash_string_lookup): New functions.
  2138. (add_avoided_name, is_avoided_name): Use them.
  2139. (safer_name_suffix): New function.
  2140. (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
  2141. * src/rmt.c: Don't include print-copyr.h.
  2142. (prepare_input_buffer): New arg FD.
  2143. Do not read more than INT_MAX bytes at once,
  2144. since it breaks on some brain damaged Tru64 hosts.
  2145. Divide size by two
  2146. when retrying instead of subtracting 1024; for speed.
  2147. (main): Use gettext to translate (C), not print_copyright.
  2148. * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
  2149. now that gnulib handles this.
  2150. Include <stddef.h> and <limits.h> unconditionally, now that we assume
  2151. C89 or better.
  2152. Assume that offsetof is defined in stddef.h.
  2153. Do not include <sys/param.h>.
  2154. (realloc, lseek): Do not declare.
  2155. (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
  2156. (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
  2157. declarations, since we now assume C89 or better.
  2158. (PARAMS): Remove, as we now assume C89. All uses changed.
  2159. (bindtextdomain, textdomain): Include <gettext.h> to define.
  2160. Include <unlocked-io.h>.
  2161. (valloc): Define if not defined, and if valloc is not declared.
  2162. (xstrdup): Remove decl.
  2163. * src/tar.c: Do not include <print-copyr.h>.
  2164. Include <getdate.h>.
  2165. (get_date): Remove decl.
  2166. (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
  2167. IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
  2168. NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
  2169. SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
  2170. (long_options, decode_options): Use them.
  2171. (OVERWRITE_DIR_OPTION): Remove.
  2172. (long_options): New options --index-file, --no-overwrite-dir.
  2173. Remove --overwrite-dir option.
  2174. (usage): Use PACKAGE_BUGREPORT.
  2175. (decode_options): Terminate new argv properly.
  2176. Use PACKAGE_NAME, PACKAGE_VERSION.
  2177. If verbose, report how we grokked any textual date option.
  2178. (main): Add support for index-file.
  2179. * tests/Makefile.am: Convert to UTF-8.
  2180. (AUTOMAKE_OPTIONS): Remove.
  2181. (TESTS): Add delete04.sh, multiv01.sh, options.sh.
  2182. (INCLUDES): Remove ../intl.
  2183. (LDADD): Don't link libtar.a twice.
  2184. * tests/genfile.c: Convert to UTF-8.
  2185. Don't include <print-copyr.h>.
  2186. (DEFAULT_PATTERN): Renamed from DEFAULT.
  2187. (ZEROS_PATTERN): Renamed from ZEROS.
  2188. (main): Use gettext to translate (C), not print_copyright.
  2189. 2003-07-04 Paul Eggert <eggert@twinsun.com>
  2190. Revamp to meet current standards of autoconf, automake,
  2191. gettext, and gnulib, and incorporate new translations.
  2192. * config/config.guess, config/config.sub, config/depcomp,
  2193. config/install-sh, config/mdate-sh, config/missing,
  2194. config/mkinstalldirs, config/texinfo.texi:
  2195. Moved here from parent directory, or from doc.
  2196. * config.hin: Renamed from config.h.in.
  2197. * config/config.rpath: New file.
  2198. * intl: Remove this subdirectory.
  2199. * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
  2200. * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
  2201. lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
  2202. lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
  2203. lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
  2204. lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
  2205. m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
  2206. stamp-h.in: Remove.
  2207. * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
  2208. lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
  2209. lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
  2210. m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
  2211. m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
  2212. m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
  2213. m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
  2214. m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
  2215. m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
  2216. m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
  2217. m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
  2218. m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
  2219. m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
  2220. m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
  2221. m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
  2222. m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
  2223. po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
  2224. po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
  2225. po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
  2226. * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
  2227. lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
  2228. lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
  2229. lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
  2230. lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
  2231. lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
  2232. lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
  2233. lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
  2234. lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
  2235. lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
  2236. lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
  2237. lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
  2238. lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
  2239. m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
  2240. m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
  2241. m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
  2242. m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
  2243. m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
  2244. po/Makefile.in.in:
  2245. Upgrade to latest version from external source. The file "bootstrap"
  2246. now grabs these automatically, so we needn't keep track of them
  2247. in this change long any longer.
  2248. * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
  2249. (SUBDIRS): Remove intl.
  2250. * PORTS: Update for star, Macintosh.
  2251. * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
  2252. Bison 1.875, gettext 0.12.1.
  2253. * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
  2254. * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
  2255. (AC_CONFIG_AUX_DIR): New.
  2256. (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
  2257. like coreutils.
  2258. (AC_PREREQ): Bump from 2.52 to 2.57.
  2259. (AC_GNU_SOURCE): New.
  2260. (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
  2261. we no longer support K&R C.
  2262. (YACC): Remove.
  2263. (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
  2264. sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
  2265. (AC_MBSTATE_T): Remove.
  2266. (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
  2267. HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
  2268. HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
  2269. (AM_STDBOOL_H): Add.
  2270. (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
  2271. jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
  2272. (AC_CHECK_TYPE): Remove ssize_t.
  2273. (gt_TYPE_SSIZE_T): Add.
  2274. (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
  2275. jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
  2276. AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
  2277. AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
  2278. jm_FUNC_MKTIME, jm_FUNC_REALLOC):
  2279. Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
  2280. (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
  2281. (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
  2282. (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
  2283. napms, poll, select, strstr, usleep.
  2284. (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
  2285. rmdir, strcasecmp, strncasecmp, strtol, strtoul.
  2286. (AM_GNU_GETTEXT): Use external and need-ngettext options.
  2287. (AM_GNU_GETTEXT_VERSION): New.
  2288. (AC_OUTPUT): Remove intl/Makefile.
  2289. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2290. ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
  2291. * doc/fdl.texi: Update to current GNU version.
  2292. * doc/gettext.texi: Update to current coreutils version,
  2293. plus a copyright notice.
  2294. * doc/tar.texi: Switch to new method for doing copyright notices.
  2295. Use @acronym instead of @sc where appropriate.
  2296. Remove empty examples. Give a few more examples.
  2297. * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2298. (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
  2299. are built up in pieces with +=.
  2300. (noinst_HEADERS, INCLUDES): Remove.
  2301. (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
  2302. (libtar_a_LIBADD): Use $ rather than @.
  2303. (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
  2304. * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
  2305. bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
  2306. ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
  2307. intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
  2308. isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
  2309. memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
  2310. pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
  2311. safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
  2312. stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
  2313. strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
  2314. unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
  2315. Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
  2316. prereq.m4, xstrtoimax.m4.
  2317. * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
  2318. be translated, since it's not a user-visible tool.
  2319. * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2320. * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2321. (INCLUDES): Remove ../intl. Put top-srcdir before ., for
  2322. consistency with coreutils.
  2323. (LDADD): Link LIBINTL after libtar.a, since
  2324. it's now external and should stand by itself.
  2325. * src/buffer.c (print_total_written): Adjust to new human.h
  2326. interface.
  2327. (child_open_for_compress): Do not increase size to BLOCKSIZE.
  2328. (open_archive): Open index file name.
  2329. Strip trailing slahes from file names.
  2330. (flush_write): Set size to 0 if not saving names.
  2331. (flush_write, flush_read): Use safer_name_suffix rather than
  2332. inline code.
  2333. * src/common.h: Include <quote.h>.
  2334. (absolute_names_option, atime_preserve_option, backup_option,
  2335. block_number_option, checkpoint_option, dereference_option,
  2336. force_local_option, ignore_failed_read_option, ignore_zeros_option,
  2337. incremental_option, interactive_option, multi_volume_option,
  2338. numeric_owner_option, one_file_system_option, recursive_unlink_option,
  2339. read_full_records_option, remove_files_option, same_order_option,
  2340. show_omitted_dirs_option, sparse_option, starting_file_option,
  2341. to_stdout_option, totals_option, touch_option, verify_option,
  2342. dev_null_output, now_verifying, we_are_root): Now bool, not int.
  2343. (current_trailing_slash, index_file_name, recent_long_name_blocks,
  2344. recent_long_link_blocks): New vars.
  2345. (NO_OVERWRITE_DIR_OLD_FILES): New constant.
  2346. (OVERWRITE_OLD_DIRS): Remove.
  2347. (enum remove_option): New enum.
  2348. (remove_any_file): Use it as option arg, not int.
  2349. (is_avoided_name, contains_dot_dot): Return bool, not int.
  2350. (safer_name_suffix): New decl.
  2351. * src/compare.c (now_verifying): Now bool, not int.
  2352. (fill_in_sparse_array): Move to extract.c. Now returns bool;
  2353. all callers changed to test for failure.
  2354. (diff_sparse_files): Take size from current_stat, not from param.
  2355. (diff_archive): Do not count trailing slashes in archives.
  2356. (verify_volume): Test for header failure after loop, not before.
  2357. * src/create.c (relativize): Remove; replaced by safer_name_suffix.
  2358. All callers changed.
  2359. (start_header): Clear devmajor and devminor fields, too.
  2360. (finish_header): New arg block_ordinal.
  2361. (init_sparsearray): Now extern. Set sp_array_size to
  2362. SPARSES_IN_OLDGNU_HEADER if it is zero.
  2363. (dump_file): Keep link table as a hash.
  2364. Do not count "file changed as we read it" as a failure.
  2365. * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
  2366. Move extern decl to common.h.
  2367. * src/extract.c (we_are_root): Now bool, not int.
  2368. (check_time): Warn about implausibly old time stamps.
  2369. (set_stat): Use utimbuf, not stat_info.
  2370. (prepare_to_extract): New arg DIRECTORY.
  2371. (fill_in_sparse_array): Moved here from compare.c.
  2372. (extract_sparse_file): Now returns off_t, giving size left.
  2373. Truncate file at end.
  2374. (extract_archive): Use safer_name_suffix rather than rolling our own.
  2375. Use fill_in_sparse_array rather than rolling our own.
  2376. Strip trailing slashes more effectively.
  2377. Check for unsafe names.
  2378. * src/incremen.c (struct directory): nfs and found are now of type
  2379. bool, not int.
  2380. (gnu_restore): Now takes directory name as argument, not offset
  2381. of directory name in a global. All uses changed.
  2382. (CURRENT_FILE_NAME): Remove.
  2383. New tests.
  2384. * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
  2385. files.
  2386. 2002-09-30 Paul Eggert <eggert@twinsun.com>
  2387. * src/rmt.c (prepare_input_buffer): Renamed form
  2388. prepare_record_buffer. All uses changed. Do not assume that
  2389. size_t is the same width as int.
  2390. 2002-03-29 Paul Eggert <eggert@twinsun.com>
  2391. * src/incremen.c (get_directory_contents):
  2392. If ignore_failed_read_option, only warn about
  2393. get_directory_contents failures. Fix suggested by
  2394. Mark Costlow.
  2395. 2002-01-31 Mark W. Eichin <eichin@thok.org>
  2396. * src/buffer.c (child_open_for_compress): Don't try to read
  2397. past the end of the buffer.
  2398. 2001-10-11 Jim Meyering <meyering@lucent.com>
  2399. * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
  2400. and quote_n (1, ... to avoid clobbering a buffer.
  2401. 2001-09-26 Paul Eggert <eggert@twinsun.com>
  2402. * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
  2403. * src/buffer.c (flush_read): Don't diagnose partial blocks before
  2404. end of file; just ignore them silently.
  2405. * src/list.c (read_header): Don't keep around extended name
  2406. and link info indefinitely; keep it only for the next file.
  2407. This fixes a bug introduced in 1.13.24, and removes the need
  2408. for some static variables. Set recent_long_name and
  2409. recent_long_link to zero if there were no long links; this
  2410. avoids a violation of ANSI C rules for pointers in delete.c.
  2411. * THANKS: Add Christian Laubscher.
  2412. 2001-09-26 Jim Meyering <meyering@lucent.com>
  2413. * doc/tar.texi (Remote Tape Server): is know -> is known
  2414. 2001-09-25 Paul Eggert <eggert@twinsun.com>
  2415. * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
  2416. <iconv.h> may define EILSEQ (e.g. libiconv). Define a
  2417. replacement EILSEQ to be ENOENT, not EINVAL, since callers may
  2418. want to distinguish EINVAL and EILSEQ.
  2419. 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
  2420. * src/extract.c (maybe_recoverable):
  2421. Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
  2422. 2001-09-22 Paul Eggert <eggert@twinsun.com>
  2423. * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
  2424. * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
  2425. with GPL.
  2426. * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
  2427. * PORTS: Add copyright notice, 'star' reference.
  2428. * README-alpha: Add copyright notice, autoconf 2.52 patch.
  2429. * THANKS: Add Christophe Kalt.
  2430. * config.sub: Upgrade to 2001-09-14 version.
  2431. * configure.ac (ALL_LINGUAS): Add ko.
  2432. * po/ko.po: Resurrected file.
  2433. * doc/convtexi.pl: Add coding advice for Emacs.
  2434. * doc/getdate.texi: Add copyright notice.
  2435. * doc/mdate-sh: Upgrade to automake 1.5 version.
  2436. * doc/tar.texi (extracting files): Mention --to-stdout.
  2437. (Option Summary, Dealing with Old Files): New option --overwrite-dir.
  2438. (Overwrite Old Files): Likewise.
  2439. * lib/Makefile.am (noinst_HEADERS):
  2440. Remove copysym.h. Add print-copyr.h, unicodeio.h.
  2441. (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
  2442. * lib/copysym.c, lib/copysym.h: Remove.
  2443. * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
  2444. lib/unicodeio.h: New files.
  2445. * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
  2446. lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
  2447. * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
  2448. (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
  2449. * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
  2450. * m4/isc-posix.m4: Remove.
  2451. * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
  2452. * po/POTFILES.in: Add copyright notice.
  2453. * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
  2454. well as after.
  2455. * tests/Makefile.am (LDADD): Likewise.
  2456. * src/buffer.c (write_archive_buffer, close_archive):
  2457. If an archive is a socket, treat it like a FIFO.
  2458. (records_read, records_written): New vars.
  2459. (write_archive_to_stdout): Now bool, not int.
  2460. (open_archive, flush_write, flush_read): Keep records_read and
  2461. records_written up to date.
  2462. * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
  2463. (write_archive_to_stdout): Now bool, not int.
  2464. (enum read_header): New value HEADER_SUCCESS_EXTENDED.
  2465. (read_header): Now takes bool arg. Existing callers modified
  2466. to pass 0, unless otherwise specified.
  2467. * src/delete.c (records_read): Remove; now a global.
  2468. (acting_as_filter): Now bool, not int.
  2469. (recent_long_name, recent_long_link, recent_long_name_blocks,
  2470. recent_long_link_blocks, records_read, records_written): New decls.
  2471. (records_skipped): New var.
  2472. (move_archive): Don't divide by zero if arg is 0.
  2473. Use the above vars to compute how far to move.
  2474. (write_recent_blocks): New function.
  2475. (delete_archive_member): Pass 1 to read_header, so that it doesn't
  2476. read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
  2477. Keep track of how many records have been skipped.
  2478. Let the buffer code count records.
  2479. When copying a header, copy any extended headers that came before it.
  2480. * src/extract.c (extract_archive): When marking a directory to be
  2481. updated after symlinks, stat all directories after it in the
  2482. delayed-set-stat list too, since they will be checked after
  2483. symlinks. Add support for --overwrite-dir.
  2484. * src/list.c (recent_long_name, recent_long_link,
  2485. recent_long_name_blocks, recent_long_link_blocks): New vars.
  2486. (read_and): Pass 0 to read_header.
  2487. (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
  2488. headers into new vars. Null-terminate incoming symbolic links.
  2489. * src/rmt.c: Include print-copyr.h, not copysym.h.
  2490. (main): Use print_copyright, not copyright_symbol.
  2491. * src/tar.c (decode_options): Likewise.
  2492. (OVERWRITE_DIR_OPTION): New constant.
  2493. (long_options, usage, decode_options): Add --overwrite-dir.
  2494. * src/tar.h: Put copyright notice into documentation.
  2495. * tests/Makefile.am (TESTS): Add delete03.sh.
  2496. * tests/delete03.sh: New file.
  2497. * tests/genfile.c: Include print-copyr.h, not copysym.h.
  2498. (main): Use print_copyright, not copyright_symbol.
  2499. Include <argmatch.h>.
  2500. (pattern_strings): Remove.
  2501. (pattern_args, pattern_types): New constants.
  2502. (main): Use XARGMATCH, not argmatch.
  2503. 2001-09-20 Jim Meyering <meyering@lucent.com>
  2504. * lib/xstrtol.c (strtoimax): Guard declaration with
  2505. `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
  2506. The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
  2507. have their own, conflicting declaration of strtoimax in sys/inttypes.h.
  2508. (strtoumax): Likewise, for completeness (it wasn't necessary).
  2509. * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
  2510. Check for declaration of strtoimax.
  2511. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
  2512. Check for declaration of strtoumax.
  2513. 2001-09-16 Paul Eggert <eggert@twinsun.com>
  2514. * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
  2515. 2001-09-14 Paul Eggert <eggert@twinsun.com>
  2516. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
  2517. * README-alpha: Describe automake patch.
  2518. * configure.ac (LIBOBJS):
  2519. Remove automake 1.4 workaround, as we're using 1.5 now.
  2520. (USE_INCLUDED_LIBINTL): New AC_DEFINE.
  2521. * lib/copysym.c: Include stddef.h, for size_t.
  2522. Include langinfo.h if needed.
  2523. Use locale_charset only if USE_INCLUDED_LIBINTL;
  2524. if not, use nl_langinfo (CODESET) if available.
  2525. 2001-09-13 Paul Eggert <eggert@twinsun.com>
  2526. * config.guess, config.sub: Sync with canonical versions.
  2527. * configure.ac (jm_PREREQ_XGETCWD): Add.
  2528. * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
  2529. (libtar_a_SOURCES): Add copysym.c.
  2530. * copysym.c, copysym.h: New files.
  2531. * lib/error.c: Sync with fileutils version.
  2532. * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
  2533. * m4/getcwd.m4: New file.
  2534. * m4/uintmax_t.m4: Remove.
  2535. * m4/gettext.m4 (AM_WITH_NLS):
  2536. Fix bug with calculating version of Bison 1.29.
  2537. Reported by Karl Berry.
  2538. * src/Makefile.am (datadir): Remove.
  2539. * src/rmt.c: Include copysym.h.
  2540. (main): Use copyright_symbol to translate copyright notice,
  2541. instead of gettext.
  2542. * src/tar.c: Likewise.
  2543. * tests/genfile.c: Likewise.
  2544. * src/system.h (MB_LEN_MAX): New symbol.
  2545. 2001-09-11 Paul Eggert <eggert@twinsun.com>
  2546. * src/extract.c (struct delayed_set_stat): New member
  2547. 'after_symlinks'.
  2548. (delay_set_stat): Initialize it to 0.
  2549. (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
  2550. taking an extra stat ourselves. All callers changed.
  2551. (set_stat): Likewise.
  2552. (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
  2553. If false, stop when encountering a struct whose 'after_symlinks'
  2554. member is true. Otherwise, go through all structures but check
  2555. them more carefully. All callers changed.
  2556. (extract_archive): When extracting a deferred symlink, if its parent
  2557. directory's status needs fixing, then mark the directory as needing
  2558. to be fixed after symlinks.
  2559. (extract_finish): Fix status of ordinary directories, then apply
  2560. delayed symlinks, then fix the status of directories that are
  2561. ancestors of delayed symlinks.
  2562. * src/rtapelib.c (rexec):
  2563. Remove declaration; it ran afoul of prototypes on Crays.
  2564. Reported by Wendy Palm of Cray.
  2565. 2001-09-06 Paul Eggert <eggert@twinsun.com>
  2566. * lib/strtoimax.c (HAVE_LONG_LONG):
  2567. Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
  2568. (strtoimax): Use sizeof (long), not
  2569. sizeof strtol (ptr, endptr, base),
  2570. to work around bug in IBM C compiler.
  2571. 2001-09-04 Paul Eggert <eggert@twinsun.com>
  2572. * lib/xgetcwd.c: Include "xalloc.h".
  2573. (xgetcwd): Do not return NULL when memory is exhausted; instead,
  2574. report an error and exit.
  2575. * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
  2576. (jm_PREREQ): Use it.
  2577. 2001-09-03 Paul Eggert <eggert@twinsun.com>
  2578. * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
  2579. (jm_PREREQ_XGETCWD): New macro.
  2580. * lib/exclude.c (fnmatch_no_wildcards):
  2581. Fix typo that caused us to do case-folding
  2582. search even when that was not desired. This occurred only in the
  2583. no-wildcard case.
  2584. * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
  2585. Do not include xalloc.h.
  2586. (INITIAL_BUFFER_SIZE): New symbol.
  2587. Do not use xmalloc / xrealloc, since the caller is responsible for
  2588. handling errors. Preserve errno around `free' during failure.
  2589. Do not overrun buffer when using getwd.
  2590. * lib/xgetcwd.c (xgetcwd):
  2591. Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
  2592. to decide whether to use getcwd (NULL, 0).
  2593. 2001-09-02 Paul Eggert <eggert@twinsun.com>
  2594. * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
  2595. 2001-09-01 Jim Meyering <meyering@lucent.com>
  2596. * exclude.c: Use `""', not `<>' to #include non-system header files.
  2597. (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
  2598. and strncasecmp as r-values. Unixware didn't have declarations.
  2599. 2001-08-31 Jim Meyering <meyering@lucent.com>
  2600. * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
  2601. Use an initial, malloc'd, buffer of length 128 rather than
  2602. a statically allocated one of length 1024.
  2603. 2001-08-30 Paul Eggert <eggert@twinsun.com>
  2604. * lib/utime.c: Include full-write.h.
  2605. * lib/xstrtol.c (strtoimax): New decl.
  2606. 2001-08-29 Paul Eggert <eggert@twinsun.com>
  2607. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
  2608. * src/create.c (dump_file): Relativize link names before dumping.
  2609. This fixes a bug reported by Jose Pedro Oliveira.
  2610. * src/create.c (dump_file): Use offsetof when computing sizes for
  2611. struct hack; this avoids wasted space in some cases.
  2612. * src/incremen.c (note_directory, find_directory): Likewise.
  2613. * src/names.c (name_gather, addname): Likewise.
  2614. * src/extract.c (extract_archive): Use strcpy, not memcpy,
  2615. for consistency with other code that does similar things.
  2616. * src/names.c (name_gather): Likewise.
  2617. * src/names.c (read_name_from_file, name_next, name_gather,
  2618. add_hierarchy_to_namelist): Avoid quadratic behavior when
  2619. reallocating buffers. Check for buffer size overflow.
  2620. (addname): Avoid unnecessary clearing of memory.
  2621. 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
  2622. * src/extract.c (delay_set_stat): Fix off-by-one error in file
  2623. name size allocation that caused core dumps.
  2624. 2001-08-28 Paul Eggert <eggert@twinsun.com>
  2625. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
  2626. * configure.ac (GNU_SOURCE): Define to 1, not /**/.
  2627. (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
  2628. (daddr_t): Remove; no longer used.
  2629. (jm_PREREQ_HUMAN): Add.
  2630. * acconfig.h: Remove; no longer needed.
  2631. * config.guess, config.sub:
  2632. New files, from automake 1.5. Gettext 0.10.39 needs them.
  2633. * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
  2634. * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
  2635. (SUBDIRS): Put intl before lib, as gettext requires.
  2636. * ABOUT-NLS: Upgrade to gettext 0.10.39.
  2637. * intl: Upgrade entire directory to gettext 0.10.39.
  2638. * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
  2639. New files, from gettext 0.10.39.
  2640. * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
  2641. Upgrade to gettext 0.10.39,
  2642. * po/Makefile.in.in: Likewise, except fix a typo in its copying
  2643. permissions.
  2644. * po/cat-id-tbl.c, po/stamp-cat-id:
  2645. Remove; no longer used by gettext 0.10.39.
  2646. * po/ChangeLog: New file.
  2647. * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
  2648. $(srcdir)/tar.texi: Likewise.
  2649. * doc/freemanuals.texi: New file.
  2650. * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
  2651. `fileds' -> `fields'
  2652. * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
  2653. * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
  2654. (noinst_HEADERS): Add quote.h.
  2655. (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
  2656. * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
  2657. * lib/full-write.c, lib/savedir.c: Comment fix.
  2658. * lib/pathmax.h: Remove.
  2659. * lib/quote.c, lib/quote.h: New files.
  2660. * lib/xgetcwd.c: Don't include pathmax.h.
  2661. Include stdlib.h and unistd.h if available.
  2662. Include xalloc.h.
  2663. (xmalloc, xstrdup, free): Remove decls.
  2664. (xgetcwd): Don't assume sizes fit in unsigned.
  2665. Check for overflow when computing sizes.
  2666. Simplify reallocation code.
  2667. * lib/xmalloc.c: Quote failure tests.
  2668. * lib/strtoumax.c, lib/xstrtoimax.c: New files.
  2669. * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
  2670. similar to strtol.c.
  2671. (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
  2672. (verify): New macro.
  2673. (strtoumax, uintmax_t, strtoull, strtol): Remove.
  2674. (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
  2675. (strtoimax): Renamed from strtoumax. All uses of unsigned values
  2676. changed to signed values. Check sizes at compile-time, not
  2677. run-time. Prefer strtol to strtoll if both work.
  2678. (main): Remove.
  2679. * lib/xstrtol.h (xstrtoimax): New decl.
  2680. * m4/Makefile.am (EXTRA_DIST):
  2681. Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
  2682. longlong.m4, xstrtoimax.m4.
  2683. * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
  2684. Remove; now done by autoconf.
  2685. (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
  2686. Use AC_CHECK_TYPE instead of merely looking for the header.
  2687. * m4/uintmax_t.m4: Use shorter comment.
  2688. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
  2689. Quote first arg of AC_DEFUN.
  2690. Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
  2691. is needed to parse the include file.
  2692. Simplify logic behind the args to AC_REPLACE.
  2693. * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
  2694. * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
  2695. * src/rmt.c (main):
  2696. Use "Copyright %d" to simplify the translator's job in the future.
  2697. Advise translator about circle-C.
  2698. * src/tar.c: (decode_options): Likewise.
  2699. * tests/genfile.c (main): Likewise.
  2700. 2001-08-28 Jim Meyering <meyering@lucent.com>
  2701. * lib/argmatch.c: Include "quote.h".
  2702. (argmatch_invalid): Quote the context.
  2703. * lib/dirname.c (dir_name): Fix typo on PC platforms.
  2704. * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
  2705. Use single-quote for local .h files.
  2706. * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
  2707. * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
  2708. glibc versions.
  2709. * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
  2710. invoking mktime the last time.
  2711. * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
  2712. * lib/rename.c: Major rewrite by Volker Borchert to use system
  2713. rename function, but to work around problems with trailing
  2714. slashes.
  2715. * lib/strtoll.c: New file, from glibc.
  2716. * lib/strtoul.c: Update from glibc.
  2717. * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
  2718. Add support for signed numbers, too.
  2719. (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
  2720. is not defined.
  2721. (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
  2722. not defined.
  2723. (strtoumax, uintmax_t, strtoull, strtoul): New macros.
  2724. (main): Use generic names in debugging output.
  2725. * lib/strtoimax.c: Plus add the following changes of my own:
  2726. (main): Use accurate names in debugging output.
  2727. * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
  2728. Don't use PATH_MAX.
  2729. * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
  2730. m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
  2731. m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
  2732. m4/utime.m4, m4/utimes.m4:
  2733. Quote the first argument in each use of AC_DEFUN.
  2734. * m4/getline.m4: Don't use string.h.
  2735. * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
  2736. * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
  2737. 2001-08-27 Paul Eggert <eggert@twinsun.com>
  2738. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
  2739. The biggest change is the new --exclude semantics and options.
  2740. The basic idea was suggested by Gerhard Poul; thanks!
  2741. * NEWS: Describe new --exclude semantics and options, and bug fixes.
  2742. * README: ignfail.sh fails on some NFS hosts.
  2743. * NEWS, README, lib/xstrtol.h: Add copyright notice.
  2744. * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
  2745. (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
  2746. Remove; the automake bug has been fixed.
  2747. * acinclude.m4: Remove.
  2748. * configure.ac: Renamed from configure.in.
  2749. (AC_PREREQ): Bump from 2.13 to 2.52.
  2750. (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
  2751. 1997-05-30) has an encoding error.
  2752. (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
  2753. (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
  2754. * doc/fdl.texi: Update to current GNU version.
  2755. * doc/tar.texi: Put leading '*' in direntry.
  2756. Accommodate new gfdl sectioning.
  2757. New option --recursion (the default) that is the inverse of
  2758. --no-recursion.
  2759. New options --anchored, --ignore-case, --wildcards,
  2760. --wildcards-match-slash, and their negations (e.g., --no-anchored).
  2761. Along with --recursion and --no-recursion, these control how exclude
  2762. patterns are interpreted. The default interpretation of exclude
  2763. patterns is now --no-anchored --no-ignore-case --recursion
  2764. --wildcards --wildcards-match-slash.
  2765. * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
  2766. * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
  2767. (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
  2768. (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
  2769. Include if available.
  2770. (<xalloc.h>): Include
  2771. (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
  2772. (verify): New macro. Use it to verify that EXCLUDE macros do not
  2773. collide with FNM macros.
  2774. (struct patopts): New struct.
  2775. (struct exclude): Use it, as exclude patterns now come with options.
  2776. (new_exclude): Support above changes.
  2777. (new_exclude, add_exclude_file):
  2778. Initial size must now be a power of two to simplify overflow checking.
  2779. (free_exclude, fnmatch_no_wildcards): New function.
  2780. (excluded_filename): No longer requires options arg, as the options
  2781. are determined by add_exclude. Now returns bool, not int.
  2782. (excluded_filename, add_exclude):
  2783. Add support for the fancy new exclusion options.
  2784. (add_exclude, add_exclude_file): Now takes int options arg.
  2785. Check for arithmetic overflow when computing sizes.
  2786. (add_exclude_file): xrealloc might modify errno, so don't
  2787. realloc until after errno might be used.
  2788. * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
  2789. New macros.
  2790. (free_exclude): New decl.
  2791. (add_exclude, add_exclude_file): Now takes int options arg.
  2792. (excluded_filename): No longer requires options arg, as the options
  2793. are determined by add_exclude. Now returns bool, not int.
  2794. * lib/prepargs.c: Include <string.h>; required for C99 since
  2795. we use strlen.
  2796. * lib/quotearg.c:
  2797. BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
  2798. * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
  2799. diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
  2800. * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
  2801. Remove inttypes_h.m4, largefile.m4, mktime.m4.
  2802. * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
  2803. subsumed by Autoconf 2.50.
  2804. * m4/error.m4: Upgrade to serial 2.
  2805. * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
  2806. remove test for GNU C library. It's not correct, as some
  2807. older glibcs are buggy.
  2808. * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
  2809. * m4/prereq.m4: Upgrade to serial 20, but then:
  2810. (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
  2811. (jm_PREREQ_EXCLUDE): New macro.
  2812. (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
  2813. by autoconf 2.5x.
  2814. * m4/realloc.m4: Upgrade to serial 4.
  2815. * m4/strerror_r.m4: Revert to serial 1002.
  2816. * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
  2817. * m4/utimes.m4: Upgrade to latest version (still "serial 3").
  2818. * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
  2819. (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
  2820. it is now subsumed by autoconf. Add inttypes.h.
  2821. * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
  2822. po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
  2823. * src/buffer.c (new_volume): Stop if the script exits with an error.
  2824. * src/common.h (excluded_with_slash, excluded_without_slash):
  2825. Remove, replacing by:
  2826. (excluded): New decl.
  2827. (link_error): New decl.
  2828. (excluded_name): Now returns bool.
  2829. * src/extract.c:
  2830. (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
  2831. Support hard links to symbolic links.
  2832. (struct delayed_symlink): Remove 'names' member, replacing it with
  2833. 'sources' and 'target' member. All uses changed.
  2834. (struct string_list): New type.
  2835. (delayed_set_stat, extract_archive): Use offsetof when computing sizes
  2836. for struct hack; this avoids wasted space in some cases.
  2837. (extract_archive): Fix test for absolute pathnames and/or "..".
  2838. Use link_error to report errors for links.
  2839. Remove redundant trailing '/' at "really_dir", for all uses, not
  2840. just before invoking mkdir.
  2841. If overwriting old files, do not worry so much about existing
  2842. directories.
  2843. Fix mode computation in the case where the directory exists.
  2844. (apply_delayed_symlinks): If we can't make a hard link to a symbolic
  2845. link, make a copy of the symbolic link.
  2846. * src/incremen.c (get_directory_contents):
  2847. If ignore_failed_read_option, only warn about
  2848. stat failures.
  2849. * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
  2850. However, check for error even for '-' or '+' case.
  2851. (print_header): Try parsing uids and gids as unsigned integers first,
  2852. and as a uid_t or gid_t only if that fails. This adds support for
  2853. listing positive uids and gids that are greater than UID_MAX and
  2854. GID_MAX.
  2855. * src/misc.c (link_error): New function.
  2856. * src/names.c (collect_and_sort_names):
  2857. If ignore_failed_read_option, only warn about
  2858. stat errors.
  2859. (excluded_name): Now returns bool. Simplify, as the fancy
  2860. features are now all in excluded_filename.
  2861. * src/rtapelib.c (base_name): Remove decl, as system.h now
  2862. declares it.
  2863. * src/system.h: Include stddef.h if available.
  2864. (offsetof): Declare if stddef.h doesn't.
  2865. Include <dirname.h>.
  2866. (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
  2867. * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
  2868. NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
  2869. NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
  2870. WILDCARDS_MATCH_SLASH_OPTION):
  2871. New enum values.
  2872. (long_options, usage, decode_options): Add support for --anchored,
  2873. --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
  2874. --no-wildcards-match-slash, --recursion, --wildcards,
  2875. --wildcards-match-slash.
  2876. (decode_options): Implement the new way of interpreting exclude
  2877. patterns.
  2878. (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
  2879. (OPTION_STRING, decode_options): Add -I, -y. Currently these options
  2880. just print error messages suggesting alternatives.
  2881. (add_filtered_exclude): Remove.
  2882. * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
  2883. * tests/extrac04.sh (out): Remove
  2884. directory/subdirectory/file1, as the new semantics for
  2885. --exclude exclude it.
  2886. * tests/genfile.c (main): Don't use non-ASCII char in msgid.
  2887. 2001-08-12 Paul Eggert <eggert@twinsun.com>
  2888. * lib/addext.c (<errno.h>): Include.
  2889. (errno): Declare if not defined.
  2890. (addext): Work correctly on the Hurd, where pathconf returns -1 and
  2891. leaves errno alone, because there is no limit. Also, work even if
  2892. size_t is narrower than long.
  2893. 2001-07-08 Paul Eggert <eggert@twinsun.com>
  2894. * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
  2895. 2001-05-10 Paul Eggert <eggert@twinsun.com>
  2896. * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
  2897. Include <backupfile.h> and <dirname.h> after size_t is defined.
  2898. (addext): Use base_len to trim redundant trailing slashes instead of
  2899. doing it ourselves.
  2900. * lib/backupfile.c (ISSLASH, base_name):
  2901. Remove decls; now in dirname.h.
  2902. Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
  2903. is defined.
  2904. (find_backup_file_name): Rename locals to avoid new functions.
  2905. Use base_len instead of rolling it ourselves.
  2906. Work even if dirlen is 0.
  2907. Use a dir of '.' if given the empty string.
  2908. * lib/basename.c:
  2909. Do not include <stdio.h>, <assert.h>; no longer needed.
  2910. (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
  2911. Include <string.h>, <dirname.h>.
  2912. (base_name): Allow file names ending in slashes, other than names
  2913. that are all slashes. In this case, return the basename followed
  2914. by the slashes.
  2915. * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
  2916. (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
  2917. (dir_len): Renamed from dirlen.
  2918. All callers changed.
  2919. * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
  2920. New macros.
  2921. (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
  2922. 2001-02-16 Paul Eggert <eggert@twinsun.com>
  2923. * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
  2924. Do not declare or define if HAVE_MBRTOWC,
  2925. since the test for HAVE_MBRTOWC now requires proper declarations.
  2926. * lib/alloca.c (malloc): Undef before defining.
  2927. 2001-02-13 Paul Eggert <eggert@twinsun.com>
  2928. * src/compare.c (read_and_process): Use off_t for size.
  2929. From Maciej W. Rozycki.
  2930. 2001-01-26 Paul Eggert <eggert@twinsun.com>
  2931. * lib/quotearg.c: Include stddef.h. From Jim Meyering.
  2932. 2001-01-12 Paul Eggert <eggert@twinsun.com>
  2933. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
  2934. * lib/savedir.h (savedir): Remove size arg.
  2935. * doc/tar.texi: Add @setchapternewpage odd.
  2936. Remove -I as an alias for -T, for now.
  2937. Add @dircategory.
  2938. Update copyright. Remove "Published by".
  2939. Dates beginning with / or . are taken to be file names.
  2940. * src/tar.c (<time.h>): Do not include;
  2941. (time): Do not declare.
  2942. (usage): Remove -I as an alias for -T.
  2943. (OPTION_STRING): Remove -I.
  2944. (decode_options): Dates that look like an absolute path name,
  2945. or that start with '.', are presumed to be file names whose
  2946. dates are taken.
  2947. Remove 'I' as an aliase for 'T'.
  2948. Update copyright.
  2949. * src/extract.c (<time.h>): Do not include; system.h now does this.
  2950. (make_directories): Skip filesystem prefixes.
  2951. Don't assume '/' is the only separator.
  2952. (extract_sparse_file): Use new full_write semantics.
  2953. On write error, return instead of invoking skip_file.
  2954. Do not free sparsearray; caller does this now.
  2955. (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
  2956. separator.
  2957. (extract_archive): Don't assume file name lengths fit in int.
  2958. Report what got stripped from member name; it might be more than '/'.
  2959. Use new full_write semantics.
  2960. Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
  2961. mkdir to ignore it.
  2962. Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
  2963. * src/buffer.c (<time.h>): Do not include; system.h now does this.
  2964. (time): Remove decl; likewise.
  2965. (child_open_for_uncompress): Use new full_write semantics.
  2966. (flush_write): Use ISSLASH instead of testing for '/'.
  2967. (flush_read): Likewise.
  2968. * src/rmt.h (_remdev): Look for / anywhere in Path.
  2969. * src/misc.c (contains_dot_dot): Skip filesystem prefix.
  2970. Don't assume '/' is the only separator.
  2971. (safer_rmdir): Don't assume '/' is the only separator.
  2972. * src/compare.c (diff_archive): Don't assume '/' is the only separator.
  2973. * lib/dirname.h (dirlen): New decl.
  2974. * src/incremen.c (get_directory_contents):
  2975. Remove path_size arg; all callers changed.
  2976. Don't assume '/' is the only directory separator.
  2977. (gnu_restore): Work even if file name length doesn't fit in int.
  2978. * lib/addext.c (ISSLASH): New macro.
  2979. (addext): Trim any redundant trailing slashes.
  2980. * src/names.c (name_next):
  2981. Don't assume '/' is the only directory separator.
  2982. (namelist_match): Likewise.
  2983. (add_hierarchy_to_namelist): Remove dirsize arg.
  2984. Do not assume '/' is the only directory separator.
  2985. (new_name): Likewise.
  2986. * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
  2987. (libtar_a_SOURCES): Add dirname.c.
  2988. * src/create.c (relativize):
  2989. New function, with much of old start_header's guts.
  2990. Handle filesystem prefixes.
  2991. (start_header): Use this new function.
  2992. (init_sparsearray): Don't bother to zero out the new array;
  2993. it's not needed.
  2994. (deal_with_sparse): Fix array allocation bug.
  2995. (create_archive): Don't assume '/' is the only separator.
  2996. (dump_file): Likewise.
  2997. Don't worry about leading / in symlink targets.
  2998. * lib/savedir.c (savedir):
  2999. Remove size arg; it wasn't portable. All callers changed.
  3000. * lib/utime.c (utime_null): Adjust to new full_write convention.
  3001. * configure.in (YACC): Avoid portability problem with Ultrix sh.
  3002. * lib/backupfile.c: Include <dirname.h>.
  3003. (ISSLASH): New macro.
  3004. (find_backup_file_name): Use dirlen to calculate directory lengths.
  3005. (max_backup_version): Strip redundant trailing slashes.
  3006. * src/common.h: Include <full-write.h>.
  3007. (get_directory_contents): No longer has size arg.
  3008. (gnu_restore): Arg is size_t, not int.
  3009. * src/system.h: Include <time.h>.
  3010. (time): Declare if not defined.
  3011. * lib/full-write.c: Include full-write.h, not safe-read.h.
  3012. full_write returns size_t, with short writes meaning failure.
  3013. All callers changed.
  3014. * src/rtapelib.c: Include full-write.h.
  3015. * src/rmt.c: Include full-write.h.
  3016. (main): Update copyright.
  3017. * doc/getdate.texi: Mention that only English is supported.
  3018. Show how to use "date" so that the output is acceptable to getdate.
  3019. Mention Z as an abbreviation for UTC.
  3020. * lib/full-write.h: New file.
  3021. * src/list.c: system.h now does time.h stuff.
  3022. * lib/dirname.c:
  3023. Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
  3024. stdlib.h.
  3025. Do not include string.h, strings.h, or assert.h; no longer needed.
  3026. (strrchr, memrchr, malloc): Remove decls; no longer needed.
  3027. Include <xalloc.h>.
  3028. (base_name): New decl.
  3029. (BACKSLASH_IS_PATH_SEPARATOR): Remove.
  3030. (dir_name_r): Remove.
  3031. (dirlen): New function.
  3032. (dir_name): Use dirlen instead of dir_name_r.
  3033. (<string.h>, <strings.h>): Include only if test program.
  3034. (main): Use "return 0", not "exit (0)".
  3035. 2000-12-08 Paul Eggert <eggert@twinsun.com>
  3036. * lib/dirname.h: New file.
  3037. 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
  3038. * lib/fnmatch.c: Do not comment out all the code if we are using
  3039. the GNU C library, because in some cases we are replacing buggy
  3040. code in the GNU C library itself.
  3041. 2000-10-30 Paul Eggert <eggert@twinsun.com>
  3042. * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
  3043. 2000-10-29 Paul Eggert <eggert@twinsun.com>
  3044. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
  3045. * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
  3046. 2000-10-28 Paul Eggert <eggert@twinsun.com>
  3047. * doc/tar.texi: --no-recursion now applies to extraction, too.
  3048. * src/create.c (dump_file): no_recurse_option -> ! recursion_option
  3049. * src/names.c (namelist_match, excluded_name):
  3050. Do not match subfiles of a directory
  3051. if --no-recursion is specified.
  3052. * src/tar.c (NO_RECURSE_OPTION): Remove.
  3053. (long_options): Have getopt set the --no-recursion flag.
  3054. (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
  3055. Remove case for NO_RECURSE_OPTION.
  3056. * src/common.h (recursion_option):
  3057. Renamed from no_recurse_option, with sense
  3058. negated, and with FNM_LEADING_DIR being the nonzero value.
  3059. * names.c (namelist_match): New function.
  3060. (name_match, name_scan): Use it to eliminate duplicate code.
  3061. (names_notfound): Remove special case for Amiga.
  3062. 2000-10-27 Paul Eggert <eggert@twinsun.com>
  3063. * src/misc.c (read_error_details, read_warn_details,
  3064. read_fatal_details): Don't assume size_t is unsigned long.
  3065. * src/buffer.c (flush_read): If read_full_records_option, try to
  3066. fill the input buffer, as --delete -f - needs this.
  3067. 2000-10-24 Paul Eggert <eggert@twinsun.com>
  3068. * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
  3069. * src/buffer.c (check_label_pattern):
  3070. Make sure header name is a string before
  3071. passing it to fnmatch.
  3072. (init_volume_number): Check for global_volno overflow.
  3073. (new_volume): Check for global_volno overflow.
  3074. * src/tar.c (decode_options):
  3075. Check that volume label is not too long to overflow
  3076. name in tar header block.
  3077. * Makefile.am (EXTRA_DIST): Remove rebox.el.
  3078. * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
  3079. (AC_FUNC_STRERROR_R): Use this instead.
  3080. 2000-10-23 Paul Eggert <eggert@twinsun.com>
  3081. * src/extract.c: Include <time.h>, since we invoke "time".
  3082. * lib/prepargs.c (prepend_default_options):
  3083. Don't use NULL, for portability.
  3084. * m4/fnmatch.m4: Add "working" to message.
  3085. * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
  3086. Include <hash.h>.
  3087. (getpwuid, getgrgid): Declare only if system headers don't.
  3088. (gid_to_gname): Don't invoke setgrent.
  3089. (namelist): Now static, not global.
  3090. (nametail): New var. All uses of namelast changed to use
  3091. nametail, with one extra level of indirection.
  3092. (name_gather): Use memcpy instead of strncpy + assignment of NUL.
  3093. (name_match): Set nametail too, when setting namelist to null.
  3094. (add_hierarchy_to_namelist): Change type of dir arg from char * to
  3095. struct name *, so that we don't have to look up the name again
  3096. here. Get change_dir from dir rather than as a separate arg. Add
  3097. dirsize arg, and pass it along to get_directory_contents. Remove
  3098. unnecessary check of directory type.
  3099. (new_name): Do not append a slash if PATH already ends in one.
  3100. (avoided_names, struct avoided_name): Remove.
  3101. (avoided_name_table): New var, replacing avoided_names.
  3102. (hash_avoided_name, compare_avoided_names): New function.
  3103. (add_avoided_name, is_avoided_name): Use hash table rather than
  3104. linked list.
  3105. * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
  3106. (child_open_for_compress, child_open_for_uncompress,
  3107. close_archive): Propagate any failure of the compression process
  3108. back to "tar".
  3109. (open_archive, flush_write, flush_read, close_archive): Do not
  3110. allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
  3111. -1. Instead, allocate an array with the size that's needed.
  3112. (open_archive): Don't bother checking S_ISCHR of /dev/null.
  3113. (backspace_output): Don't try to backspace past start of archive.
  3114. (close_archive): Remove special case for DELETE_SUBCOMMAND.
  3115. * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
  3116. DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
  3117. HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
  3118. HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
  3119. PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
  3120. WITH_DMALLOC, WITH_REGEX):
  3121. Remove; now generated automatically.
  3122. * configure.in (_GNU_SOURCE): Define to empty, not 1, for
  3123. compatibility for glibc fragments.
  3124. (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
  3125. HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
  3126. DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
  3127. that we needn't put an entry into acconfig.h.
  3128. (ALL_LINGUAS): Add da.
  3129. (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
  3130. (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
  3131. (for strtol.c).
  3132. (AC_MBSTATE_T): Add.
  3133. (RMT): Append $(EXEEXT).
  3134. (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
  3135. (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
  3136. HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
  3137. HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
  3138. (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
  3139. (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
  3140. (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
  3141. Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
  3142. (EMUL_OPEN3): Remove; no longer needed.
  3143. (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
  3144. * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
  3145. * src/common.h: Do not include basename.h.
  3146. * src/rtapelib.c (base_name): Do not include basename.h;
  3147. declare base_name instead.
  3148. * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
  3149. Remove these files.
  3150. * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
  3151. lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
  3152. * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
  3153. Adjust to the above changes.
  3154. * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
  3155. * src/open3.c: Remove.
  3156. * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
  3157. (tar_SOURCES): Remove open3.c.
  3158. (INCLUDES): Remove -I.., as automake does that.
  3159. (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
  3160. The following changes are to put LOCALEDIR into localedir.h instead
  3161. of passing it on the command line.
  3162. (DEFS): Remove.
  3163. (DISTCLEANFILES): New macro.
  3164. (localedir.h): New rule.
  3165. (rmt.o tar.o): Now depend on localedir.h.
  3166. * tests/delete02.sh, tests/extrac04.sh: New files.
  3167. * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
  3168. (TESTS): Add extrac04.sh, and restore delete02.sh.
  3169. (DEFS): Remove; LOCALEDIR is now done via localedir.h.
  3170. (INCLUDES): Remove -I.. as automake does this now.
  3171. * src/rtapelib.c (rexec): Don't declare unless using it.
  3172. (do_command): Simplify signal-handling code slightly.
  3173. * src/delete.c (blocks_needed): Remove. All uses changed to use
  3174. blocking_factor - new_blocks.
  3175. (acting_as_filter): New var.
  3176. (write_record, delete_archive_members): Use acting_as_filter
  3177. rather than archive == STDIN_FILENO to detect whether we're acting
  3178. as a filter, as open can return STDIN_FILENO in some cases.
  3179. (delete_archive_members): Ignore zero blocks if
  3180. ignore_zeros_option is nonzero. Fix bug that messed up last
  3181. output block: write_eot can't be used here, as it gets confused
  3182. when the input is at end of file.
  3183. * src/compare.c (diff_archive): Do not impose an arbitrary limit on
  3184. symbolic link contents length. Pass directory size to
  3185. get_directory_contents.
  3186. * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
  3187. m4/strerror_r.m4: New files.
  3188. * m4/signedchar.m4: Remove this file.
  3189. * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
  3190. * m4/Makefile.am (EXTRA_DIST): Likewise.
  3191. * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
  3192. * po/da.po: New translation file.
  3193. * src/mangle.c (extract_mangle):
  3194. Fix diagnostic with wrong number of %s'es.
  3195. * lib/fnmatch.c (fnmatch):
  3196. Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
  3197. e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
  3198. * lib/full-write.c (full_write): Some buggy drivers return 0 when you
  3199. fall off a device's end. Detect this.
  3200. * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
  3201. uses changed.
  3202. (open): Remove macro; we no longer support EMUL_OPEN3. Do not
  3203. include <pathmax.h> and directory include files like <dirent.h>;
  3204. no longer used. Include <savedir.h> instead.
  3205. (closedir, signed_char): remove macro; no longer used.
  3206. (bool, false, true): Include <stdbool.h> if you have the include
  3207. file, otherwise define.
  3208. * src/misc.c:
  3209. (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
  3210. opendir_warn, readdir_error): Remove; no longer needed.
  3211. (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
  3212. before deciding whether we're trying to remove ".".
  3213. (remove_any_file): Try unlink first if we are not root. Use
  3214. savedir when recursively removing directories, to avoid exhausting
  3215. file descriptors.
  3216. (savedir_error, savedir_warn, symlink_error): New functions.
  3217. * src/list.c: (read_and): Do not invoke
  3218. apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
  3219. responsible for that. Do not invoke apply_delayed_set_stat; our
  3220. caller is now responsible for that.
  3221. (read_header): Use signed char instead of signed_char. Prevent
  3222. later references to current_header from mistakenly treating it as
  3223. an old GNU header.
  3224. (from_header): Quote invalid base-64 strings in diagnostics.
  3225. (time_from_header): Do not warn about future timestamps in
  3226. archive; check_time now does that.
  3227. (print_header): Quote unknown file types.
  3228. (skip_member): New function, replacing skip_extended_headers and
  3229. now skipping the whole member instead of just the extended
  3230. headers. All callers changed. This makes the code handle
  3231. extended headers uniformly, and fixes some bugs.
  3232. * src/update.c (update_archive): Use skip_member.
  3233. * src/extract.c (we_are_root): Now global.
  3234. (struct delayed_symlink): New type.
  3235. (delayed_symlink_head): New var.
  3236. (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
  3237. not apply_delayed_set_stat.
  3238. (set_mode, set_stat): Pointer args are now const pointers.
  3239. (check_time): New function.
  3240. (set_stat): Warn if setting a file's timestamp to be the future.
  3241. (make_directories): Do not save and restore errno.
  3242. (maybe_recoverable): Set errno to ENOENT if we cannot make missing
  3243. intermediate directories.
  3244. (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
  3245. not in caller. Extract potentially dangerous symbolic links more
  3246. carefully, deferring their creation until the end, and using a
  3247. regular file placeholder in the meantime. Do not remove trailing
  3248. / and /. from file names. Do not bother checking for ".." when
  3249. checking whether a directory loops back on itself, as loopbacks
  3250. can occur with symlinks too. Also, in that case, do not bother
  3251. saving and restoring errno; just set it to EEXIST.
  3252. (apply_nonancestor_delayed_set_stat): A prefix is a potential
  3253. ancestor if it ends in slash too (as well as ending in a char just
  3254. before slash).
  3255. (apply_delayed_set_stat): Remove.
  3256. (apply_delayed_symlinks, extract_finish): New functions.
  3257. * doc/fdl.texi: New file.
  3258. * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
  3259. ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
  3260. * doc/tar.texi: Add Free Documentation License. New section
  3261. "Overwrite Old Files", and revamp that section to make it easier to
  3262. follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
  3263. documentation into getdate.texi. Fix several minor typos. Describe
  3264. TAR_OPTIONS. Describe incompatibility between incremental backups and
  3265. --atime-preserve. Describe incompatibility between --verify and other
  3266. options. Mention that tar normally removes symbolic links rather than
  3267. following them, when extracting a file of the same name.
  3268. * THANKS: Add gpoul. Change skip's address.
  3269. * po/POTFILES.in: Add lib/human.c.
  3270. * src/common.h (namelist, namelast): Remove decls.
  3271. (we_are_root, extract_finish, skip_member, savedir_error,
  3272. savedir_warn, symlink_error, gnu_list_name): New decls.
  3273. (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
  3274. skip_extended_headers, is_dot_or_dotdot, closedir_error,
  3275. closedir_warn, opendir_error, opendir_warn, readdir_error,
  3276. readdir_warn): Remove decls.
  3277. (get_directory_contents): New off_t arg.
  3278. (addname): Now returns struct name *.
  3279. * src/tar.h, tests/genfile.c: Fix comments.
  3280. * src/create.c: Include hash.h.
  3281. (gnu_list_name): Remove decl.
  3282. (struct link): Remove "next" member.
  3283. (linklist): Remove.
  3284. (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
  3285. consistency with other diagnostics.
  3286. (deal_with_sparse): Check for I/O error when closing the file.
  3287. (create_archive): Do not allocate an array of size PATH_MAX, as
  3288. PATH_MAX might be (size_t) -1. Instead, allocate an array with
  3289. the size that's needed.
  3290. (hash_link, compare_links): New functions.
  3291. (dump_file): Do not exhaust open file descriptors when descending
  3292. deeply into a directory, by using savedir rather than
  3293. opendir/readdir. Do not zero-fill the name buffer unnecessarily.
  3294. Hash the set of links already created, instead of using a linked
  3295. list. Fix some bugs in outputting sparse files which caused the
  3296. sparse tables to be incorrect. When a file unexpectedly shrinks,
  3297. output zeros rather than garbage. Do not allocate an array of
  3298. size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
  3299. allocate an array with the size that's needed.
  3300. * src/incremen.c: Include hash.h.
  3301. (struct directory): Remove "next", "dir_text". Change "name" to
  3302. be char[1] with struct hack, not const char *. Add "found".
  3303. (directory_list): Remove. Replaced by directory_table.
  3304. (directory_table): New var.
  3305. (nfs_string): Renamed from nfs.
  3306. (hash_directory, compare_directories): New functions.
  3307. (note_directory): Now returns struct directory *. First arg is
  3308. now const pointer. struct stat arg is now dev_t, ino_t, nfs.
  3309. Remove text arg. New "found" arg, basically corresponding to the
  3310. old text arg not being null. All callers changed.
  3311. (note_directory, find_directory): Use hash table rather than
  3312. linked list.
  3313. (get_directory_contents): New arg "device". Use savedir to do the
  3314. hard work. Save the nfs-ness of stat_data, since it might change
  3315. under us. Use note_directory instead of find_directory to save
  3316. some work. When adding an "A" record, do it with
  3317. add_to_accumulator instead of cheating with strcat.
  3318. (read_directory_file): Use "+" flag before device to indicate
  3319. whether it was NFS. Fix typo in checking for strtoul error.
  3320. (write_directory_file_entry): New function.
  3321. (write_directory_file): Use it, and use the hash routines to
  3322. traverse the directory table.
  3323. (gnu_restore): Use savedir rather than opendir/readdir.
  3324. * src/tar.c: Include localedir.h, prepargs.h.
  3325. (long_options): Now static.
  3326. (long_options, usage, decode_options): -j is now short for
  3327. --bzip2, and -I is now an alias for -T.
  3328. (decode_options, main): argv is not const pointer now.
  3329. (decode_options): Invoke prepend_default_options to support
  3330. TAR_OPTIONS. In diagnostic, mention the string that was the
  3331. invalid blocking factor, tape length, group, owner, or record
  3332. size. --delete is no longer incompatible with -f -, undoing
  3333. 2000-01-07 change.
  3334. (main): Invoke extract_finish at end of extraction.
  3335. * src/rmt.c: Include localedir.h.
  3336. (main): Update copyright date to 2000.
  3337. * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
  3338. following changes: Use @sc where appropriate. Document the ranges of
  3339. supported times more precisely. Add Eggert to getdate authors.
  3340. Document old Latin 12m/12pm tradition. Remove list of alphabetic time
  3341. zone names, as it wasn't correct and people shouldn't be relying on it
  3342. anyway. Relative items also account for non-DST adjustments. Fix
  3343. some misspellings.
  3344. * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
  3345. * tests/ignfail.sh: opendir -> savedir in diagnostics.
  3346. * tests/preset.in: Set LANGUAGE to the empty string, for some
  3347. brain damaged host.
  3348. 2000-10-20 Paul Eggert <eggert@twinsun.com>
  3349. * m4/fnmatch.m4: Mention the GNU C library.
  3350. 2000-10-19 Paul Eggert <eggert@twinsun.com>
  3351. * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
  3352. glibc 2.1.95.
  3353. 2000-10-17 Paul Eggert <eggert@twinsun.com>
  3354. * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
  3355. (CHAR_BIT): Remove.
  3356. * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
  3357. (CHAR_BIT): Define if not defined.
  3358. 2000-09-09 Paul Eggert <eggert@twinsun.com>
  3359. * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
  3360. 2000-08-07 Paul Eggert <eggert@twinsun.com>
  3361. * lib/xmalloc.c: Memory exhausted -> memory exhausted
  3362. * lib/xalloc.h (xalloc_msg_memory_exhausted):
  3363. change to array from char *.
  3364. 2000-08-06 Paul Eggert <eggert@twinsun.com>
  3365. * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
  3366. compatibility with glibc 2.1.3 strftime.c.
  3367. 2000-07-31 Paul Eggert <eggert@twinsun.com>
  3368. * lib/quotearg.c (quotearg_n_options):
  3369. Don't make the initial slot vector a constant,
  3370. since it might get modified.
  3371. * lib/quotearg.c: Add support for more than one preallocated slot.
  3372. 2000-07-30 Paul Eggert <eggert@twinsun.com>
  3373. * lib/quotearg.c (quotearg_n_options):
  3374. Preallocate a slot 0 buffer, so that the caller
  3375. can always quote one small component of a "memory exhausted" message
  3376. in slot 0.
  3377. 2000-07-23 Paul Eggert <eggert@twinsun.com>
  3378. * lib/quotearg.c:
  3379. Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
  3380. mbstate_t is always defined.
  3381. Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
  3382. some GCC installations, and this configuration error is likely to be
  3383. common.
  3384. 2000-07-22 Paul Eggert <eggert@twinsun.com>
  3385. * lib/quotearg.c:
  3386. When the system forces us to redefine mbstate_t, shadow its mbsinit
  3387. function. From Bruno Haible.
  3388. 2000-07-14 Paul Eggert <eggert@twinsun.com>
  3389. * lib/xmalloc.c: Simplify exhausted message.
  3390. * lib/quotearg.h: Update copyright date; from Jim Meyering.
  3391. 2000-07-13 Paul Eggert <eggert@twinsun.com>
  3392. * lib/quotearg.h (enum quoting style):
  3393. New constant clocale_quoting_style.
  3394. * lib/quotearg.c:
  3395. (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
  3396. Add support for clocale_quoting_style, undoing previous change to
  3397. locale_quoting_style.
  3398. 2000-07-10 Paul Eggert <eggert@twinsun.com>
  3399. * lib/quotearg.c:
  3400. <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
  3401. since otherwise we don't need it.
  3402. (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
  3403. since we don't do multibytes in that case.
  3404. (quotearg_buffer_restyled): If a unibyte locale, don't bother to
  3405. invoke multibyte primitives.
  3406. * m4/mbstate_t.m4 (AC_MBSTATE_T):
  3407. Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
  3408. Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
  3409. and mbstate_t, to a single-part test that simply defines mbstate_t.
  3410. * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
  3411. Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
  3412. to decide whether to define the BeOS workaround macro;
  3413. this adjusts to the change to AC_MBSTATE_T.
  3414. * m4/strerror_r.m4: New file.
  3415. 2000-07-05 Paul Eggert <eggert@twinsun.com>
  3416. * lib/quotearg.c: Use double-quote to quote.
  3417. * lib/quotearg.c (N_): New macro.
  3418. (gettext_default): New function.
  3419. (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
  3420. "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
  3421. for right quote.
  3422. * lib/quotearg.c (struct quoting_options):
  3423. Simplify quote_these_too dimension.
  3424. From Bruno Haible <haible@clisp.cons.org>.
  3425. * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
  3426. Test for mbstate_t only if the test
  3427. for an object-type mbstate_t fails.
  3428. * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
  3429. 2000-07-03 Paul Eggert <eggert@twinsun.com>
  3430. * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
  3431. Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
  3432. * lib/quotearg.c (mbrtowc):
  3433. Assign to *pwc, and return 1 only if result is nonzero.
  3434. (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
  3435. 2000-07-02 Paul Eggert <eggert@twinsun.com>
  3436. * lib/quotearg.c (mbstate_t):
  3437. Do not define; it should be defined with AC_CHECK_TYPE.
  3438. 2000-06-26 Paul Eggert <eggert@twinsun.com>
  3439. * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
  3440. a bug in glibc 2.1.3.
  3441. * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
  3442. 2000-06-19 Paul Eggert <eggert@twinsun.com>
  3443. * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
  3444. inclusion of wctype.h to work around solaris2.6 namespace pollution.
  3445. (ISPRINT): Likewise.
  3446. Reported by Tom Tromey.
  3447. 2000-06-15 Paul Eggert <eggert@twinsun.com>
  3448. * lib/human.c (adjust_value): New function.
  3449. (human_readable_inexact): Apply rounding style even when printing
  3450. approximate values.
  3451. * lib/human.c: Avoid shadowing warnings.
  3452. From Jim Meyering.
  3453. 2000-06-14 Paul Eggert <eggert@twinsun.com>
  3454. * lib/human.c (human_readable_inexact): Allow an input block size
  3455. that is not a multiple of the output block size, and vice versa.
  3456. * lib/getdate.y (get_date): Apply relative times after time zone
  3457. indicator, not before.
  3458. 2000-05-31 Paul Eggert <eggert@twinsun.com>
  3459. * m4/largefile.m4: Rewrite so that we don't need to run getconf,
  3460. and thus don't need AC_CANONICAL_HOST.
  3461. (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
  3462. (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
  3463. (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
  3464. CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
  3465. changed. Instead of inspecting the output of getconf, try to
  3466. compile the test program without and with the macro definition.
  3467. (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
  3468. getconf. Instead, check for the needed flags by compiling test
  3469. programs.
  3470. * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
  3471. longer needs it.
  3472. * config.guess, config.sub: Remove these files, for similar reasons.
  3473. 2000-05-03 Paul Eggert <eggert@twinsun.com>
  3474. * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
  3475. 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
  3476. bug. This avoids a clash when files like regex.c that define
  3477. _GNU_SOURCE.
  3478. 2000-05-02 Paul Eggert <eggert@twinsun.com>
  3479. * m4/largefile.m4 (AC_SYS_LARGEFILE):
  3480. Define _GNU_SOURCE if this is needed to make
  3481. ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
  3482. inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
  3483. * lib/quotearg.c (mbrtowc, mbstat_t):
  3484. Add definitions if !HAVE_MBSTATE_T_OBJECT.
  3485. (<wctype.h>): Include if HAVE_WCTYPE_H.
  3486. (iswprint): Define to 1 if we lack it
  3487. 2000-04-18 Paul Eggert <eggert@twinsun.com>
  3488. * m4/mbstate_t.m4: New file.
  3489. 2000-04-17 Bruno Haible <haible@clisp.cons.org>
  3490. * tests/ignfail.sh: Test for uid 0 along with user "root".
  3491. 2000-04-05 Paul Eggert <eggert@twinsun.com>
  3492. * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
  3493. Don't use -n32 on IRIX if the installer said
  3494. otherwise.
  3495. 2000-02-28 Paul Eggert <eggert@twinsun.com>
  3496. * lib/quotearg.c (ALERT_CHAR): New macro.
  3497. (quotearg_buffer_restyled): Use it.
  3498. 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
  3499. * src/list.c (tartime): Fix off-by-one error when copying year if
  3500. OLD_CTIME.
  3501. 2000-02-18 Paul Eggert <eggert@twinsun.com>
  3502. * lib/getdate.y: Handle two-digit years with leading zeros correctly.
  3503. (textint): New typedef.
  3504. (parser_control): Changed from struct parser_control to typedef
  3505. (for consistency). Member year changed from int to textint. All
  3506. uses changed.
  3507. (YYSTYPE): Removed; replaced by %union with int and textint
  3508. members.
  3509. (tID): Removed; not used.
  3510. (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
  3511. tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
  3512. tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
  3513. (tSNUMBER, tUNUMBER): Now of type <textintval>.
  3514. (date, number, to_year): Use width of number in digits, not its
  3515. value, to determine whether it's a 2-digit year, or a 2-digit
  3516. time.
  3517. (yylex): Store number of digits of numeric tokens. Return '?' for
  3518. unknown identifiers, rather than (unused) tID.
  3519. 2000-01-16 Paul Eggert <eggert@twinsun.com>
  3520. * lib/quotearg.c (quotearg_buffer_restyled):
  3521. Do not quote alert, backslash, formfeed,
  3522. and vertical tab unnecessarily in shell quoting style.
  3523. 2000-01-15 Paul Eggert <eggert@twinsun.com>
  3524. * m4/c-bs-a.m4:
  3525. Change quoting to be compatible with future autoconf versions.
  3526. 2000-01-11 Paul Eggert <eggert@twinsun.com>
  3527. * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
  3528. 2000-01-07 Paul Eggert <eggert@twinsun.com>
  3529. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
  3530. Fix bug with fnmatch.h dependency, as follows:
  3531. * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
  3532. * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
  3533. * src/common.h (apply_nonancestor_delayed_set_stat):
  3534. Renamed from apply_delayed_set_stat.
  3535. (apply_delayed_set_stat, decode_mode, chmod_error_details,
  3536. chown_error_details, close_warn, closedir_warn, mkdir_error,
  3537. read_error_details, read_fatal_details, read_warn_details,
  3538. seek_error_details, seek_warn_details, utime_error,
  3539. write_error_details, write_fatal_details): New decls.
  3540. Make diagnostic messages more regular.
  3541. * src/create.c (dump_file): Quote file names with colons if possible.
  3542. * src/compare.c (diff_archive): Likewise.
  3543. * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
  3544. * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
  3545. * src/mangle.c (extract_mangle): Likewise.
  3546. * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
  3547. Likewise.
  3548. * src/buffer.c (archive_write_error, flush_archive, close_archive,
  3549. new_volume, xclose):
  3550. Use error message functions to report errors consistently.
  3551. * src/compare.c (diff_sparse_files, diff_archive): Likewise.
  3552. * src/create.c (finish_sparse_file, dump_file): Likewise.
  3553. * src/extract.c (set_mode, set_stat, extract_sparse_file,
  3554. extract_archive): Likewise.
  3555. * src/list.c (list_archive): Likewise.
  3556. * src/update.c (append_file): Likewise.
  3557. * src/compare.c (diff_init, diff_sparse_files):
  3558. Use xalloc_die to report memory exhaustion.
  3559. * src/incremen.c (gnu_restore): Likewise.
  3560. * src/list.c (read_header): Likewise.
  3561. * src/mangle.c (extract_mangle): Likewise.
  3562. * src/misc.c (maybe_backup_file): Likewise.
  3563. * src/tar.c (decode_options): Likewise.
  3564. * src/compare.c (read_and_process, fill_in_sparse_array,
  3565. diff_sparse_files):
  3566. Use consistent terminology for unexpected-EOF message.
  3567. * src/extract.c (extract_sparse_file, extract_archive): Likewise.
  3568. * src/list.c (list_archive, read_header, skip_file,
  3569. skip_extended_headers): Likewise.
  3570. * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
  3571. (xdup2): Regularize messages with rest of tar.
  3572. * src/buffer.c (flush_read): Don't read past EOF.
  3573. * src/extract.c (extr_init):
  3574. If we run out of memory, invoke apply_delayed_set_stat.
  3575. (prepare_to_extract): Don't complain if we can't remove ".".
  3576. (apply_delayed_set_stat): New function.
  3577. (apply_nonancestor_delayed_set_stat):
  3578. Renamed from apply_delayed_set_stat. All uses changed.
  3579. Don't remove head if it doesn't apply.
  3580. * src/create.c (find_new_file_size):
  3581. Return size instead of storing through pointer.
  3582. All callers changed.
  3583. (deal_with_sparse): Don't keep reading after read errors.
  3584. (finish_sparse_file): Just abort if there is an internal error.
  3585. (dump_file): Fix typo: stat_warn and stat_error were interchanged.
  3586. Don't restore access times on directories during incremental dumps
  3587. until after dealing with the directory.
  3588. If ignoring failed reads, count closedir, read, and unknown
  3589. file errors as warnings, not errors.
  3590. Fix buffer overrun problem when dumping sparse files.
  3591. * src/list.c (read_and):
  3592. Invoke apply_nonancestor_delayed_set_stat on file names
  3593. after handling them.
  3594. (decode_mode): Remove; moved to misc.c.
  3595. * src/misc.c (safer_rmdir): New function.
  3596. (remove_any_file): Use it to avoid problems with rmdir(".").
  3597. (maybe_backup_file): Regularize diagnostics.
  3598. (undo_backup_file): Likewise.
  3599. (decode_mode): Moved here from list.c.
  3600. (chmod_error_details, chown_error_details, close_fatal,
  3601. close_warn, closedir_warn, mkdir_error, read_error_details,
  3602. read_warn_details, read_fatal_details, seek_error_details,
  3603. seek_warn_details, utime_error, write_error_details,
  3604. write_fatal_details): New functions.
  3605. * src/delete.c (save_record): Remove static variable (now local).
  3606. (move_archive): Don't position before start of archive.
  3607. (write_record): Abort if count is zero at inopportune time.
  3608. Plug memory leak.
  3609. * src/tar.c (decode_options): --delete and -f - are now
  3610. incompatible, since we didn't have time to fix their bugs.
  3611. * tests/Makefile.am (TESTS): Remove delete02.sh.
  3612. * tests/ignfail.sh: Adjust to new quoting scheme again.
  3613. 2000-01-06 Paul Eggert <eggert@twinsun.com>
  3614. * lib/getdate.y: Sync tm_diff with the GNU C Library.
  3615. (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
  3616. (tm_diff): Renamed from difftm. All uses changed.
  3617. Replace body with that taken from GNU C Library 2.1.3pre1.
  3618. (get_date): Prefer tm_gmtoff to tm_diff if available.
  3619. 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
  3620. * tests/incremen.sh: Invoke stat on newly created file so that its
  3621. ctime is updated on Nextstep.
  3622. 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
  3623. * lib/getdate.y (get_date):
  3624. Fix typo when checking for time_t overflow in time zone calculations.
  3625. 1999-12-13 Paul Eggert <eggert@twinsun.com>
  3626. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
  3627. * README-alpha: New file.
  3628. * README: New sections for gzip and bzip2, Solaris.
  3629. Remove mention of BACKLOG.
  3630. * configure.in (AC_C_BACKSLASH_A): Add.
  3631. (AC_CHECK_HEADERS): Add wchar.h.
  3632. (AC_CHECK_FUNCS): Add mbrtowc.
  3633. (AC_FUNC_CLOSEDIR_VOID): Add.
  3634. * tests/Makefile.am (TESTS): Add delete02.sh.
  3635. (POSTPONED_TESTS): Remove.
  3636. (EXTRA_DIST): Remove $(POSTPONED_TESTS).
  3637. * tests/preset.in:
  3638. Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
  3639. * tests/ignfail.sh (err): Adjust to new quoting scheme.
  3640. * tests/delete02.sh: Fix typo: need to list archive2, not archive.
  3641. * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
  3642. * src/tar.c ("quotearg.h"): New include.
  3643. (usage): Now has __attribute__ ((noreturn)).
  3644. (confirm): Report errno if we can't open tty.
  3645. (confirm, decode_options):
  3646. Quote arbitrary strings in diagnostics.
  3647. (OVERWRITE_OPTION): New constant.
  3648. (long_options, usage, decode_options): New --overwrite option.
  3649. (decode_options): --keep-old-files, --overwrite, and --unlink-first
  3650. are now mutually exclusive.
  3651. Don't assume that gettext preserves errno.
  3652. (main): Set default quoting style to escape_quoting_style.
  3653. * src/update.c (<quotearg.h>): New include.
  3654. (append_file):
  3655. Don't assume that gettext preserves errno.
  3656. Quote arbitrary strings in diagnostics.
  3657. Check for close error.
  3658. * src/names.c (<quotearg.h>): New include.
  3659. (name_init, name_next, name_close, names_notfound,
  3660. collect_and_sort_names): Don't assume that gettext preserves
  3661. errno. Quote arbitrary strings in diagnostics.
  3662. (excluded_name): Fix typo that caused empty patterns to be
  3663. mishandled.
  3664. * src/misc.c (<quotearg.h>): New include.
  3665. (quote_copy_string): Quote only newline and backslash; the output is no
  3666. longer meant for humans, and is locale-independent.
  3667. (contains_dot_dot): New function.
  3668. (remove_any_file): Don't use lstat; just rmdir the file and then use
  3669. unlink if the rmdir fails because the file isn't a directory.
  3670. Check for readdir and closedir errors.
  3671. (maybe_backup_file): Report "stat" for stat errors.
  3672. (maybe_backup_file, chdir_do):
  3673. Quote arbitrary strings in diagnostics.
  3674. (maybe_backup_file, undo_last_backup):
  3675. Don't assume that gettext preserves errno.
  3676. (call_arg_error, call_arg_fatal, call_arg_warn,
  3677. chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
  3678. mknod_error, open_error, open_fatal, open_warn, opendir_error,
  3679. opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
  3680. readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
  3681. stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
  3682. write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
  3683. * src/system.h (__attribute__): New macro.
  3684. (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
  3685. (S_ISDOOR): New macro.
  3686. (closedir): New macro, if CLOSEDIR_VOID.
  3687. * src/rmt.c, src/rtapelib.c (decode_oflag):
  3688. O_APPEND might not be defined.
  3689. * src/list.c: (read_and, list_archive):
  3690. Quote arbitrary strings in diagnostics.
  3691. (from_header): Use locale_quoting_style to quote diagnostics.
  3692. (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
  3693. * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
  3694. * src/Makefile.am: Use ## for copyright comments.
  3695. * src/extract.c (<quotearg.h>): New include.
  3696. (enum permstatus): New enum.
  3697. (struct delayed_set_stat): file_name is now at end of buffer, to avoid
  3698. two mallocs. New members file_name_len, invert_permissions, permstatus.
  3699. (extr_init): Remove hack that silently adjusted newdir_umask.
  3700. (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
  3701. Use these args to decide whether and how to set modes.
  3702. (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
  3703. Don't assume that gettext preserves errno.
  3704. (set_stat): Remove arg symlink_flag; subsumed by typeflag.
  3705. (delay_set_stat, repair_delayed_set_stat): New functions.
  3706. (make_directories): Avoid mkdir where last part of path is "..".
  3707. Create a struct delayed_set_stat for each directory made.
  3708. (prepare_to_extract): Renamed from unlink_destination, and
  3709. return 0 immediately if to_stdout_option; all callers changed.
  3710. (maybe_recoverable): New parameter interdir_made.
  3711. Add support for --overwrite.
  3712. (extract_sparse_file, extract_archive):
  3713. Quote arbitrary strings in diagnostics.
  3714. (extract_archive): By default, warn about ".." in member names, and skip them.
  3715. Don't open files with O_NONBLOCK or O_APPEND.
  3716. Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
  3717. overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
  3718. minus the current umask. Keep track of intermediate directories made,
  3719. to avoid looping when making x/../x when x doesn't exist; the
  3720. earlier code solved this in a different way that didn't fit well
  3721. into the new scheme. Don't extract permissions onto existing
  3722. directories unless --overwrite is given. Do not add -wx------
  3723. permissions to new directories permanently; just do it temporarily.
  3724. Remove no-longer-needed hack with MSDOS and directory time stamps.
  3725. (apply_delayed_set_stat): New argument specifies which directories to
  3726. fix statuses of. Do not wait until the end of extraction to fix
  3727. statuses; instead, fix a directory's status once we exit that directory.
  3728. This requires less memory and does the right thing in some cases
  3729. where the old method didn't.
  3730. (fatal_exit): New function.
  3731. * src/incremen.c (<quotearg.h>): New include.
  3732. (get_directory_contents, gnu_restore):
  3733. Check for readdir and closedir errors.
  3734. (get_directory_contents, read_directory_file, gnu_restore):
  3735. Quote arbitrary strings in diagnostics.
  3736. (get_directory_contents, read_directory_file, write_directory_file):
  3737. Don't assume that gettext preserves errno.
  3738. * src/create.c (<quotearg.h>): New include.
  3739. (start_header): Use `member names' to refer to archive member names, not
  3740. `archive names'. Warn about `..' in member names.
  3741. (finish_sparse_file, dump_file):
  3742. Quote arbitrary strings in diagnostics.
  3743. (finish_sparse_file, dump_file):
  3744. Don't assume that gettext preserves errno.
  3745. (dump_file): Don't use `access' to determine whether a directory is readable;
  3746. this isn't reliable if tar is setuid. Use `opendir' instead.
  3747. Check for readdir and closedir failures.
  3748. Don't dump sockets as if they were fifos; just warn and skip.
  3749. * src/delete.c (move_archive):
  3750. Don't report fatal error merely because sizes don't fit
  3751. into struct mtop values; fall back on lseek instead.
  3752. Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
  3753. Say `reposition' instead of `re-position'.
  3754. (delete_archive_members):
  3755. Set archive to STDOUT_FILENO before outputting trailing buffer.
  3756. * src/compare.c (<quotearg.h>): New include.
  3757. (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
  3758. and `Cannot' others.
  3759. (report_difference, diff_archive):
  3760. Quote arbitrary strings in diagnostics.
  3761. (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
  3762. Don't assume that gettext preserves errno.
  3763. (diff_archive): Don't open regular files with O_NONBLOCK.
  3764. Preserve access times of files if --atime.
  3765. * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
  3766. (FATAL_ERROR, USAGE): Don't return 0.
  3767. (enum old files): New enum.
  3768. (old_files_option): New variable, replacing keep_old_files_option and
  3769. unlink_first_option.
  3770. (apply_delayed_set_stat): Now takes char const * param.
  3771. (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
  3772. closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
  3773. open_fatal, open_warn, opendir_error, opendir_warn, read_error,
  3774. read_fatal, readdir_error, readdir_warn, readlink_error,
  3775. readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
  3776. truncate_error, truncate_warn, unlink_error, waitpid_error,
  3777. write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
  3778. * src/buffer.c:
  3779. (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
  3780. archive_write_error, archive_read_error, flush_archive, close_archive,
  3781. init_volume_number, new_volume):
  3782. Don't assume that gettext preserves errno.
  3783. (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
  3784. (open_archive): Reject multivolume verify attempts a bit earlier.
  3785. Rename local variable `access', in case it's defined by system header.
  3786. (open_archive, backspace_output): Use `Cannot' uniformly, instead of
  3787. `Could not' sometimes and `Cannot' others.
  3788. (open_archive, flush_read, flush_archive, close_archive, new_volume):
  3789. Quote arbitrary strings in diagnostics.
  3790. (read_error): Set archive to STDOUT_FILENO temporarily when writing
  3791. archive buffer.
  3792. (init_volume_number): Check for input and output errors in volno_file.
  3793. (new_volume): Use new fatal_exit function to exit, and new xfork
  3794. function to fork.
  3795. * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
  3796. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
  3797. * doc/tar.texi: Add --overwrite.
  3798. --absolute-names rejects ".." in names.
  3799. * lib/quotearg.c: Add support for multibyte characters.
  3800. (ISGRAPH): Remove.
  3801. (ISPRINT): New macro.
  3802. (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
  3803. (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
  3804. defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
  3805. (quotearg_buffer_restyled): New function, with most of the old
  3806. quotearg_buffer's contents.
  3807. Major rewrite to support multibyte characters.
  3808. (quotearg_buffer): Now just calls quotearg_buffer_restyled.
  3809. * m4/c-bs-a.m4: New file.
  3810. * lib/Makefile.am: Use ## for copyright notice.
  3811. * scripts/Makefile.am: Use ## on copyright notice.
  3812. * doc/Makefile.am:
  3813. ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
  3814. 1999-12-05 Paul Eggert <eggert@twinsun.com>
  3815. * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
  3816. src/ChangeLog, tests/ChangeLog: Remove these files.
  3817. * ChangeLog.1: New file, incorporating the above files, plus old
  3818. ChangeLog entries.
  3819. * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
  3820. 1999-12-05 Dale Worley <worley@ariadne.com>
  3821. * src/compare.c (<utime.h>, struct utimbuf): Add.
  3822. (diff_archive): Restore access times if --atime.
  3823. * doc/tar.texi: Explain that --atime also preserves modification time.
  3824. 1999-12-04 Gerhard Poul <gpoul@gnu.org>
  3825. * ABOUT-NLS: Update to latest version from ftp.gnu.org.
  3826. * BACKLOG, TODO: Remove.
  3827. * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
  3828. * README: Bring up to date.
  3829. 1999-12-03 Paul Eggert <eggert@twinsun.com>
  3830. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
  3831. * src/compare.c (diff_archive):
  3832. Do not set errno to EPIPE; we no longer use perror.
  3833. * src/create.c (dump_file):
  3834. If a parent directory said that a file should be there but it is
  3835. absent, diagnose it as being removed in the meantime.
  3836. Do not pass meaningless errno to ERROR when reporting that the
  3837. file changed as we read it.
  3838. Report that a file changed if its ctime changes; this is more
  3839. sensitive than mtime+size, and more accurate.
  3840. * src/incremen.c (enum children): New type.
  3841. (struct directory): Change old char allnew member to new enum children
  3842. children member.
  3843. All uses changed.
  3844. (get_directory_contents): When doing an incremental dump that does
  3845. not cross filesystem boundaries, dump the mount points, even though
  3846. they are in a different filesystem. This is for convenience when
  3847. restoring, and for consistency with non-incremental dumps.
  3848. This requires a 3-way flag for keeping track of which children we want,
  3849. so we use enum children rather than boolean.
  3850. * src/open3.c (modes): Remove.
  3851. (open3): Remove unportable assumptions about flag encodings.
  3852. Use `stat' instead of `access' for testing file existence,
  3853. to avoid problems with setuid programs.
  3854. * src/names.c (name_next): If file names are given both in the
  3855. command line (e.g. via -C) and in a file (via -T), do not
  3856. ignore the command-line names.
  3857. * m4/uintmax_t.m4: Backport to autoconf 2.13.
  3858. * doc/tar.texi: Clarify getdate authorship.
  3859. 1999-11-23 Paul Eggert <eggert@twinsun.com>
  3860. * lib/Makefile.am (DISTCLEANFILES): New macro.
  3861. * configure.in (tar_fnmatch_hin):
  3862. Remove; it runs afoul of a bug in autoconf 2.13.
  3863. Instead, always link fnmatch.h to some file, even if it's a throwaway.
  3864. 1999-11-19 Paul Eggert <eggert@twinsun.com>
  3865. * m4/largefile.m4: Update serial.
  3866. 1999-11-18 Paul Eggert <eggert@twinsun.com>
  3867. * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
  3868. the QNX shell, which doesn't propagate exit status of failed
  3869. commands inside shell assignments.
  3870. 1999-11-07 Paul Eggert <eggert@twinsun.com>
  3871. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
  3872. * configure.in (AC_PREREQ): Bump to 2.13.
  3873. (ALL_LINGUAS): Add pt_BR, ja.
  3874. (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
  3875. (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
  3876. for AIX crossbuilds.
  3877. * doc/tar.texi: New node create options for --ignore-failed-read.
  3878. Remove unused version control symbols.
  3879. Modernize texinfo usage.
  3880. * src/tar.c (usage): Add examples.
  3881. * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
  3882. Include fnmatch.h when testing fnmatch.
  3883. * src/common.h (collect_and_sort_names): New decl.
  3884. * src/list.c (from_header):
  3885. Handle 32-bit two's complement negative time stamps
  3886. even if the leading octal digit is 2 or 3.
  3887. * src/extract.c (set_stat): Remove duplicate code.
  3888. * src/create.c (to_chars): Remove trailing newline from warning.
  3889. (dump_file): Ignore doors.
  3890. (finish_header): Report block numbers with origin 0, not origin 1.
  3891. * src/rmt.c: Include getopt.h.
  3892. (long_opts): New constant.
  3893. (usage): New function.
  3894. (main): Implement --help and --version.
  3895. Output usage message if arguments are bad.
  3896. 1999-10-10 Paul Eggert <eggert@twinsun.com>
  3897. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
  3898. * README: Remove --with-dmalloc.
  3899. Add --disable-largefile.
  3900. Remove old NeXT dirent problems, or AIX valloc problems.
  3901. Remove old union wait advice, and old %lld advice.
  3902. Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
  3903. * doc/tar.texi: Clarify documentation for portable file names.
  3904. * configure.in (AM_WITH_DMALLOC): Remove.
  3905. (ALL_LINGUAS): Add ja.
  3906. * src/tar.c (decode_options):
  3907. Invalid dates are now treated as (time_t) -1.
  3908. Redo version message to conform to GNU standards.
  3909. * src/create.c (dump_file):
  3910. Fix typo: last two args to dump_file were interchanged.
  3911. * src/update.c (update_archive): Likewise.
  3912. * src/common.h (tartime): New decl.
  3913. * src/list.c (tartime): Now extern.
  3914. (read_and): Invalid headers cause errors, not warnings.
  3915. 1999-10-03 Paul Eggert <eggert@twinsun.com>
  3916. * lib/getdate.y (__attribute__):
  3917. Don't use if GCC claims to be before 2.8; this is
  3918. needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
  3919. 1999-09-25 Paul Eggert <eggert@twinsun.com>
  3920. * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
  3921. * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
  3922. * tests/incremen.sh: Add yet another sleep.
  3923. 1999-09-24 Paul Eggert <eggert@twinsun.com>
  3924. * NEWS: A read error now causes a nonzero exit status.
  3925. * src/create.c (to_chars): Fix base-256 output.
  3926. * src/buffer.c (write_error):
  3927. Read error is an error, not just a warning.
  3928. 1999-09-24 Paul Eggert <eggert@twinsun.com>
  3929. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
  3930. * src/tar.c (<time.h>): Include.
  3931. (time): Declare if not defined.
  3932. (confirm): Don't read past EOF.
  3933. (long_options, usage): Add --no-same-owner, --no-same-permissions.
  3934. (main): Use clock_gettime if available.
  3935. * tests/Makefile.am (TESTS): Add incremen.sh
  3936. (INCLUDES): Add -I../lib, for fnmatch.h.
  3937. * src/update.c (update_archive):
  3938. Remove call to name_expand; had no effect.
  3939. Use chdir_do to change into directory.
  3940. Use deref_stat instead of stat.
  3941. Use add_avoided_name to mark names to be avoided; the old method of
  3942. setting a bit with the name caused all descendants of that name to
  3943. be avoided, in some circumstances.
  3944. * tests/incremen.sh: Remove unnecessary sleeps.
  3945. * src/names.c (name_next): Go back to using plain chdir.
  3946. (name_gather): Use chdir_arg to keep track of arguments to chdir.
  3947. (addname): Likewise.
  3948. (name_match): Use chdir_do to act on chdir args.
  3949. (merge_sort): Moved here from incremen.c.
  3950. (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
  3951. Likewise.
  3952. (name_expand): Remove.
  3953. (name_from_list): Skip fake names.
  3954. Use chdir_do to act on chdir args.
  3955. (struct avoided_name): New struct.
  3956. (avoided_names): New var.
  3957. (add_avoided_name, is_avoided_name): New functions.
  3958. * src/system.h (stat, lstat): Define in terms of statx on
  3959. STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
  3960. (UCHAR_MAX): New macro.
  3961. (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
  3962. * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
  3963. * src/incremen.c (<time.h>): Remove include; no longer used.
  3964. (time): Remove decl.
  3965. (time_now): Remove.
  3966. (get_directory_contents): Use deref_stat.
  3967. Consider a subdirectory to be all new only if
  3968. listed_incremental_option or if it its timestamp is newer than the
  3969. cutoff.
  3970. (add_hierarchy_to_namelist, merge_sort): Move to names.c.
  3971. (read_directory_file): Now extern. Do not set time_now.
  3972. (write_directory_file): Renamed from write_dir_file.
  3973. Use start_time instead of time_now.
  3974. (compare_names, collect_and_sort_names): Move to names.c.
  3975. * src/mangle.c (<time.h>): Remove; not used.
  3976. (time): Do not declare.
  3977. * src/misc.c (chdir_from_initial_wd): Remove.
  3978. (deref_stat): New function.
  3979. (struct wd): New struct.
  3980. (wd, wds, wd_alloc): New variables.
  3981. (chdir_arg, chdir_do): New function.
  3982. * src/compare.c (get_stat_data): Use deref_stat.
  3983. * src/common.h (name_expand): Remove.
  3984. * src/list.c (time): Declare if not defined.
  3985. (base_64_digits): Moved here from create.c.
  3986. (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
  3987. -1.
  3988. (read_and): Don't get time from header unless we need it now;
  3989. as getting time can cause duplicate diagnostics if bogus.
  3990. Remove "Hmm, " from diagnostic.
  3991. Use "Skipping to next header" uniformly.
  3992. (from_header): Renamed from from_chars. All uses changed.
  3993. Allow different forms for unportable 2's complement numbers.
  3994. Don't check for extended forms when parsing checksums.
  3995. Parse base-256 output.
  3996. (gid_from_header): Renamed from gid_from_chars. All uses changed.
  3997. (major_from_header): Renamed from major_from_chars. All uses changed.
  3998. (minor_from_header): Renamed from minor_from_chars. All uses changed.
  3999. (mode_from_header): Renamed from mode_from_chars. All uses changed.
  4000. (off_from_header): Renamed from off_from_chars. All uses changed.
  4001. (size_from_header): Renamed from size_from_chars. All uses changed.
  4002. (time_from_header): Renamed from time_from_chars. All uses changed.
  4003. Warn about future timestamps.
  4004. (uid_from_header): Renamed from uid_from_chars. All uses changed.
  4005. (uintmax_from_header): Renamed from uintmax_from_chars.
  4006. All uses changed.
  4007. (tartime): New function, incorporating isotime.
  4008. (isotime): Delete.
  4009. (print_header): Use tartime.
  4010. * src/create.c (to_chars): Fix typo in decl.
  4011. Don't assign through char const *.
  4012. Rename name_expand back to collect_and_sort_names.
  4013. * src/extract.c (<time.h>): No need to include.
  4014. (time): No need to declare.
  4015. (now): Remove variable.
  4016. (extr_init): Don't initialize `now'.
  4017. Increment same_permissions_option and same_owner_option if we_are_root
  4018. is nonzero; this supports the new --no-same-owner option.
  4019. (set_stat): Use start_time instead of `now'.
  4020. * src/create.c (struct link): Remove unused linkcount member.
  4021. (base_64_digits): Move to list.c.
  4022. (base_8_digits): Remove.
  4023. (to_octal): New function, with some of old contents of to_base.
  4024. (to_base): Remove.
  4025. (to_base256): New function.
  4026. (to_chars): Use base 256, not base 64, for huge values.
  4027. (mode_to_chars): Don't use two's complement in GNU format or POSIX
  4028. format.
  4029. (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
  4030. it means we have an incremental dump where we don't know whether this
  4031. is a top-level call.
  4032. Use deref_stat instead of statx / stat / lstat.
  4033. Cast result of alloca.
  4034. Check for dates if 0 < top_level, not if listed_incremental_option.
  4035. Move multiple-link check after directory check.
  4036. Do not dump avoided names.
  4037. Dump hard links to symbolic names as links, not as separate
  4038. symbolic links.
  4039. start_header cannot return a null pointer, so don't test for it.
  4040. Likewise for find_next_block.
  4041. * src/buffer.c, src/common.h (<human.h>): Include.
  4042. (read_error): Read error is an error, not just a warning.
  4043. (print_total_written): Also print human-readable byte count, and
  4044. bytes/s.
  4045. (open_archive, flush_write): Use start_time, not current time.
  4046. (flush_read): Report about garbage bytes ignored at end of archive,
  4047. but act on non-garbage bytes (instead of ignoring them).
  4048. (new_volume): Use WARN for warnings.
  4049. * doc/Makefile.am:
  4050. ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
  4051. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
  4052. * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
  4053. * lib/Makefile.am (noinst_HEADERS):
  4054. Rename fnmatch.h to fnmatch.hin; add human.h.
  4055. (libtar_a_SOURCES): Add human.c, xstrtoul.c.
  4056. (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
  4057. * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
  4058. * lib/fnmatch.c (strchrnul):
  4059. Define to __strchrnul if _LIBC, to our own replacement otherwise.
  4060. Do not define if !_LIBC and if it already exists.
  4061. (internal_fnmatch): Use it.
  4062. * configure.in (tar_LDADD): New variable, used only when linking tar.
  4063. (rmt_LDADD): Similarly, for rmt.
  4064. (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
  4065. fnmatch.c; otherwise, use the system fnmatch.h.
  4066. * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
  4067. Modernize sample backup script.
  4068. * THANKS: Martin Goik's email address has changed.
  4069. * m4/fnmatch.m4: New file.
  4070. 1999-09-03 Paul Eggert <eggert@twinsun.com>
  4071. * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
  4072. Use EINVAL instead.
  4073. 1999-08-29 Paul Eggert <eggert@twinsun.com>
  4074. * lib/getdate.y (get_date):
  4075. Rename outermost local `probe' to `quarter'.
  4076. Rename latter local `tm' to probe_tm.
  4077. From: Jim Meyering <meyering@ascend.com>
  4078. Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
  4079. 1999-08-28 Paul Eggert <eggert@twinsun.com>
  4080. * lib/getdate.y (PC): New macro; use it when possible.
  4081. (number): Handle `Nov 11 1996' example correctly.
  4082. See Risks Digest 20.55 (1999-08-27)
  4083. http://catless.ncl.ac.uk/Risks/20.55.html#subj18
  4084. 1999-08-23 Paul Eggert <eggert@twinsun.com>
  4085. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
  4086. Remove minor cases of lint from many source files: this includes
  4087. unnecessary casts, uses of NULL, etc.
  4088. * configure.in (AC_PROG_YACC): Remove.
  4089. (YACC): Always use bison.
  4090. (AC_STRUCT_TIMEZONE): Add.
  4091. (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
  4092. * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
  4093. Fix spelling.
  4094. * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
  4095. ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
  4096. * lib/strcasecmp.c, lib/strncasecmp.c: New files.
  4097. * src/common.h (merge_sort): Remove decl; no longer exported.
  4098. * src/system.h (voidstar): Remove.
  4099. (memcpy, memcmp): Cast args.
  4100. ("xalloc.h"): Add include.
  4101. (xmalloc, xrealloc): Remove decl.
  4102. * src/mangle.c (time): Do not declare if defined.
  4103. (first_mangle, mangled_num): Remove.
  4104. * src/list.c (from_chars): Report out-of-range values more precisely.
  4105. (off_from_chars): Do not allow negative offsets.
  4106. (uid_from_chars): Allow negative uids.
  4107. * src/create.c (linklist): Now static.
  4108. (to_chars): Fix wording of message to match from_chars.
  4109. * src/misc.c (merge_sort): Move to incremen.c.
  4110. * src/incremen.c (merge_sort): Move here from misc.c; now static.
  4111. It's too painful to make it both generic and portable.
  4112. (read_directory_file): "timestamp" -> "time stamp" in messages.
  4113. * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
  4114. (usage): Fix misspelling.
  4115. (OPTION_STRING): -y is now -I.
  4116. (decode_options): Use -1, not EOF, for getopt_long result.
  4117. Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
  4118. Handle operands after any "--" argument.
  4119. (main): Report any output errors.
  4120. * src/rmt.c (main): status is ssize_t, not long.
  4121. * src/names.c (name_gather): Handle trailing -C option correctly.
  4122. (addname): use memcpy, not strncpy, to copy a string of known length.
  4123. (name_match): Handle trailing -C option correctly.
  4124. Propagate -C option to following files.
  4125. (name_match, name_scan): Remove redundant matching code.
  4126. * src/buffer.c (open_archive): Use American spelling in diagnostic.
  4127. * lib/getdate.y: Major rewrite. Add copyright notice.
  4128. (<stdio.h>): Include only if testing.
  4129. (ISUPPER): Remove.
  4130. (ISLOWER): New macro.
  4131. (<string.h>): Include if HAVE_STRING_H, not USG.
  4132. (bcopy): Remove.
  4133. (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
  4134. bison.
  4135. (EPOCH_YEAR): Renamed from EPOCH.
  4136. (table): Renamed from TABLE.
  4137. (meridian): Now an anonymous enum.
  4138. (struct parser_control): New type.
  4139. (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
  4140. (yyInput, ..., yyRelYear): Migrated into struct parser_control.
  4141. (%pure_parser): Added, so that the parser is pure.
  4142. (%union): Removed; the type is now just plain int.
  4143. All %type directives removed.
  4144. (tLOCAL_ZONE): New %token.
  4145. (month_day_table): Renamed from MonthDayTable.
  4146. (gmtime, localtime, mktime, time): Declare only if not defined.
  4147. (meridian_table): New table.
  4148. (dst_table): New table.
  4149. (units_table): renamed from UnitsTable.
  4150. (relative_time_table): Renamed from OtherTable.
  4151. (time_zone_table): Renamed from TimezoneTable. Modernized.
  4152. (military_table): Renamed from MilitaryTable.
  4153. (to_hour): Renamed from ToHour.
  4154. (to_year): Renamed from ToYear.
  4155. (lookup_zone): New function.
  4156. (LookupWord): Renamed from lookup_word. Use lookup_zone for time
  4157. zones.
  4158. (yylex): Now reentrant. All callers changed.
  4159. (get_date): Add support for local time zone abbreviations.
  4160. Make it reentrant.
  4161. 1999-08-20 Paul Eggert <eggert@twinsun.com>
  4162. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
  4163. * src/create.c (to_chars): Generate GNU base-64 representation
  4164. if we are generating an old or new GNU format tar file for a
  4165. number that can't be represented with the POSIX format.
  4166. * configure.in (AC_CHECK_FUNCS): Add fchdir.
  4167. (AM_FUNC_GETLINE): Add.
  4168. (LIBOBJS): Add getline.o to workaround comment.
  4169. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
  4170. * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
  4171. * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
  4172. (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
  4173. * lib/getline.c, lib/getline.h, lib/save-cwd.c,
  4174. lib/save-cwd.h, m4/getline.m4: New files.
  4175. * src/misc.c (<save-cwd.h>): Include.
  4176. (chdir_from_initial_wd): New function.
  4177. * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
  4178. (name_gather): Handle `-C x -C y' correctly.
  4179. Do not rely on addname to handle -C.
  4180. (addname): New CHANGE_DIR parameter. All callers changed.
  4181. Remove ugly calls to getcwd; no longer needed.
  4182. (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
  4183. * src/incremen.c (listed_incremental_stream): New var.
  4184. (read_directory_file): Remove arbitrary limits on file name length.
  4185. Do not attempt to get the working directory; we can bypass this
  4186. on fchdir hosts. Open the listed_incremental_option file for both
  4187. read and write instead of opening it twice. Check for I/O errors
  4188. when doing I/O to this file. Check for invalid data in the file,
  4189. and report line numbers of invalid data.
  4190. (write_dir_file): Likewise.
  4191. (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
  4192. Do not invoke write_dir_file; that's our caller's responsibility.
  4193. * src/list.c (max): New macro.
  4194. (isotime): Now takes time_t, not time_t *. Report the decimal values
  4195. of times that can't be broken down.
  4196. (print_header): Don't assume that major and minor device numbers can
  4197. fit into uintmax_t.
  4198. * src/common.h (struct name): change_dir is now char const *.
  4199. (write_directory_file): Remove unused decl.
  4200. (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
  4201. chars; the old `sizeof (b)' broke when b was a pointer not an array.
  4202. (chdir_from_initial_wd): New decl.
  4203. (addname): New 2nd arg.
  4204. * THANKS: Torsten Lull -> Catrin Urbanneck
  4205. 1999-08-18 Paul Eggert <eggert@twinsun.com>
  4206. * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
  4207. Don't depend on ac_cv_func variables.
  4208. From Albert Chin-A-Young <china@thewrittenword.com>.
  4209. 1999-08-18 Paul Eggert <eggert@twinsun.com>
  4210. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
  4211. * m4/signedchar.m4: New file.
  4212. * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
  4213. * src/system.h (signed_char): New macro.
  4214. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
  4215. * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
  4216. * src/create.c (write_eot): Write at least two zero blocks.
  4217. * src/extract.c (extract_archive): Fix sparse array bug:
  4218. we did not find end of array correctly.
  4219. * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
  4220. Don't assume find_next_block yields nonnull.
  4221. * src/extract.c (extract_sparse_file, extract_archive): Likewise.
  4222. * src/list.c (skip_extended_headers): Likewise.
  4223. * src/list.c (read_and, list_archive): Simplify code.
  4224. (read_header): Fix computation of signed checksums on machines where
  4225. char is unsigned.
  4226. Do not consider a block to be zero unless all its bytes are zero,
  4227. even the checksum bytes. Do not attempt to parse the checksum of
  4228. a zero block. Fix memory leak with long names and links.
  4229. (from_chars): Accommodate a buggy tar that outputs leading NUL
  4230. if the previous field overflows.
  4231. * src/misc.c (quote_copy_string): Generate \177 for '\177', not
  4232. \?, for portability to non-ASCII hosts.
  4233. 1999-08-16 Paul Eggert <eggert@twinsun.com>
  4234. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
  4235. * src/extract.c (make_directories): Do not chown intermediate
  4236. directories, even if we are root.
  4237. * src/list.c (read_header): Fix bugs when interpreting
  4238. POSIX-compliant headers that do not contain null bytes in the
  4239. header or link names.
  4240. 1999-08-14 Paul Eggert <eggert@twinsun.com>
  4241. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
  4242. * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
  4243. (AC_HEADER_SYS_WAIT): Add.
  4244. (AC_REPLACE_FUNCS): Add waitpid.
  4245. (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
  4246. * lib/waitpid.c: New file.
  4247. * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
  4248. * src/system.h (WCOREDUMP): Remove; no longer used.
  4249. (WIFSTOPPED): Likewise.
  4250. (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
  4251. * src/buffer.c (child_open_for_compress): Undo previous change.
  4252. (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
  4253. (new_volume): Likewise.
  4254. * src/buffer.c, src/extract.c, src/incremen.c (time):
  4255. Don't declare if defined.
  4256. * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
  4257. * src/incremen.c (read_directory_file):
  4258. Invoke `time' the same way everyone else does.
  4259. Check validity of --listed-incremental file contents a bit better.
  4260. Do not worry about --after-date-option; tar.c now checks this.
  4261. * src/list.c (isotime): Report ??? if localtime returns null.
  4262. Don't assume years fit into four digits.
  4263. Don't append trailing newline.
  4264. (print_header): Report ??? if localtime returns null;
  4265. Don't assume years fit into four digits.
  4266. * src/compare.c (diff_archive): Do not fall back on absolute name
  4267. when --absolute-names is not specified.
  4268. * src/create.c (start_header):
  4269. Include text of ignored filesystem prefix in warning.
  4270. (create_archive): Check for excluded names when doing incremental
  4271. pass through directory.
  4272. (dump_file): Do not dump old files explicitly given on command line
  4273. when using --listed-incremental. Do not strip ./ prefix from names.
  4274. * src/tar.c: -g now implies after_date_option = 1.
  4275. -g and -N are now incompatible options.
  4276. * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
  4277. 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
  4278. * src/list.c (read_header): Don't parse OLDGNU_FORMAT
  4279. incremental headers as POSIX prefixes.
  4280. 1999-08-11 Paul Eggert <eggert@twinsun.com>
  4281. * NEWS, configure.in: Version 1.13.6.
  4282. * configure.in (ALL_LINGUAS): Add pt_BR.
  4283. * po/pt_BR.po: New file.
  4284. * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
  4285. Renamed from tar.info and header.texi; adjust actions so that
  4286. they work in other directories.
  4287. * doc/tar.texi: Add -y and --bzip2.
  4288. Patterns containing / now exclude only file names whose prefix match.
  4289. * lib/exclude.h (excluded_filename): New option parameter.
  4290. (add_exclude_file): New ADD_FUNC parameter.
  4291. (excluded_pathname): Remove decl.
  4292. * lib/exclude.c (_GNU_SOURCE):
  4293. Remove; no longer needed since we don't use FNM_ macros.
  4294. (excluded_filename): Renamed from excluded_filename_opts.
  4295. (excluded_filename, excluded_pathname): Remove.
  4296. (add_exclude_file): New ADD_FUNC parameter.
  4297. * po/POTFILES.in: Add lib/quotearg.c.
  4298. * src/buffer.c (_GNU_SOURCE): Define.
  4299. (<fnmatch.h>): Include unconditionally.
  4300. (child_open_for_compress): Dup after closing, to avoid possible file
  4301. descriptor exhaustion.
  4302. (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
  4303. (flush_read): Likewise.
  4304. * src/common.h (LG_8, LG_64): New macros.
  4305. (excluded_with_slash, excluded_without_slash): New vars.
  4306. (excluded): Remove.
  4307. (base_64_digits): New decl.
  4308. (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
  4309. off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
  4310. uintmax_to_chars,
  4311. GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
  4312. OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
  4313. UINTMAX_TO_CHARS):
  4314. Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
  4315. off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
  4316. GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
  4317. SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
  4318. respectively. All definitions and uses changed.
  4319. (excluded_name): New decl.
  4320. * src/compare.c (diff_archive):
  4321. Open files with O_NONBLOCK instead of O_NDELAY.
  4322. * src/create.c (base_64_digits): New constant.
  4323. (base_8_digits): New macro.
  4324. (MAX_VAL_WITH_DIGITS): New macro.
  4325. (to_base): First half of old to_oct. Support base 64 too.
  4326. (to_chars): Other half of old to_oct, for 64-bit support.
  4327. (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
  4328. (gid_substitute, uid_substitute): Look up names dynamically if
  4329. GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
  4330. (mode_to_chars): Renamed from mode_to_oct.
  4331. Support negative values in all the _to_chars functions.
  4332. (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
  4333. Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
  4334. (dump_file): Inspect entire pathname, not just new file name
  4335. component, when deciding whether to exclude it.
  4336. * src/extract.c (extract_archive):
  4337. Open files with O_NONBLOCK instead of O_NDELAY.
  4338. * src/incremen.c (get_directory_contents):
  4339. Inspect entire pathname, not just new file name
  4340. component, when deciding whether to exclude it.
  4341. * src/list.c (<fnmatch.h>): Do not include.
  4342. (from_chars): Renamed from from_oct. New parameter specifying
  4343. the negative of the minimum allowed value. Support negative
  4344. and base-64 values.
  4345. (base64_map): New var.
  4346. (base64_init): New function.
  4347. (print_header): Output numeric uids and gids if numeric_owner_option.
  4348. * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
  4349. * src/names.c (_GNU_SOURCE): Define.
  4350. (<fnmatch.h>): Include unconditionally.
  4351. (excluded_name): New function, taking over duties of excluded_pathname.
  4352. All uses changed.
  4353. * src/rmt.c (decode_oflag): New function.
  4354. (main): Use it to support symbolic open flags.
  4355. * src/rtapelib.c (encode_oflag): New function.
  4356. (rmt_open__): Do not allow newlines in the path.
  4357. Propagate errno correctly.
  4358. Decode symbolic open flags, if present.
  4359. * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
  4360. New macros.
  4361. * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
  4362. New -y or --bzip2 option.
  4363. (add_filtered_exclude): New function.
  4364. (decode_options): Put excluded patterns with / into
  4365. excluded_with_slash, and without / into excluded_without_slash.
  4366. Compare newer_mtime_option to its new initial value
  4367. TYPE_MINIMUM (time_t) when deciding whether more than one
  4368. threshold date was specified.
  4369. 1999-07-20 Paul Eggert <eggert@twinsun.com>
  4370. * NEWS, configure.in: Version 1.13.5.
  4371. * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
  4372. before exiting.
  4373. * src/buffer.c (new_volume): Likewise.
  4374. * src/incremen.c (read_directory_file): Likewise.
  4375. * src/tar.c (decode_options):
  4376. ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
  4377. for consistency.
  4378. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
  4379. * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
  4380. * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
  4381. (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
  4382. (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
  4383. Define to 0 if the corresponding S_IF* macro is not defined.
  4384. (mkfifo): Do not define if already defined, or if S_IFIFO
  4385. is not defined.
  4386. * src/compare.c (diff_archive): Use HAVE_READLINK, not
  4387. S_ISLNK, to determine whether to invoke readlink.
  4388. * src/create.c (dump_file): Likewise.
  4389. * src/extract.c (set_mode):
  4390. Do not chmod unless we are root or the -p option was given;
  4391. this matches historical practice.
  4392. (unlink_destination): New function, which checks for unlink failures.
  4393. (maybe_recoverable): Stay quiet if -U.
  4394. (extract_archive): Use O_EXCL if unlink_first_option.
  4395. Report unlink failures.
  4396. Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
  4397. Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
  4398. mkfifo exists.
  4399. * src/incremen.c (get_directory_contents): Depend on
  4400. S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
  4401. * src/list.c: Remove S_IS* ifdefs.
  4402. * src/misc.c (maybe_backup_file): Likewise.
  4403. * src/misc.c (maybe_backup_file):
  4404. "Virtual memory exhausted" -> "Memory exhausted",
  4405. to conform to the other places this message is issued.
  4406. * src/mangle.c (extract_mangle):
  4407. Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
  4408. * src/rtapelib.c (rmt_open__):
  4409. Remove typo that caused us to omit the first char
  4410. of the basename.
  4411. 1999-07-16 Paul Eggert <eggert@twinsun.com>
  4412. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
  4413. * doc/tar.texi: A path name is excluded if any of its file name
  4414. components matches an excluded pattern, even if the path name was
  4415. specified on the command line.
  4416. * src/create.c (create_archive): Likewise.
  4417. * src/list.c (read_and): Likewise.
  4418. * src/update.c (update_archive): Likewise.
  4419. * lib/exclude.h (excluded_pathname): New decl.
  4420. * lib/exclude.c (_GNU_SOURCE): Define.
  4421. (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
  4422. (excluded_filename_opts): New function.
  4423. (excluded_pathname): New function.
  4424. * lib/Makefile.am (EXTRA_DIST):
  4425. xstrtol.c moved here from libtar_a_SOURCES.
  4426. (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
  4427. Remove xstrtoul.c; no longer needed.
  4428. * lib/xstrtol.c: Remove.
  4429. * src/tar.c (decode_options):
  4430. Set newer_time_option to TYPE_MINIMUM, so that
  4431. negative timestamps are handled correctly.
  4432. Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
  4433. uniformity (and so that we don't need to have the other fns).
  4434. (main): Remove call to init_total_written; no longer needed.
  4435. * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
  4436. checks for unsigned long and long long.
  4437. * src/arith.c: Remove.
  4438. * src/Makefile.am (tar_SOURCES): Remove arith.c.
  4439. * po/POTFILES.in: Remove src/arith.c.
  4440. * src/arith.h: Use double, to simplify configuration gotchas.
  4441. (tarlong): Now double.
  4442. (TARLONG_FORMAT): New macro.
  4443. (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
  4444. LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
  4445. zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
  4446. add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
  4447. zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
  4448. mult_tarlong, print_tarlong): Remove. All callers replaced with
  4449. arithmetic ops.
  4450. * src/common.h (init_total_written): Remove decl.
  4451. * src/buffer.c (total_written):
  4452. Remove; replaced with prev_written + bytes_written.
  4453. (prev_written): New var.
  4454. (init_total_written): Remove.
  4455. (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
  4456. * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
  4457. Make sure that we can shift, multiply
  4458. and divide unsigned long long values; Ultrix cc can't do it.
  4459. * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
  4460. Check for any unknown bits, not just unknown bits left of the leftmost
  4461. known bit.
  4462. * lib/quotearg.c (quotearg_buffer):
  4463. Don't quote spaces if C quoting style.
  4464. * src/list.c (from_oct):
  4465. Use C quoting style for error; omit trailing NULs.
  4466. 1999-07-14 Paul Eggert <eggert@twinsun.com>
  4467. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
  4468. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
  4469. <inttypes.h> defines strtoumax as a macro (and not as a function).
  4470. HP-UX 10.20 does this.
  4471. * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
  4472. * PORTS, README, TODO, doc/tar.texi: Likewise.
  4473. 1999-07-12 Paul Eggert <eggert@twinsun.com>
  4474. * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
  4475. (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
  4476. * src/list.c (decode_header):
  4477. Do not assume that S_IFBLK and S_IFCHR are defined.
  4478. * src/create.c (start_header): Do not assume S_IFMT is defined.
  4479. (dump_file): Remove unnecessary check for screwy apollo lossage.
  4480. Do not assume S_IFBLK and S_IFCHR are defined.
  4481. * src/extract.c (extract_archive):
  4482. Test whether S_IFCHR and S_IFBLK are nonzero,
  4483. not whether they are defined, for consistency with other tests.
  4484. * src/buffer.c (is_regular_file):
  4485. Don't succeed on files that we can't access due to
  4486. permissions problems.
  4487. (open_archive): Fix wording on fatal error message.
  4488. Don't bother to stat /dev/null if the archive is not a character
  4489. special device.
  4490. * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
  4491. Report an error, not a warning, for I/O errors.
  4492. (process_rawdata, process_dumpdir, diff_sparse_files):
  4493. Change ungrammatical "Data differs" to "Contents differ".
  4494. (get_stat_data): Find hidden files on AIX.
  4495. Accept file name as argument; all uses changed.
  4496. (get_stat_data, diff_archive): Use system error message for
  4497. nonexistent files rather than rolling our own.
  4498. (diff_archive): Unknown file types are errors, not warnings.
  4499. Normalize spelling of message to "File type differs".
  4500. Use get_stat_data to get link status, for consistency.
  4501. Do not inspect st_rdev for fifos.
  4502. Do not assume st_mode values contain only file types and mode bits.
  4503. Check for mode changes and device number changes separately.
  4504. * src/update.c (append_file):
  4505. Open the file before statting it, to avoid a race.
  4506. Complain about file shrinkage only when we reach EOF.
  4507. 1999-07-08 Paul Eggert <eggert@twinsun.com>
  4508. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
  4509. * configure.in (AC_EXEEXT): Add.
  4510. * lib/Makefile.am (noinst_HEADERS):
  4511. Add basename.h, exclude.h. Remove full-write.h.
  4512. (libtar_a_SOURCES): Add exclude.c.
  4513. * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
  4514. New files.
  4515. * lib/full-write.c: Include safe-read.h instead of full-write.h.
  4516. * lib/safe-read.h (safe_read): New decl.
  4517. * src/rmt.c: Include safe-read.h.
  4518. * src/rtapelib.c: Include basename.h, save-read.h.
  4519. (rmt_open__): Use base_name to compute base name.
  4520. * src/common.h:
  4521. Include basename.h, exclude.h; don't include full-write.h.
  4522. (exclude_option): Remove decl.
  4523. (excluded): New decl.
  4524. (add_exclude, add_exclude_file, check_exclude): Remove decls.
  4525. * src/list.c (read_and):
  4526. Use excluded_filename instead of check_exclude.
  4527. Check base name of incoming file name, not entire file name, when
  4528. deciding whether to exclude it.
  4529. * src/create.c (finish_sparse_file):
  4530. Use excluded_filename instead of check_exclude.
  4531. Don't bother to stat excluded file names.
  4532. * src/incremen.c (get_directory_contents): Likewise.
  4533. * src/names.c (exclude_pool, exclude_pool_size,
  4534. allocated_exclude_pool_size, simple_exclude_array,
  4535. simple_excludes, allocated_simple_excludes,
  4536. pattern_exclude_array, pattern_excludes,
  4537. allocated_pattern_excludes, add_exclude, add_exclude_file,
  4538. check_exclude):
  4539. Remove; now done in ../lib/exclude.c.
  4540. * src/tar.c (decode_options): Initialize `excluded'.
  4541. Use new add_exclude_file and add_exclude functions.
  4542. 1999-07-05 Paul Eggert <eggert@twinsun.com>
  4543. * m4/gettext.m4: Use changequote rather than [[ ]].
  4544. * lib/safe-read.c: Renamed from lib/full-read.c.
  4545. (safe_read): Renamed from full_read. All uses changed.
  4546. * lib/safe-read.h, lib/full-write.h: New files.
  4547. * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
  4548. (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
  4549. * lib/full-write.c: Include full-write.h.
  4550. * src/common.h: Include full-write.h, safe-read.h.
  4551. * src/system.h: (full_read, full_write): Remove decls.
  4552. * src/Makefile.am (datadir): New var; needed for Solaris gettext.
  4553. * src/system.h (bindtextdomain, textdomain): undef before
  4554. defining, to avoid preprocessor warnings with --disable-nls
  4555. on hosts whose locale.h includes libintl.h.
  4556. * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
  4557. expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
  4558. (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
  4559. the above decl.
  4560. 1999-07-02 Paul Eggert <eggert@twinsun.com>
  4561. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
  4562. * m4/mktime.m4: New file.
  4563. * m4/Makefile.am.in, m4/README: Remove these files.
  4564. * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
  4565. remove README, Makefile.am.in.
  4566. (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
  4567. * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
  4568. not AM_FUNC_MKTIME.
  4569. * src/tar.c: Include signal.h.
  4570. (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
  4571. (main): Ensure SIGCHLD is not ignored.
  4572. (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
  4573. MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
  4574. OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
  4575. RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
  4576. VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
  4577. OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
  4578. OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
  4579. OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
  4580. they don't overlap with char codes. Use an enum instead of a lot
  4581. of #defines.
  4582. * src/system.h (ISASCII): Remove.
  4583. (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
  4584. S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
  4585. S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
  4586. MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
  4587. LONG_MAX): New macros.
  4588. * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
  4589. (read_directory_file): Cast ISSPACE arg to unsigned char.
  4590. * src/misc.c (ISPRINT): Remove; now in system.h.
  4591. (remove_any_file): Add brackets to pacify gcc -Wall.
  4592. * src/list.c: Don't include <ctype.h>; system.h already does this.
  4593. (ISODIGIT, ISSPACE): Remove; now in system.h.
  4594. (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
  4595. does this now.
  4596. (from_oct): Cast ISSPACE arg to unsigned char.
  4597. * src/create.c (mode_to_oct): Translate modes from internal to
  4598. external form.
  4599. * src/list.c (mode_from_oct): Translate modes from external to
  4600. internal form. Do not complain about unrecognized mode bits.
  4601. * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
  4602. TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
  4603. * src/extract.c: (extr_init, make_directories, extract_archive):
  4604. Do not assume mode bits have traditional Unix values.
  4605. * src/list.c (decode_mode): Likewise.
  4606. * src/create.c (start_header, dump_file): Likewise.
  4607. * src/buffer.c (child_open_for_compress,
  4608. child_open_for_uncompress, open_archive, (close_archive): Likewise.
  4609. * src/compare.c (diff_archive): Likewise.
  4610. * src/extract.c (set_mode): Use %04 not %0.4 format.
  4611. (extract_sparse_file): Do not use data_block uninitialized.
  4612. Check for lseek failures.
  4613. * src/rtapelib.c (rmt_lseek__):
  4614. Convert lseek whence values to portable integers on the wire.
  4615. * src/rmt.c (main): Likewise. Check for whence values out of range.
  4616. * src/create.c (finish_sparse_file): Use lseek whence macros
  4617. instead of integers.
  4618. * src/buffer.c (backspace_output): Likewise.
  4619. * src/compare.c (diff_archive, verify_volume): Likewise.
  4620. * src/delete.c (move_archive): Likewise.
  4621. * src/extract.c (extract_sparse_file): Likewise.
  4622. * src/create.c (dump_file): Do not invoke finish_sparse_file
  4623. on a negative file descriptor.
  4624. * src/buffer.c: Add braces to pacify gcc -Wall.
  4625. * src/compare.c (diff_sparse_files): Report lseek errors.
  4626. * configure.in (ALL_LINGUAS): Add cs, es, ru.
  4627. * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
  4628. * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
  4629. message to be internationalized; \a doesn't work with msgfmt.
  4630. * src/tar.c (long_options, main, usage, OPTION_STRING):
  4631. Remove -E or --ending-file.
  4632. * src/list.c (read_and): Likewise.
  4633. * src/common.h (ending_file_option): Likewise.
  4634. * src/buffer.c (close_archive): Likewise.
  4635. * tests/after: Don't run two commands together in a pipeline,
  4636. as some old shells mishandle pipeline exit status.
  4637. 1999-06-28 Paul Eggert <eggert@twinsun.com>
  4638. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
  4639. * NEWS: Describe changes since 1.12.
  4640. * README: Update bug reporting address; move paxutils ref to NEWS.
  4641. Handle EINTR correctly.
  4642. * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
  4643. * lib/full-read.c, lib/full-write.c: New files.
  4644. * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
  4645. Prefer full_read to read and full_write to write.
  4646. * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
  4647. * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
  4648. Likewise.
  4649. * src/extract.c (extract_sparse_file): Likewise.
  4650. * src/rmt.c (get_string, main, report_error_message,
  4651. report_numbered_error): Likewise.
  4652. * src/rmt.h (rmtread, rmtwrite): Likewise.
  4653. * src/rtapelib.c (do_command, get_status_string, rmt_read__,
  4654. rmt_write__, rmt_ioctl__): Likewise.
  4655. * src/update.c (append_file): Likewise.
  4656. * src/system.h (full_read, full_write): New decls.
  4657. * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
  4658. lib/xmalloc.c, src/arith.c, src/misc.c.
  4659. * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
  4660. New macros. All uses of STDIN and STDOUT changed.
  4661. * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
  4662. instead of 0 and STDOUT_FILENO instead of 1.
  4663. * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
  4664. instead of fileno (stdin) and fileno (stdout) or 0 and 1.
  4665. * src/rmt.c (private_strerror): Avoid const. Translate results.
  4666. * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
  4667. in the presence of NFS clock skew.
  4668. 1999-06-25 Paul Eggert <eggert@twinsun.com>
  4669. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
  4670. * src/buffer.c (write_archive_buffer): New function.
  4671. (child_open_for_compress, flush_write, flush_read): Use it to write
  4672. buffers.
  4673. (open_archive): Report error if fstat of archive fails.
  4674. Improve efficiency of check for /dev/null.
  4675. Also, fix some corner cases with remote archives and /dev/null checking.
  4676. (close_archive): Test for input fifo only if not remote.
  4677. Truncate output archive only if it's not remote.
  4678. * src/misc.c (remove_any_file):
  4679. Don't terminate if you see . or ..; just skip them.
  4680. 1999-06-18 Paul Eggert <eggert@twinsun.com>
  4681. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
  4682. Output sizes using a format that's more compatible with
  4683. traditional tar (and with GNU Emacs).
  4684. * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
  4685. MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
  4686. Don't subtract 1 from size.
  4687. * src/create.c (to_oct): Prepend leading zeros, not spaces.
  4688. Output a trailing NUL unless the value won't fit without it.
  4689. (finish_header): No need to append NUL to chksum, now that
  4690. to_oct is doing it.
  4691. 1999-06-16 Paul Eggert <eggert@twinsun.com>
  4692. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
  4693. * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
  4694. @INTLLIBS@ might invoke rpl_realloc.
  4695. * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
  4696. (intconv): Remove; use xstrto* fns instead.
  4697. ("xstrtol.h"): Include.
  4698. (check_decimal): Remove.
  4699. (long_options, usage, OPTION_STRING, decode_options):
  4700. Remove -y, --bzip2, --unbzip2.
  4701. (decode_options): Use xget_version instead of get_version.
  4702. Check for overflow with -b and -L and RECORD_SIZE_OPTION.
  4703. Replace invocations of check_decimal with xstrtoumax.
  4704. * tests/preset.in (echo_n, echo_c): Remove.
  4705. * tests/after: Don't rely on $echo_c and $echo_n.
  4706. * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
  4707. lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
  4708. lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
  4709. lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
  4710. m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
  4711. m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
  4712. m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
  4713. m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
  4714. m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
  4715. m4/xstrtoumax.m4: New files.
  4716. * configure.in(fp_PROG_ECHO): Remove; no longer needed.
  4717. (AC_SYS_LARGEFILE): Renamed from AC_LFS.
  4718. (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
  4719. (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
  4720. (AC_CHECK_FUNCS): Remove lchown.
  4721. (AC_REPLACE_FUNCS): Remove basename, dirname.
  4722. Add lchown, strtol, strtoul.
  4723. (jm_FUNC_MKTIME): Add.
  4724. (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
  4725. are also built via the ANSI2KNR-filtering rules.
  4726. Use a no-op line to work around bug in automake 1.4 with malloc and
  4727. realloc.
  4728. (AC_OUTPUT): Add m4/Makefile.
  4729. * lib/Makefile.am (EXTRA_DIST):
  4730. Add lchown.c, malloc.c, mktime.c, realloc.c,
  4731. strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
  4732. (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
  4733. (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
  4734. xstrtoul.c, xstrtoumax.c. Remove getversion.c.
  4735. ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
  4736. * src/system.h (uintmax_t): Don't declare; configure now does this.
  4737. * src/common.h (backup_type): New decl.
  4738. * src/common.h, src/misc.c, src/tar.c:
  4739. Move include of backupfile.h to common.h.
  4740. * src/misc.c (maybe_backup_file):
  4741. Pass backup_type to find_backup_file_name.
  4742. * src/list.c (print_header): Change sizes of uform and gform from 11 to
  4743. UINTMAX_STRSIZE_BOUND.
  4744. * doc/tar.texi: Remove --bzip2.
  4745. Fix @xref typos reported by latest makeinfo.
  4746. * Makefile.am (ACLOCAL_AMFLAGS): New macro.
  4747. (SUBDIRS): Add m4.
  4748. (M4DIR, ACINCLUDE_INPUTS): New macros.
  4749. ($(srcdir)/acinclude.m4): New rule.
  4750. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
  4751. HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
  4752. now generated automatically by autoconf.
  4753. 1999-05-15 Paul Eggert <eggert@twinsun.com>
  4754. * doc/tar.texi: Remove -y.
  4755. 1999-04-09 Paul Eggert <eggert@twinsun.com>
  4756. * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
  4757. (we were allocating too much storage).
  4758. (uintmax_t): Don't declare; configure now does this.
  4759. * ABOUT-NLS: Update to gettext 0.10.35 edition.
  4760. 1999-03-22 Paul Eggert <eggert@twinsun.com>
  4761. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
  4762. * acinclude.m4 (AC_LFS_FLAGS):
  4763. Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
  4764. (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
  4765. (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
  4766. * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
  4767. New macros; needed for latest GNU xmalloc.c.
  4768. * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
  4769. (libtar_a_SOURCES): Add quotearg.c.
  4770. * list.c: Include <quotearg.h>.
  4771. (from_oct): Add forward decl.
  4772. (read_header): Return HEADER_FAILURE if we can't parse the checksum.
  4773. (from_oct): Report an error only if TYPE is nonzero.
  4774. Quote any funny characters in bad header.
  4775. 1999-03-20 Paul Eggert <eggert@twinsun.com>
  4776. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
  4777. * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
  4778. (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
  4779. changed.
  4780. (AC_LFS): Simplify AIX revision number test.
  4781. 1999-03-17 Paul Eggert <eggert@twinsun.com>
  4782. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
  4783. * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
  4784. Remove; it doesn't work that well
  4785. with AC_CANONICAL_HOST.
  4786. (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
  4787. * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
  4788. * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
  4789. * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
  4790. * tar.texi: Fix bug-report addr.
  4791. * README: Remove --with-included-malloc.
  4792. Upgrade version numbers of build software.
  4793. 1999-03-07 Paul Eggert <eggert@twinsun.com>
  4794. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
  4795. * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
  4796. where bindtextdomain and gettext require -lintl.
  4797. (AC_LFS_FLAGS): Simplify so that it only gets the flags;
  4798. `no' means it failed.
  4799. (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
  4800. (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
  4801. _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
  4802. to add anything to the command line (it's all in config.h).
  4803. Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
  4804. 1999-03-01 Paul Eggert <eggert@twinsun.com>
  4805. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
  4806. * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
  4807. * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
  4808. mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
  4809. uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
  4810. like OFF_MAX, which are not reliable
  4811. (e.g. OFF_MAX in AIX 4.2 is incorrect).
  4812. * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
  4813. SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
  4814. * src/incremen.c (get_directory_contents):
  4815. Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
  4816. Have statx depend on STX_HIDDEN, not AIX.
  4817. * src/create.c (to_oct):
  4818. New parameter substitute, giving a substitute value to use
  4819. when the original value is out of range. Do not append a space to the
  4820. output; modern tars don't. When a value is out of range, specify the
  4821. maximum value, not the number of bits.
  4822. (GID_NOBODY, UID_NOBODY): New macros.
  4823. (gid_to_oct, uid_to_oct): Use them as substitutes.
  4824. (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
  4825. (dump_file): Check whether the file changed as we read it.
  4826. * src/rmt.c (main): Remove suspicious AIX/386 code.
  4827. 1999-02-19 Paul Eggert <eggert@twinsun.com>
  4828. * intl/localealias.c (read_alias_file): Don't assume that memcpy
  4829. returns a type compatible with char *; it doesn't on SunOS
  4830. 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
  4831. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
  4832. * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
  4833. * doc/tar.texi: Add --bzip2, --unbzip2 options.
  4834. * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
  4835. Add.
  4836. (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
  4837. (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
  4838. * acinclude.m4 (AM_WITH_NLS):
  4839. Update to latest gettext version (serial 5).
  4840. (AC_LFS_FLAGS): New macro
  4841. (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
  4842. working only with unset variables. Append to CFLAGS, not CPPFLAGS.
  4843. Work properly in cross-compilation scenario, by checking for getconf
  4844. with AC_CHECK_TOOL and by ditching uname in favor of
  4845. AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
  4846. * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
  4847. replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
  4848. * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
  4849. since getdate.y now uses ANSI code.
  4850. * config.guess, config.sub: New files; taken from automake 1.4.
  4851. * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
  4852. intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
  4853. intl/explodename.c, intl/finddomain.c, intl/gettext.c,
  4854. intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
  4855. intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
  4856. intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
  4857. Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
  4858. 1999-02-01 Paul Eggert <eggert@twinsun.com>
  4859. * src/tar.c: Update copyright.
  4860. * NEWS: 1.12.64004
  4861. 1999-02-01 Paul Eggert <eggert@twinsun.com>
  4862. * NEWS, configure.in: Version 1.12.64004
  4863. * configure.in (AC_LFS): Use this macro, instead of open-coding it.
  4864. * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
  4865. * src/extract.c (extract_archive): Fix bug when extracting sparse
  4866. files: they were trashing the tar file header.
  4867. * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
  4868. Add -y or --bzip2 or --bunzip2 option.
  4869. 1999-01-30 Paul Eggert <eggert@twinsun.com>
  4870. * src/names.c (cached_no_such_uname, cached_no_such_gname,
  4871. cached_no_such_uid, cached_no_such_gid): New vars.
  4872. (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
  4873. Cache failures, too.
  4874. * src/tar.c (decode_options):
  4875. Don't pass names longer than UNAME_FIELD_SIZE to
  4876. uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
  4877. 1999-01-27 Paul Eggert <eggert@twinsun.com>
  4878. * NEWS, configure.in: Version 1.12.64003
  4879. * src/buffer.c (backspace_output, close_archive): Cast
  4880. rmtlseek position arg to off_t, for benefit of K&R compilers
  4881. with long long.
  4882. * src/compare.c (verify_volume): Likewise.
  4883. * NEWS, configure.in: Version 1.12.64002
  4884. * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
  4885. off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
  4886. Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
  4887. * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
  4888. mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
  4889. uid_from_oct): Likewise.
  4890. 1999-01-25 Paul Eggert <eggert@twinsun.com>
  4891. * incremen.sh: Fix timing bug in regression test.
  4892. 1999-01-22 Paul Eggert <eggert@twinsun.com>
  4893. * NEWS, configure.in: Update version
  4894. * Makefile.am (localedir): Change to $(datadir)/locale.
  4895. (DEFS): New macro, defining LOCALEDIR.
  4896. (tar.o, tar._o, rmt.o, rmt._o): Remove.
  4897. (INCLUDES): Add -I..
  4898. * Makefile.am (localedir): Change to $(datadir)/locale.
  4899. 1999-01-21 Paul Eggert <eggert@twinsun.com>
  4900. * NEWS, README, configure.in: Unofficial version 1.12.64001.
  4901. * tests/Makefile.am (localedir): Change to $(datadir)/locale.
  4902. * src/Makefile.am (localedir): Likewise.
  4903. (DEFS): New macro, defining LOCALEDIR.
  4904. (tar.o, tar._o, rmt.o, rmt._o): Remove.
  4905. (INCLUDES): Add `-I..'.
  4906. * tests/incremen.sh: Fix timing bug.
  4907. 1999-01-20 Paul Eggert <eggert@twinsun.com>
  4908. * NEWS, README, configure.in: Unofficial version 1.12.64000.
  4909. `lfs.7' changed to `64000' in version number
  4910. to conform to gnits standards.
  4911. * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
  4912. mkinstalldirs, ansi2knr.c: Update to latest public versions.
  4913. Rebuild with automake 1.4 and autoconf 2.13, to work around some
  4914. porting problems.
  4915. 1998-12-07 Paul Eggert <eggert@twinsun.com>
  4916. * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
  4917. * src/list.c (read_header):
  4918. Accept file names as specified by POSIX.1-1996 section 10.1.1.
  4919. 1998-11-30 Paul Eggert <eggert@twinsun.com>
  4920. * configure.in: Quote the output of uname.
  4921. * src/extract.c (set_stat): chmod after chown even when not root;
  4922. if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
  4923. 1998-11-15 Paul Eggert <eggert@twinsun.com>
  4924. * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
  4925. * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
  4926. ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
  4927. 1998-10-28 Paul Eggert <eggert@twinsun.com>
  4928. * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
  4929. * src/system.h (voidstar): Use void * if __STDC__ is defined,
  4930. not merely nonzero.
  4931. * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
  4932. On many installations, rexec is disabled.
  4933. 1998-08-07 Paul Eggert <eggert@twinsun.com>
  4934. * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
  4935. * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
  4936. for nameless users and groups.
  4937. 1998-02-17 Paul Eggert <eggert@twinsun.com>
  4938. * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
  4939. * NEWS, README: Add explanation of why this isn't an official version.
  4940. 1998-02-02 Paul Eggert <eggert@twinsun.com>
  4941. * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
  4942. This is an unofficial version.
  4943. 1997-12-17 Paul Eggert <eggert@twinsun.com>
  4944. * src/incremen.c (ST_DEV_MSB): New macro.
  4945. (NFS_FILE_STAT): Use most significant bit of st_dev,
  4946. even if it's unsigned.
  4947. 1997-12-08 Paul Eggert <eggert@twinsun.com>
  4948. * src/system.h (ST_NBLOCKS): Fix typo in definition.
  4949. 1997-11-19 Paul Eggert <eggert@twinsun.com>
  4950. * configure.in (HAVE_INTTYPES_H):
  4951. Don't ignore cache variable if it's already set.
  4952. 1997-11-10 Paul Eggert <eggert@twinsun.com>
  4953. * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
  4954. * src/delete.c (records_read): Now off_t.
  4955. (move_archive): Don't assume mt_count is of type daddr_t.
  4956. 1997-10-30 Paul Eggert <eggert@twinsun.com>
  4957. * configure.in (CPPFLAGS, LDFLAGS, LIBS):
  4958. Set to appropriate values if large file support
  4959. needs explicit enabling.
  4960. (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
  4961. ssize_t):
  4962. New macros to configure.
  4963. (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
  4964. * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
  4965. major_t, minor_t, ssize_t): New macros.
  4966. * src/arith.h (TARLONG_FORMAT):
  4967. Fix typo: %uld -> %lu. Use unsigned when long long
  4968. (%lld -> %llu).
  4969. (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
  4970. (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
  4971. * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
  4972. 2nd arg is now unsigned long.
  4973. * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
  4974. (prepare_record_buffer): Arg is now size_t.
  4975. Remove now-useless casts.
  4976. (main): Use `long' for status, so that it can store ssize_t.
  4977. Use daddr_t, mode_t, size_t, off_t when appropriate.
  4978. Convert daddr_t and off_t values ourselves, since they might be longer
  4979. than long. Convert other types using `long' primitives.
  4980. When processing MTIOCTOP, do not try to pass resulting
  4981. count back, since it won't work (it could be too large) and it's
  4982. not expected anyway.
  4983. * src/update.c:
  4984. (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
  4985. now-useless casts. Use unsigned long to print *_t types, except use
  4986. STRINGIFY_BIGINT for off_t.
  4987. (update_archive): Cast -1 to dev_t when necessary.
  4988. * src/tar.c (check_decimal):
  4989. Now returns 1 if successful, 0 otherwise, and returns
  4990. uintmax_t value into new arg. Check for arithmetic overflow.
  4991. (decode_options): Avoid overflow if record_size fits in size_t but not int.
  4992. Check for overflow on user or group ids.
  4993. * src/compare.c (diff_init, process_rawdata, read_and_process,
  4994. diff_sparse_files, diff_archive):
  4995. Use off_t, pid_t, size_t, ssize_t when appropriate.
  4996. Remove now-useless casts. Use unsigned long to print *_t types,
  4997. except use STRINGIFY_BIGINT for off_t.
  4998. (process_noop, process_rawdata, process_dumpdir, read_and_process):
  4999. Size arg is now size_t.
  5000. (diff_sparse_files): Arg is now off_t. Check for size_t overflow
  5001. when allocating buffer.
  5002. * src/rtapelib.c:
  5003. (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
  5004. Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
  5005. Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
  5006. off_t.
  5007. (get_status_string, get_status_off): New function.
  5008. (get_status): Now returns long, so that it can store ssize_t.
  5009. Invoke get_status_string to do the real work.
  5010. (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
  5011. (rmt_lseek__): Now returns off_t, using new get_status_off function.
  5012. (rmt_ioctl__): Convert mt_count by hand,
  5013. since it might be longer than long.
  5014. * src/mangle.c (extract_mangle):
  5015. Check for overflow when converting off_t to size_t.
  5016. Use off_t, size_t when appropriate. Remove now-useless casts.
  5017. * src/system.h (mode_t): Remove; now done by autoconf.
  5018. (ST_NBLOCKS): Do not overflow if st_size is near maximum.
  5019. Return number of ST_NBLOCKSIZE-byte blocks,
  5020. not number of 512-byte blocks;
  5021. this also helps to avoid overflow.
  5022. (st_blocks): Declare if needed.
  5023. (ST_NBLOCKSIZE): New macro.
  5024. (<limits.h>, <inttypes.h>): Include if available.
  5025. (CHAR_BIT): New macro.
  5026. (uintmax_t): New typedef.
  5027. (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
  5028. UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
  5029. OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
  5030. * src/names.c (name_init):
  5031. Fix typo in error message: FILE* was passed, but char*
  5032. was wanted.
  5033. (read_name_from_file, name_gather, addname, name_match, name_scan,
  5034. add_exclude): Use size_t when appropriate. Remove now-useless casts.
  5035. (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
  5036. * src/extract.c (newdir_umask, current_umask): Now mode_t.
  5037. (extract_sparse_file): Args now use off_t.
  5038. (set_mode, set_stat, make_directories, extract_sparse_file,
  5039. extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
  5040. now-useless casts. Use unsigned long to print *_t types, except use
  5041. STRINGIFY_BIGINT for off_t.
  5042. * src/misc.c (quote_copy_string):
  5043. Use size_t when appropriate. Remove now-useless casts.
  5044. * src/list.c (read_and, list_archive, read_header, decode_mode,
  5045. print_header, print_for_mkdir):
  5046. Use mode_t, off_t, size_t when appropriate. Remove
  5047. now-useless casts. Use unsigned long to print *_t types, except use
  5048. STRINGIFY_BIGINT for off_t.
  5049. (read_header): Check for overflow when converting header size.
  5050. (from_oct): Now static. Now returns uintmax_t. `where' arg is now
  5051. const char *. Size arg is now size_t. Now takes new type and maxval
  5052. args. Compute result using uintmax_t, not long. Report error if
  5053. field does not contain octal number in range.
  5054. (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
  5055. off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
  5056. uintmax_from_oct): New functions.
  5057. (stringify_uintmax_t_backwards): New function.
  5058. (decode_mode, print_for_mkdir): Mode arg is now mode_t.
  5059. (skip_file): Offset arg is now off_t.
  5060. * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
  5061. real_s_totsize, real_s_sizeleft, current_block_ordinal):
  5062. Now off_t.
  5063. (write_error): Arg is now ssize_t.
  5064. (child_pid): Now pid_t.
  5065. (available_space_after): Now size_t.
  5066. (child_open_for_compress, child_open_for_uncompress, flush_write,
  5067. open_archive, flush_write, write_error, flush_read, close_archive):
  5068. Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
  5069. casts. Use unsigned long to print *_t types, except use
  5070. STRINGIFY_BIGINT for off_t.
  5071. * src/delete.c (records_read): Now daddr_t.
  5072. (move_archive): Arg is now daddr_t. Check for overflow when
  5073. computing offset.
  5074. (move_archive, delete_archive_members): Use daddr_t, off_t when
  5075. appropriate. Remove now-useless casts.
  5076. * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
  5077. (rmt_lseek): Now returns off_t.
  5078. * src/create.c (to_oct):
  5079. Now static. Value arg is now uintmax_t. Accept new args
  5080. giving name of type of octal field, for error messages. Report an
  5081. error if the value is too large to fit in the field.
  5082. (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
  5083. size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
  5084. (write_eot, write_long, finish_header, deal_with_sparse,
  5085. finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
  5086. appropriate. Remove now-useless casts. Use unsigned long to print
  5087. *_t types, except use STRINGIFY_BIGINT for off_t.
  5088. (find_new_file_size): 1st arg is now off_t*.
  5089. (finish_sparse_file): Args now use off_t, not long.
  5090. Check for lseek error.
  5091. (create_archive, dump_file): Cast -1 to dev_t when necessary.
  5092. (dump_file): Device arg is now dev_t.
  5093. Avoid overflow when testing whether file has holes
  5094. by using the new ST_NBLOCKSIZE macro.
  5095. * src/incremen.c (struct accumulator, add_to_accumulator,
  5096. get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
  5097. Use size_t for sizes.
  5098. (struct directory, get_directory_contents, add_hierarchy_to_namelist):
  5099. Use dev_t, ino_t for devices and inodes.
  5100. (gnu_restore): Use off_t for file offsets.
  5101. (struct directory): Use char for flags. Add new flag `nfs'.
  5102. (nfs): New constant
  5103. (NFS_FILE_STAT): New macro.
  5104. (note_directory): Accept struct stat * instead of
  5105. device and inode number. All callers changed.
  5106. (note_directory, get_directory_contents):
  5107. Use NFS_FILE_STAT to determine whether directory is an NFS directory.
  5108. (write_dir_file): Cast time_t to unsigned long before printing as %lu.
  5109. * src/common.h (record_size, struct name, struct sp_array,
  5110. available_space_after):
  5111. Use size_t for sizes.
  5112. (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
  5113. Use off_t for file offsets.
  5114. (struct name): dir_contents is now const char *, not char *.
  5115. (dump_file, get_directory_contents): Use dev_t for devices.
  5116. (to_oct): Remove decl.
  5117. (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
  5118. UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
  5119. GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
  5120. OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
  5121. UINTMAX_FROM_OCT): New macros.
  5122. (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
  5123. size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
  5124. stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
  5125. minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
  5126. time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
  5127. (print_for_mkdir): 2nd arg is now mode_t.
  5128. See ChangeLog.1 for earlier changes.
  5129. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software
  5130. Foundation, Inc.
  5131. This file is part of GNU tar.
  5132. GNU tar is free software; you can redistribute it and/or modify
  5133. it under the terms of the GNU General Public License as published by
  5134. the Free Software Foundation; either version 2, or (at your option)
  5135. any later version.
  5136. GNU tar is distributed in the hope that it will be useful,
  5137. but WITHOUT ANY WARRANTY; without even the implied warranty of
  5138. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  5139. GNU General Public License for more details.
  5140. You should have received a copy of the GNU General Public License
  5141. along with GNU tar; see the file COPYING. If not, write to
  5142. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  5143. Boston, MA 02110-1301, USA.
  5144. Local Variables:
  5145. mode: change-log
  5146. version-control: never
  5147. End: