summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp/regular.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix improper mmap length paramater which can result in improper behaviorgreen1999-07-291-7/+9
| | | | or cmp crashing in specific cases.
* More egcs warning fixes:imp1999-04-251-1/+2
| | | | | | | | | | o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int o #ifdef 0 -> #if 0 Reviewed by: obrien and chuckr
* Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).archie1998-12-061-1/+1
|
* Sweep through the tree fixing mmap() usage:alex1997-01-161-2/+2
| | | | | | | | | | | | - Use MAP_FAILED instead of the constant -1 to indicate failure (required by POSIX). - Removed flag arguments of '0' (required by POSIX). - Fixed code which expected an error return of 0. - Fixed code which thought any address with the high bit set was an error. - Check for failure where no checks were present. Discussed with: bde
* Our mmap(2) has a limitation where the `offset' parameter must bejoerg1997-01-081-2/+12
| | | | | | | page-aligned. cmp(1) should know about this flaw, and work around it. While i was at it, fixed an uninitialized variable as reported by -Wall.
* When mmap is used, do an madvise(MADV_SEQUENTIAL) to make thingsdyson1996-12-111-0/+3
| | | | | go much more quickly when file input is really done. Of course, the fully cached case will make no difference.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+98
OpenPOWER on IntegriCloud