ChangeLog 156 KB

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