Commit Graph

7104 Commits

Author SHA1 Message Date
David E. O'Brien
7866c62aa6 Don't try to programatically support running file(1) w/in /usr/obj or other
non-standard install path.

Agreed with:	ru
2004-08-09 11:05:09 +00:00
David E. O'Brien
dbb4a9b4e5 Uncomment the real paths and remove the local debugging paths.
Noticed by:	ru (who's faster than 'make world' on my stock src test machine)
2004-08-09 10:47:50 +00:00
Yen-Ming Lee
8a370b6458 add myself. :) 2004-08-09 10:22:52 +00:00
David E. O'Brien
c44c53612c The file consumer binary, which depends on the libmagic. 2004-08-09 08:49:49 +00:00
Alfred Perlstein
d10f73b311 don't seg if the syscall is invalid for i386fbsd. 2004-08-08 23:29:36 +00:00
David Malone
7e6990487d s/FALLTHOUGH/FALLTHROUGH/
Submitted by:	Xin LI <delphij@frontfree.net>
2004-08-08 18:59:19 +00:00
Tim Kientzle
b757c8251b gtar uses -F for another purpose, so bsdtar no longer treats it as a
synonym for --format.  Update the man page to reflect this.  While
I'm here, change the man page to document "tar" rather than "bsdtar,"
update some comments about -l compatibility and fix a few grammar nits.
2004-08-08 17:20:23 +00:00
Tim Kientzle
6fc954815f Better low-memory handling: If the link cache runs out of memory, just
throw out the whole thing and stop tracking links entirely.  That will
break all remaining hardlinks, but should free up enough memory to
let everything finish.
2004-08-08 06:36:03 +00:00
Tim Kientzle
991f1d87bb Move the smart chdir logic into a couple of utility functions in util.c.
Then use them to provide consistent -C support throughout the program.
Thanks to: Christoph Mallon
2004-08-08 05:50:10 +00:00
Tim Kientzle
dd1a40a3c0 It shouldn't be an error to specify the same mode twice: allow -cc but not -ct.
Thanks to: Christoph Mallon (whose proposed patch was actually
   simpler than what I ended up with)
2004-08-08 05:10:10 +00:00
Tim Kientzle
3387f49acb Another pointy-hat problem: PACKAGE_VERSION macro is set in
CFLAGS, it shouldn't be in bsdtar_platform.h.
Thanks to: Andrey Chernov for looking over my shoulder so much lately.
2004-08-08 04:36:32 +00:00
Tim Kientzle
5ccc2612d1 Minor portability fixes. bsdtar now compiles on Win32/cygwin, though
it doesn't yet seem to work entirely correctly.
2004-08-08 01:30:30 +00:00
Marcel Moolenaar
dedea514a8 Oh yeah? 4 born in the Netherlands. Taken relative to the size of
the country (i.e. committer density), we're in the top 5 for sure! :-)
2004-08-07 22:09:26 +00:00
Nicolas Souchu
bc31d0a1d7 10 born in France now! 2004-08-07 21:14:50 +00:00
Tim Kientzle
8095e9d82b Add --totals option. Unlike gtar, this reports the bytes actually
written to the archive, not the ones written to the compressor.
For uncompressed archives, these numbers are the same, of course.
2004-08-07 19:25:34 +00:00
Tim Kientzle
dfee4c496f Linux port corrections:
* Add a more reasonable default device for linux
   * Add an autoconf check for the FNM_LEADING_DIR extension
     (which isn't yet obeyed in the code)
2004-08-07 17:17:11 +00:00
Stefan Farfeleder
4e14c144e1 Assign the result of getopt() to an int rather than to a char. 2004-08-07 07:05:38 +00:00
Tim Kientzle
5232906014 Add "make distfile" capabilities to bsdtar, including informational
COPYING file and some conditional compilation cleanups.
2004-08-07 03:24:49 +00:00
Colin Percival
d37df47d31 Join the 21st century: Cryptography is no longer an optional component
of releases.  The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by:	re (scottl), markm
Discussed on:	freebsd-current, in late April 2004
2004-08-06 07:27:08 +00:00
Maksim Yevmenkin
2aa65cf739 - One can use both BD_ADDR or name to specify address of the Bluetooth device.
Update man pages to document this fact.

- Update usage messages

- Change u_intXXX to uintXXX
2004-08-05 16:32:41 +00:00
Tim Kientzle
d9fbe79b07 Ensure that there's always a space between the user name and
group name in -tv output format.
2004-08-05 05:46:22 +00:00
Hartmut Brandt
413d82a6fd Correct the .Dd date. Pluralize 'assignment' in one place.
Requested by: ru
2004-08-04 15:10:35 +00:00
Garance A Drosehn
a124b93c1f Remove these three files left-over from my unsuccessful attempt to
re-import `patch' into this location.  Instead I think I will import
it to 'patch-b', and that way I can be sure that I am starting with
a clean slate WRT the CVS repository.
2004-08-04 03:24:25 +00:00
Tim J. Robbins
ca57a58d0b Add a standard DIAGNOSTICS section. 2004-08-04 03:02:14 +00:00
Tim J. Robbins
ff1b94f04f Add a standard DIAGNOSTICS section. 2004-08-04 02:55:25 +00:00
Tim J. Robbins
da7214a98d Add ENVIRONMENT and DIAGNOSTICS sections. 2004-08-04 02:51:46 +00:00
Tim J. Robbins
9a1e2d06e8 In next(), ensure that 'done' is set in the case when a file cannot
be opened, to avoid trying to read standard input after already closing
it, which resulted in EBADF errors.
2004-08-04 02:47:32 +00:00
Hartmut Brandt
3f3d0ec007 Correct the description of the MFLAGS and .MAKEFLAGS variables. Add
the MFLAGS target. Document that variable assignments from the MAKEFLAGS
environment variable and the .MAKEFLAGS and .MFLAGS target have the
same precedence as command line variable assignments.
2004-08-03 19:14:14 +00:00
Hartmut Brandt
d98bc4ce72 Put variable assignments from the command line into the MAKEFLAGS
variable as required by POSIX. This causes such variables to be
pushed into all sub-makes called by the make (except when the MAKEFLAGS
variable is explicitely changed in the sub-make's environment).
This makes them also mostly un-overrideable in sub-makes except on the
sub-make's command line. Therefor specifying 'make CC=icc' will cause
icc to be used as C compiler in all sub-makes no matter what the Makefiles
itself try to do to the CC variable.

This patch also corrects the handling of the MFLAGS variable. MFLAGS
contains all the command line flags but not the command line variable
assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now
changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only).
Makefiles can use MFLAGS for their own purposes given that they do not
except MFLAGS to be undefined at the beginning and that they don't evaluate
.MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance,
but it is unfortunately heavily used by the X makefiles.

This has been extensively tested by port builds (thanks to portmgr), new
worlds and kernels.

PR:		standards/57295 (1st part above)
Submitted by:	James E. Flemer <jflemer@alum.rpi.edu>
Approved by:	portmgr
Obtained from:	NetBSD (1st part above)
MFC after:	4 weeks
2004-08-03 18:56:31 +00:00
Hartmut Brandt
b74851fe56 Make the SIGCHLD handler static and declare its argument
as unused, so that make can be compiled with WARNS=3 again.
2004-08-03 18:43:43 +00:00
Tim Kientzle
a6cc81c62c GNU and POSIX disagree about -o and -l.
For -l, upset everyone by breaking it.  Specifically, -l now produces
a lengthy error message that suggests --check-links (POSIX -l) or
--one-file-system (GNU -l) instead.  However, if POSIXLY_CORRECT is set,
use the POSIX interpretation.

For -o, please everyone by making it work both ways:
  * -xo uses POSIX behavior
  * -co uses "almost GNU" behavior (as close as we can get until
    libarchive implements a true V7 tar format)
2004-08-03 06:19:08 +00:00
Tim J. Robbins
633401b573 Remove la_LN.* from the list of bogus locales. They're incomplete, but
still potentially useful.
2004-08-02 12:50:12 +00:00
Tim J. Robbins
7cf18ceb88 Exclude bogus la_LN.* and UTF-8 locales from the output of locale -a
to discourage people from using them.
2004-08-02 12:28:28 +00:00
Tim J. Robbins
f9dd3a8b6f Add cross-reference to fmt(1) and a fairly standard ENVIRONMENT section. 2004-08-02 11:15:01 +00:00
Tim J. Robbins
15cdd785f8 Cross-reference fold(1). 2004-08-02 11:12:13 +00:00
Tim J. Robbins
28d92b747e Add support for multibyte characters. 2004-08-02 11:10:20 +00:00
Tim J. Robbins
f8fb286a84 Document incorrect handling of multibyte characters with -I and -J options. 2004-08-02 03:07:42 +00:00
Garance A Drosehn
a444635406 This commit was generated by cvs2svn to compensate for changes in r132977,
which included commits to RCS files with non-trunk default branches.
2004-08-01 20:45:54 +00:00
Garance A Drosehn
a9c7144e7a Import of a BSD-licensed version of `patch', which will eventually
replace the version we currently have in src/gnu/usr.bin/patch/.
Among other things, this version includes a --posix option for strict
POSIX conformance.

This version is the current source from OpenBSD as of today.  It is
their 3.5-release, plus a few updates to patch.c and pch.c that they
made about three weeks ago.
2004-08-01 20:45:54 +00:00
Tim Kientzle
1c962ead2f Correct the explanation of the -X option.
Thanks to: Pav Lucistnik
2004-08-01 20:09:08 +00:00
Alfred Perlstein
dcd6f4bd48 Comment some of the 'io' functions. 2004-08-01 09:19:41 +00:00
Tim J. Robbins
70cd856a0c Check for read errors. 2004-07-31 06:22:57 +00:00
Tim J. Robbins
be5c85a71b Add standard DIAGNOSTICS section. 2004-07-31 06:22:01 +00:00
Tim J. Robbins
243041573f Add support for multibyte characters, loosely based on Bruno Haible's
work in the util-linux packages, but with some minor fixes.
2004-07-31 06:19:26 +00:00
Tim J. Robbins
5c14453b7f Fix some particularly bad style(9) violations. 2004-07-31 04:33:13 +00:00
Tim J. Robbins
be091cf3cc Check for read errors. 2004-07-30 10:58:06 +00:00
Colin Percival
fe6a04858c Document the behaviour of the "-o file" option when "file" is a directory
(downloaded file(s) are created inside the directory).

MFC after:	3 days
2004-07-30 08:43:16 +00:00
Tim Kientzle
92371d176f Improve portability to FreeBSD 4.
Thanks to: Barry Bouwsma
2004-07-30 02:59:58 +00:00
Tim Kientzle
cfdb7dd69b Fix comment.
Thanks to: Johan Karlsson
2004-07-30 02:46:12 +00:00
Tim J. Robbins
752448ce84 Document incorrect handling of multibyte characters. 2004-07-30 00:10:52 +00:00
Alexander Kabaev
9eaa475e3e Stop the practice of installing external headers into GCC-specific directory.
Install FlexLexer.h into /usr/include directly.
2004-07-30 00:08:15 +00:00
Tim J. Robbins
e5afeeb3be Add support for multibyte characters, based on Bruno Haible's work
in the util-linux package.
2004-07-29 22:51:54 +00:00
Maxim Konovalov
79d0f70f09 The signal number has to be less than NSIG strictly.
PR:		misc/69768
Submitted by:	bronek
MFC after:	1 week
2004-07-29 18:36:35 +00:00
Hartmut Brandt
d010007507 Bump the date in .Dd for the recent '+' flag commit.
Requested by: ru
2004-07-29 16:54:42 +00:00
Hartmut Brandt
34c9c43931 Implement POSIX's '+' flag for command lines. This flag causes a line
to be executed even when -n is given on the command line to make. This is
very handy for calls to submakes.

This is slightly changed from the original patch as obtained from NetBSD.
The NetBSD variant prints lines which have both '+' and '@' when -n
is specified. The commited version always obeys '@'.

Bump MAKE_VERSION so Makefiles can use this conditionally.

PR:		standards/66357 (partly)
Submitted by:	Mark Baushke <mdb@juniper.net>
Obtained from:	NetBSD
2004-07-29 14:29:23 +00:00
Tim J. Robbins
5480f12049 Add support for multibyte characters. 2004-07-29 13:22:56 +00:00
Tim J. Robbins
d10ab05ebd Add support for multibyte characters. The output is questionable when a
character straddles the "start" or "stop" columns, but this should be
quite uncommon.
2004-07-29 09:09:22 +00:00
Tim J. Robbins
a732e584d0 Add a cross-reference to colcrt(1). 2004-07-29 07:41:43 +00:00
Tim J. Robbins
919480b7be Sort #include directives and remove one duplicate that crept in to the
previous commit.
2004-07-29 07:28:26 +00:00
Tim J. Robbins
c3fae7442e Add support for multibyte characters, loosely based on Bruno Haible's
work in the util-linux package.
2004-07-29 07:23:37 +00:00
Tim J. Robbins
e22bb9db9a Change the 'no terminating ";"' error message to 'no terminating ";" or "+"'
since + is also a valid way to terminate -exec.
2004-07-29 03:33:55 +00:00
Tim J. Robbins
cc4165333c Remove partial support for building this on NetBSD. 2004-07-29 03:29:44 +00:00
Tim J. Robbins
053e1a39a3 Now that fnmatch() supports multibyte characters, find does too; remove
entry from BUGS section that said otherwise.
2004-07-29 03:24:30 +00:00
Gleb Smirnoff
77ef8a97cd Print link level address on vlan interfaces using ether_ntoa(), to make
output on bare ethernet and vlan interfaces the same.

PR:		bin/69674
Submitted by:	Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
Reviewed by:	ru
Approved by:	julian (mentor)
MFC after:	1 week
2004-07-28 18:18:47 +00:00
Stefan Farfeleder
14cc87e479 Use the length modifier 'll' instead of 'q' to print long longs. 2004-07-28 16:03:13 +00:00
Alexander Kabaev
e96993d049 Remove local malloc prototypes, which are incorrect and conflict with
both GCC builtin and system declared ones.
2004-07-28 07:12:30 +00:00
Alexander Kabaev
e95e2344a8 Do not predeclare __inline functions, this makes no sense and generates
a warning with gcc 3.4.x.
2004-07-28 07:10:03 +00:00
Colin Percival
2cb640f6b1 Start new sentence on new line.
Pointed out by:	simon
2004-07-27 22:17:26 +00:00
Colin Percival
dfef91e977 Add a BUGS entry pointing out that -mindepth and -maxdepth are global
options even though they look like primaries.  (This is already documented
in the options themselves, but is sufficiently astonishing that I think it
deserves a BUGS entry as well.)
2004-07-27 21:22:14 +00:00
Colin Percival
ad4876008f Merge the "multibyte not supported" BUG into the pre-existing BUGS
section.

Move the HISTORY section to place it before BUGS rather than after BUGS,
in order to minimize the chance of this error being reproduced in the
future.  (Both mdoc(7) and 63% of manual pages have these sections listed
in this order.)
2004-07-27 21:13:04 +00:00
Dag-Erling Smørgrav
e9aa05f18c Don't strip trailing linear whitespace from passwords.
MFC after:	2 weeks
2004-07-27 11:34:25 +00:00
Dag-Erling Smørgrav
ebeb3bab5b Style nits. 2004-07-27 11:30:35 +00:00
Philippe Charnier
bd5de41339 No capital letter after : 2004-07-26 20:24:59 +00:00
Philippe Charnier
6cc6f12231 Add __FBSDID. Replace local variable sin by sockin to not conflict with sin(3).
Use warnx() instead of warn() when error message is not of any interest. Add
prototypes.
2004-07-26 20:18:11 +00:00
Philippe Charnier
17373fb9a5 Introduce options list the standard way. Correct style(9) in FILES section. 2004-07-26 19:59:29 +00:00
Philippe Charnier
2a00e8eade Introduce options list the standard way. 2004-07-26 19:53:44 +00:00
Philippe Charnier
fce2ca94cf Remove useless .Pp. Typo: gcos -> gecos (as spelled in passwd(5)). 2004-07-26 19:49:29 +00:00
Stefan Farfeleder
f901ebcfb6 Assign the result of getopt() to an int rather than to a char (which is
possibly unsigned).
2004-07-26 15:04:57 +00:00
Tim Kientzle
556d6e605e Add a --version option to bsdtar that prints the versions of
both bsdtar and libarchive.  Of course, this requires that bsdtar
have a version number.  Let's call this 1.00, shall we? ;-)
2004-07-26 03:21:41 +00:00
Andreas Klemm
1292e8a3b6 wrong order, not 10/03 -> 03/10 2004-07-25 08:45:57 +00:00
Tim Kientzle
4f23b47afa A bunch of style and security fixes (error checking return values, etc),
mostly from: Tim J Robbins
2004-07-25 04:15:50 +00:00
Tim Kientzle
8e5c78995e Of course, I meant POSIX.1-1996, not 1997.
Thanks to: Andrey Chernov
2004-07-25 00:31:24 +00:00
Tim Kientzle
62010d3541 A bunch of stuff from Christoph Mellon:
* Whitespace fixes
  * Check some malloc calls
  * Simplify long_help formatting
  * Spell "LINUX" -> "linux"
  * A few other miscellaneous style improvements
2004-07-24 22:13:44 +00:00
Suleiman Souhlal
98f59c0d12 Add my birthday.
Approved by:	grehan (mentor)
2004-07-24 15:02:56 +00:00
Tim J. Robbins
e9b497dbf6 Document incorrect handling of multibyte characters. 2004-07-23 06:56:38 +00:00
Tim J. Robbins
26bdc1d12e Tweak markup of quoted strings and characters: use Dq instead of enclosing
strings in ``obsolete quotes''. Use Li and Ql where appropriate.
2004-07-23 06:06:58 +00:00
Tim J. Robbins
0b651019b4 Add a lengthy discussion of why "tr a-z A-Z" and "tr A-Z a-z" are not the
right way to perform case-conversion.
2004-07-23 05:44:04 +00:00
Lukas Ertl
6b61c155e6 Make size suffix case insensitive.
PR:            bin/27604
Submitted by:  David Xu <davidx@viasoft.com.cn>
2004-07-22 13:38:10 +00:00
Johan Karlsson
aae01d2439 display.c:
- 'savech' is only used if it is set a few lines above where
	  it is used, initialize it to silence warning.

	- 'length' is either -1 or greater than 0, hence it is safe to cast it
	  to unsigned when comparing it here.

odsyntax.c:
	- 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are
	  char *. 'num' and 'end' are assigned values based on 'p'.
	  Hence use char * instead of unsigned char * for these variables.

	  '&end' as the second argument to strtoll does not need to be casted
	  to char** any more.

	  This solves a
	  'dereferencing type-punned pointer will break strict-aliasing rules'
	  warning when compiling with -O2.

parse.c:
	- 'prec' is only used when sokay == USEPREC and sokay = USEPREC
	  when 'prec' is assigned. Hence 'prec' is not used uninitialized,
	  initialize it to silence warning.

	- The code involving 'nextpr' is hard to follow, but I belive
	  'nextpr' will not be used unless it is initialized.
	  Anyway, IF 'nextpr' is used uninitialized it is better to
	  get a consistant error (seg fault, when dereferencing a NULL pointer)
	  than potentially accessing some random memory.

The above changes makes hexdump WARNS=6 clean even when compiled with
-O2. Hence bump WARNS to keep it clean.

Tested by:	CFLAGS='-O2 -pipe' make universe
2004-07-22 13:14:42 +00:00
Hartmut Brandt
19a7439edd Fix handling of comments on .elif lines. The patch given in a followup
to the PR failed, because the line skipping function is actually called
from two places in the code to do quite different things (this should
be two functions probably): in a false .if to skip to the next line
beginning with a dot and to collect .for loops. In the seconds case we
should not skip comments, because they are actually harder to handle than
we need for the .if case and should defer this to the main code.

PR:		bin/25627
Submitted by:	Seth Kingsley (original patch)
2004-07-22 11:12:01 +00:00
Tim Kientzle
ee92911f48 My bad: /dev/sa0, no 'r'
Thanks (and many apologies) to: Cristoph Mallon
2004-07-21 06:43:10 +00:00
Mike Silbersack
27eabced44 Slide pipe.h include after the _KERNEL define in preparation for disallowing
non-_KERNEL inclusions of pipe.h
2004-07-21 03:07:50 +00:00
Hartmut Brandt
91540c5b62 Improve make's diagnostic of mistmatched .if-.endif. This patch is
slightly different from the patch in the PR. The problem is, that
make handles .if clauses inside false .if clauses simply by
counting them - it doesn't put them onto the conditional stack, nor even
parses them so we need an extra line number stack for these ifs.

PR:		bin/61257
Submitted by:	Mikhail Teterin <mi@aldan.algebra.com>
2004-07-20 07:42:06 +00:00
Tim Kientzle
040d3851d1 Guard against argv[0] being NULL.
Thanks to: Tim J Robbins
2004-07-19 14:54:38 +00:00
Hartmut Brandt
e9345b8636 Make it clearer what means 'won't work' for .if string == ${VAR}.
Replace the use of '=' in conditionals in the examples
by the more correct '=='.

Clarify the example explaining that .for expansion takes place before
.if handling by showing the correct code instead of saying 'the other
way around'. Change a variable name there so the example is more parseable
to the human reader.

PR:		docs/65400
Submitted by:	Roman Neuhauser <neuhauser@chello.cz>
2004-07-19 14:42:57 +00:00
Tim J. Robbins
be1e385e24 Avoid passing negative values to tolower() on machines with signed chars. 2004-07-19 12:57:24 +00:00
Tim J. Robbins
159cd5c64f Sort sections. 2004-07-19 11:21:34 +00:00
Tim J. Robbins
66339977f4 Move exit status information into a DIAGNOSTICS section. Add an ENVIRONMENT
section. Re-add a sentence from the BUGS section that went missing in
the previous commit.
2004-07-19 11:18:56 +00:00
Tim J. Robbins
d67148e425 Add support for multibyte characters. While here, fix a longstanding bug in
the implementation of the -d option: we were skipping too many characters
when a non-alphanumeric character was encountered.
2004-07-19 11:12:02 +00:00
Tim J. Robbins
479918321d Point out in the BUGS section that look expects input files to have
been sorted with LC_COLLATE=C.
2004-07-19 10:03:38 +00:00