ChangeLog 199 KB

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