Commit Graph

26 Commits

Author SHA1 Message Date
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
lukem c2b84904ae use %ll_ instead of the less standard %q_ 2001-01-04 23:05:54 +00:00
mycroft 2dc192ae06 Use MAP_SHARED. 2000-07-27 02:58:57 +00:00
jdolecek 2d6604a645 Do not mmap() with MAP_PRIVATE - looks like kernel tries to preallocate
some memory in case the mmapped contents would be changed and this fails
for very large files; it's unnecessary anyway, cmp(1) does not change file
contents in any way.
This fixes bin/10625 by Uwe Klaus.

While here, change the code to fallback to classic stdio if mmap fails.
2000-07-18 10:23:43 +00:00
kleink 0848e8913a * Hint MADV_SEQUENTIAL.
* -1 -> MAP_FAILED.
2000-03-20 18:23:26 +00:00
ross f670fa10c5 Add { and } to shut up egcs. Reformat the more questionable code. 1998-08-25 20:59:36 +00:00
mikel 83d4f0d268 make usage string match manpage 1998-01-12 08:11:19 +00:00
mrg 25b87a361a use MAP_PRIVATE|MAP_FILE rather than "0" 1997-12-09 10:59:54 +00:00
mrg 66f7b9fd72 fix compile warnings on the alpha. 1997-10-19 14:05:56 +00:00
lukem 9992ac3ea9 getopt returns -1 not EOF 1997-10-18 12:54:24 +00:00
lukem 18ce25404d WARNSify, fix .Nm usage 1997-10-18 12:52:04 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
mrg dc8adb9e7c don't warn about missing files with -s. POSIX doesn't define a specific
action, and, most other implimentations use this (sane) method.  (from jtc).
1996-02-01 03:32:41 +00:00
tls 94f6fc8e46 Sync with 4.4lite2 1995-09-08 03:22:54 +00:00
tls 46ef75ac74 imported from 44lite2 1995-09-04 21:07:24 +00:00
mycroft adf20f8c80 Fix bug in handling short reads. 1994-03-25 17:07:02 +00:00
mycroft 84f6895ad3 As suggested by Xavier Leroy <xavier@Theory.Stanford.EDU>, make sure we don't
flag a short read on the 2nd file as an EOF when it isn't.  This implementation
differs in that at most one read is done per file per comparison, so that an
early mismatch may avoid hanging on input or continuing some expensive process
if reading from a pipe.
1993-12-02 01:56:04 +00:00
jtc 4d9f06c8e5 Get rid of otoi(), use strtoul() instead. Not only gets rid of a function,
but allows hex offsets as well.
Misc other minor tweaks.
1993-11-23 00:50:46 +00:00
jtc ed96eac23a Document the fact that cmp now conforms to POSIX.2. 1993-09-21 22:37:52 +00:00
jtc 8ad38f4118 Changed to conform to POSIX.2:
EOF message printed to stderr.
Removed bogositys wrt. getopt() processing (special casing `-' is unnecessary).
Updated usage message to document fact that -s and -l options are mutually
exclusive.
1993-09-21 22:35:56 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft dfb9caab49 Add RCS indentifiers. 1993-08-01 07:32:48 +00:00
mycroft 690cae8181 Add RCS indentifiers. 1993-07-31 15:17:49 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00