4
0

ChangeLog 132 KB

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