dragonfly.git
19 years agoCorrect a bug where incoming connections do not properly initialize the
Matthew Dillon [Thu, 16 Dec 2004 03:37:30 +0000 (03:37 +0000)]
Correct a bug where incoming connections do not properly initialize the
inflight bandwidth calculator.

Reorg the code a bit, removing random initialization elsewhere and putting
it all in one place.

Add an idle check and a pure-ack check.

Reported-by: Dan Nelson <dnelson@allantgroup.com>
19 years agoBump WARNS to 6.
Chris Pressey [Thu, 16 Dec 2004 00:32:07 +0000 (00:32 +0000)]
Bump WARNS to 6.

19 years agoRemove a double test for the same ptr != NULL and use the official
Max Okumoto [Thu, 16 Dec 2004 00:28:13 +0000 (00:28 +0000)]
Remove a double test for the same ptr != NULL and use the official
macro for this; reorder an if.

Taken-from: FreeBSD
Author: harti

19 years agoStyle: remove a lot of unnecessary casts, add some and spell the null
Max Okumoto [Thu, 16 Dec 2004 00:17:05 +0000 (00:17 +0000)]
Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.

Checked by: diff -r on the object files before and after

Taken-from: FreeBSD
Author: harti

19 years agoFix code that modifies const string variables.
Max Okumoto [Thu, 16 Dec 2004 00:03:54 +0000 (00:03 +0000)]
Fix code that modifies const string variables.

19 years agoOopsie; use WARNS?=, not WARNS=.
Chris Pressey [Wed, 15 Dec 2004 23:40:55 +0000 (23:40 +0000)]
Oopsie; use WARNS?=, not WARNS=.

19 years agoBump WARNS to 6.
Chris Pressey [Wed, 15 Dec 2004 23:22:57 +0000 (23:22 +0000)]
Bump WARNS to 6.

19 years agoBump WARNS to 6:
Chris Pressey [Wed, 15 Dec 2004 23:11:06 +0000 (23:11 +0000)]
Bump WARNS to 6:
- Initialize variable that GCC can't tell will never be used
  uninitialized.

19 years agoBump WARNS to 6.
Chris Pressey [Wed, 15 Dec 2004 21:27:40 +0000 (21:27 +0000)]
Bump WARNS to 6.

19 years agoRemove bool and boolean_t typedefs from header files where they don't belong,
Matthew Dillon [Wed, 15 Dec 2004 09:44:47 +0000 (09:44 +0000)]
Remove bool and boolean_t typedefs from header files where they don't belong,
fixing portions of the build.

19 years agoFix field for recent radix.h cleanups.
Matthew Dillon [Wed, 15 Dec 2004 09:27:05 +0000 (09:27 +0000)]
Fix field for recent radix.h cleanups.

19 years agoPatch up user/kernel space difference with boolean types.
Jeffrey Hsu [Wed, 15 Dec 2004 07:32:26 +0000 (07:32 +0000)]
Patch up user/kernel space difference with boolean types.

Reported by:  Simon 'corecode' Schubert <corecode@fs.ei.tum.de>

19 years agoClean up routing code before I parallelize it.
Jeffrey Hsu [Wed, 15 Dec 2004 00:11:04 +0000 (00:11 +0000)]
Clean up routing code before I parallelize it.

19 years agoFix a diagnostic check related to new VOP_INACTIVE semantics.
Matthew Dillon [Tue, 14 Dec 2004 23:59:47 +0000 (23:59 +0000)]
Fix a diagnostic check related to new VOP_INACTIVE semantics.

19 years agoDocument vmpageinfo.c
Matthew Dillon [Tue, 14 Dec 2004 23:58:32 +0000 (23:58 +0000)]
Document vmpageinfo.c

19 years ago- Add $DragonFly$ tag
Liam J. Foy [Tue, 14 Dec 2004 21:06:51 +0000 (21:06 +0000)]
- Add $DragonFly$ tag
- Add WARNS?= 6

19 years agoClean up routing code before I parallelize it.
Jeffrey Hsu [Tue, 14 Dec 2004 18:46:58 +0000 (18:46 +0000)]
Clean up routing code before I parallelize it.

19 years ago- Complete re-write/re-structure of rev(1). The previous code was ugly!
Liam J. Foy [Tue, 14 Dec 2004 18:22:09 +0000 (18:22 +0000)]
- Complete re-write/re-structure of rev(1). The previous code was ugly!

Thanks to Joerg, YONETANI Tomokazu and Matt.

Ok'ed by: Matt, Joerg and YONETANI Tomokazu

19 years agoRemove generic generating counting. I'm going to use a different approach
Joerg Sonnenberger [Tue, 14 Dec 2004 17:53:53 +0000 (17:53 +0000)]
Remove generic generating counting. I'm going to use a different approach
for the network stack and other parts in need of generation counting.

Requested-by: dillon
19 years agoAdd an example ntpd.conf. This is not installed by default, because
Joerg Sonnenberger [Tue, 14 Dec 2004 17:30:05 +0000 (17:30 +0000)]
Add an example ntpd.conf. This is not installed by default, because
administrators and users are encouraged to use personalized settings,
which means being aware of this file first.

Requested-by: Erik Paulsen Skaalerud
Inspired-by: OpenBSD's src/etc/ntpd.conf
19 years agoRegenerate.
Jeroen Ruigrok/asmodai [Tue, 14 Dec 2004 16:08:40 +0000 (16:08 +0000)]
Regenerate.

19 years agoMerge from vendor branch NTPD:
Joerg Sonnenberger [Tue, 14 Dec 2004 16:05:57 +0000 (16:05 +0000)]
Merge from vendor branch NTPD:
Sync with OpenBSD.

19 years agoSync with OpenBSD.
Joerg Sonnenberger [Tue, 14 Dec 2004 16:05:57 +0000 (16:05 +0000)]
Sync with OpenBSD.

19 years agoAdd IDs for the following:
Jeroen Ruigrok/asmodai [Tue, 14 Dec 2004 16:04:04 +0000 (16:04 +0000)]
Add IDs for the following:
Intel E7205 Memory Controller Hub
Intel 915G/P/GV DRAM Controller
Intel 915G/P/GV Host-to-PCI Express Bridge
Intel 82801FB/FR LPC Interface Bridge
Intel 82801FB/FR/FW/FRW USB UHCI Controller
Intel 82801FB/FR/FW/FRW USB EHCI Controller
Intel 82801FB/FR/FW/FRW SMBus Controller

19 years agoDo not reinitialize the translation mode if reattaching to an existing
Matthew Dillon [Tue, 14 Dec 2004 02:27:00 +0000 (02:27 +0000)]
Do not reinitialize the translation mode if reattaching to an existing
keyboard state, aka the console.  Otherwise we might change the mode out
from under X and screw up X's translation of keyboard strokes.

This allows a USB keyboard to be unplugged and replugged in without messing
up X.

19 years agoAdd dependency for libcrypto to dc(1). Don't build bc and dc if
Joerg Sonnenberger [Mon, 13 Dec 2004 21:48:16 +0000 (21:48 +0000)]
Add dependency for libcrypto to dc(1). Don't build bc and dc if
NO_OPENSSL is specified.

19 years agoAdd back missing space after comma.
Max Okumoto [Mon, 13 Dec 2004 21:45:05 +0000 (21:45 +0000)]
Add back missing space after comma.

19 years ago- Restructure the code
Liam J. Foy [Mon, 13 Dec 2004 17:43:57 +0000 (17:43 +0000)]
- Restructure the code
- Update functions to ANSI style
- Remove register
- Make variables const
- Remove filename, unnecessary (we can use argv)
- Avoid repeated checks on *argv
- If ferror returns an error, we must reset the error indicator
  with clearerr(). We must do this incase another error occurs
  on file ++argv
- Add WARNS 6
- Static functions
- Add $DragonFly$ tag to Makefile

OK'ed: Joerg@

19 years ago- Remove both errno.h and string.h. Both are unnecessary.
Liam J. Foy [Mon, 13 Dec 2004 14:08:44 +0000 (14:08 +0000)]
- Remove both errno.h and string.h. Both are unnecessary.
- Better error message
- Add WARNS 6

OK'ed: Joerg@

19 years ago- We should warn with argv[i] not argv[1]
Liam J. Foy [Sun, 12 Dec 2004 17:01:05 +0000 (17:01 +0000)]
- We should warn with argv[i] not argv[1]
- err -> warn (we can continue)
- Return with error if any fsyncs fail
- Add WARNS?= 6

19 years agoMerge from FreeBSD:
Jeffrey Hsu [Sat, 11 Dec 2004 01:04:00 +0000 (01:04 +0000)]
Merge from FreeBSD:
  revision 1.102
  date: 2003/02/08 15:05:15;  author: orion;  state: Exp;  lines: +7 -6
  Avoid multiply for preemptive arp calculation since it hits every
  ethernet packet sent.

  Prompted by: Jeffrey Hsu <hsu@FreeBSD.org>

19 years agovm_page_free_*() now requires the page to be busied, fix a case in
Matthew Dillon [Fri, 10 Dec 2004 23:07:10 +0000 (23:07 +0000)]
vm_page_free_*() now requires the page to be busied, fix a case in
vm_page_unhold() where that was not occuring.

19 years agoBring in elements from the FreeBSD usbdevs that the DFly usbdevs does not
Matthew Dillon [Fri, 10 Dec 2004 20:37:55 +0000 (20:37 +0000)]
Bring in elements from the FreeBSD usbdevs that the DFly usbdevs does not
have.

Submitted-by: Barry Bouwsma
19 years agoRemove more whitespace.
Max Okumoto [Fri, 10 Dec 2004 20:34:01 +0000 (20:34 +0000)]
Remove more whitespace.

Check-by: diff on make *.o lst.lib/*.o
19 years agoBring in FreeBSD/1.206 by Alan Cox, bde@, and tegge@:
Matthew Dillon [Fri, 10 Dec 2004 19:50:32 +0000 (19:50 +0000)]
Bring in FreeBSD/1.206 by Alan Cox, bde@, and tegge@:

Almost nine years ago, when support for 1TB files was introduced in
revision 1.55, the address parameter to vnode_pager_addr() was changed
from an unsigned 32-bit quantity to a signed 64-bit quantity.  However,
an out-of-range check on the address was not updated.  Consequently,
memory-mapped I/O on files greater than 2GB could cause a kernel panic.
Since the address is now a signed 64-bit quantity, the problem resolution
is simply to remove a cast.

PR: FreeBSD/73010

19 years agoStylification: missing spaces, extra space after function names,
Max Okumoto [Fri, 10 Dec 2004 19:22:25 +0000 (19:22 +0000)]
Stylification: missing spaces, extra space after function names,
casts and the sizeof operator, missing empty lines, void casts,
extra empty lines.

Checked by: diff on make *.o lst.lib/*.o

Author: harti, okumoto

19 years agoRemove unnecessary weird locking macro I added to blindly replace
YONETANI Tomokazu [Fri, 10 Dec 2004 04:09:46 +0000 (04:09 +0000)]
Remove unnecessary weird locking macro I added to blindly replace
mtx_*() functions. Original code needed the mutex functions because
spl*() functions are practically no-ops on FreeBSD 5.x and later
while they aren't on FreeBSD 4.x or DragonFly. Tested on both UP
and SMP boxes without a problem. No noticeable difference on
performance though.
DragonFly_Stable tag will be slipped in a few days if no bug reports
are posted to bugs@.

19 years agoAdd code to enforce the paralleism count (-j N) for the entire tree
Max Okumoto [Fri, 10 Dec 2004 01:16:25 +0000 (01:16 +0000)]
Add code to enforce the paralleism count (-j N) for the entire tree
of submakes spawned during processing.

We create a fifo and stuff one character into it for each job we are
allowed to run.  The name of the fifo is passed to child processes
in the MAKE_JOBS_FIFO environment variable.

A make which finds this variable on startup will open the fifo and
only spawn jobs when it managed to read a token from the fifo.
When the job completes a token is writen back to the fifo.

Slave make processes get one token for free: the one their parent
make got in order to run them.  This makes the make processes
themselves invisible in the process counts.

The net effect is that "make -j 12 -s buildworld" will start at
most 12 jobs at the same time, instead of as previously up to
65 jobs would get started.

Taken-from: FreeBSD
Author: phk

19 years agoReduce the casts off NULL in comparison with a pointer.
Max Okumoto [Fri, 10 Dec 2004 01:13:24 +0000 (01:13 +0000)]
Reduce the casts off NULL in comparison with a pointer.

19 years agoo Allow use of the ${MAKE_SHELL} variable to specify alternate
Max Okumoto [Fri, 10 Dec 2004 01:03:46 +0000 (01:03 +0000)]
o Allow use of the ${MAKE_SHELL} variable to specify alternate
  shells for make(1) to use.  Setting it to "sh" and "ksh" are the
  only values which work right ATM; I wouldn't expect "csh" to get
  you far ;)

o Include -DDEFSHELL=1 in Makefile.dist so people boostrapping will
  have a sane default.  And add DragonFly tag

o Add ability to use csh(1) as the make(1) shell.

o Expand the scope of the .SHELL specification to also cover the
  compat mode of operation and the != operator.

  While here, fixed a bug in the .SHELL directive processing when
  only the name= attribute is specified and no built-in shell matches
  this name, causing null pointer dereference.

o Fix a very long-standing error in handling .SHELL targets: this
  target uses the brk_string function to parse the line. That
  function uses static storage for both the expanded string and the
  returned argv[] vector.   The JobParseShell function simply stored
  away pointers into this static storage. On the next use of something
  like ${FOO:O} this storage would get overwritten with fatal
  results.

  This also allows us to make the shells[] array const bringing us
  one step further in making make WARNS=4 ready.

o Constify the array of predefined shells. It turns out that we
  need two versions of the structure definition for this: one with
  const char pointers, because otherwise gcc won't let us initialize
  the fields with constant strings, and one without the const,
  because we need to work with the structure.

Note: This patch is really a hack for a coping with slow /bin/sh.
      We are importing it to reduce the differences between us and
      the FreeBSD version.

19 years agoTake advantage of the .Nm utility. It remembers the first argument
Max Okumoto [Fri, 10 Dec 2004 00:41:06 +0000 (00:41 +0000)]
Take advantage of the .Nm utility.  It remembers the first argument
it was called with.

19 years agoo Reduce warns by adding default case to switch.
Max Okumoto [Fri, 10 Dec 2004 00:38:21 +0000 (00:38 +0000)]
o Reduce warns by adding default case to switch.
o Constify char pointer.

19 years agoMove catch_child() to reduce diffs between FreeBSD make.
Max Okumoto [Thu, 9 Dec 2004 23:33:36 +0000 (23:33 +0000)]
Move catch_child() to reduce diffs between FreeBSD make.

19 years agoAdd missing function description.
Max Okumoto [Thu, 9 Dec 2004 21:31:10 +0000 (21:31 +0000)]
Add missing function description.

Max

19 years agoChange a couple of the primitve list functions to be macros. This changes
Max Okumoto [Thu, 9 Dec 2004 19:16:03 +0000 (19:16 +0000)]
Change a couple of the primitve list functions to be macros. This changes
the semantic of Lst_Datum which formerly returned NULL when the argument
node was NULL. There was only one place in the source that relied on this
so change that place.

Taken-From: FreeBSD
Author: harti

19 years agoUse typedefs for the types of the functions that are passed as
Max Okumoto [Thu, 9 Dec 2004 19:08:36 +0000 (19:08 +0000)]
Use typedefs for the types of the functions that are passed as
arguments to the list functions for better readability.

19 years agoCache a pointer the last mbuf in the sockbuf for faster insertion.
Jeffrey Hsu [Wed, 8 Dec 2004 23:59:01 +0000 (23:59 +0000)]
Cache a pointer the last mbuf in the sockbuf for faster insertion.
Update it on sockbuf insertion and deletion and on user reads.
Add a new sbappendstream() function that inserts in constant time.
Use it for TCP.

19 years agoImplement generation counters as (at least) 64 bit counters. The increment
Joerg Sonnenberger [Wed, 8 Dec 2004 23:19:51 +0000 (23:19 +0000)]
Implement generation counters as (at least) 64 bit counters. The increment
and get operations are interrupt safe, but not MP-safe.

The gencount_inc implementation uses critical sections, which is the best
possible for generic IA32 code.

19 years ago- Whoops! I missed some from the previous commit. My bad, sorry.
Liam J. Foy [Wed, 8 Dec 2004 22:26:42 +0000 (22:26 +0000)]
- Whoops! I missed some from the previous commit. My bad, sorry.

Ok'ed by: Joerg@

19 years ago- Check the return value of setenv(). We should check this value since
Liam J. Foy [Wed, 8 Dec 2004 22:00:32 +0000 (22:00 +0000)]
- Check the return value of setenv(). We should check this value since
  setenv() uses both malloc and realloc.

19 years agoMark the following stuff as depricated:
Joerg Sonnenberger [Wed, 8 Dec 2004 20:36:39 +0000 (20:36 +0000)]
Mark the following stuff as depricated:
- GPLed math emulator
- GPLed dgb driver
- GPLed awe driver
- old pre-newbus rp driver (use nrp instead)
- OLDCARD aka pcic (also not build as module by default)

This can be temporary reviewd by adding "options I_WANT_DEPRICATED_STUFF"
to the kernel config. This drivers will move into the attic two
weeks from now if noone complains.

19 years ago- We should always check the setenv() call. Why? because it uses
Liam J. Foy [Wed, 8 Dec 2004 20:17:12 +0000 (20:17 +0000)]
- We should always check the setenv() call. Why? because it uses
  both realloc and malloc.
- Remove unnecessary casts.
- Bump WARNS to 6

19 years agoTrying again. Anyone see this mail?
Max Okumoto [Wed, 8 Dec 2004 19:45:30 +0000 (19:45 +0000)]
Trying again.  Anyone see this mail?

Max

19 years agoAdd my stuff.
Max Okumoto [Wed, 8 Dec 2004 19:08:25 +0000 (19:08 +0000)]
Add my stuff.

19 years agotest
Matthew Dillon [Wed, 8 Dec 2004 19:00:58 +0000 (19:00 +0000)]
test

19 years agoUnlock the namecache record when traversing a mount point, then relock and
Matthew Dillon [Wed, 8 Dec 2004 18:53:27 +0000 (18:53 +0000)]
Unlock the namecache record when traversing a mount point, then relock and
recheck for consistency.  This fixes a deadlock on e.g. dead NFS mounts.

Reported-by: David Rhodus <sdrhodus@gmail.com>
19 years agoMerge the contents of lstInt.h into the public lst.h. This let's us get
Max Okumoto [Wed, 8 Dec 2004 11:26:39 +0000 (11:26 +0000)]
Merge the contents of lstInt.h into the public lst.h. This let's us get
rid of a lot of uneccesary casts and temporary variables that have just
obfuscated the code. This also let's us implement a couple of the one-
liner list functions as macros (the first one is Lst_IsEmpty) and
simplify life once we start to throw consts on the code.

Taken-from: FreeBSD
Author: harti

19 years agoStyle: prototypes, un-register and remove some empty lines.
Max Okumoto [Wed, 8 Dec 2004 11:07:35 +0000 (11:07 +0000)]
Style: prototypes, un-register and remove some empty lines.

Taken-from: FreeBSD
Author: harti

19 years agoo Include sys/sysctl.h on all architectures not only i386.
Max Okumoto [Wed, 8 Dec 2004 10:55:16 +0000 (10:55 +0000)]
o Include sys/sysctl.h on all architectures not only i386.
o Increased WARNS to 3

Taken-from: FreeBSD
Author: harti

19 years agoTest if I can change this file.
Max Okumoto [Wed, 8 Dec 2004 08:39:40 +0000 (08:39 +0000)]
Test if I can change this file.
Removed some old text.
Max

19 years agoadd ServeRAID disk node to `MAKEDEV all' for many(> 1) people's convenience.
YONETANI Tomokazu [Wed, 8 Dec 2004 01:26:17 +0000 (01:26 +0000)]
add ServeRAID disk node to `MAKEDEV all' for many(> 1) people's convenience.

19 years ago- Remove signal.h
Liam J. Foy [Mon, 6 Dec 2004 21:13:51 +0000 (21:13 +0000)]
- Remove signal.h
- Add usage
- Static functions
- Add verbose option (nice to know what failed etc)
- Use getopt for consistency
- Make size of buf MAXPATHLEN
- Make WARNS 6 clean
- Add WARNS?= 6 to Makefile
- Update procctl man page accordingly

OK'ed by: Joerg@

19 years agoDon't include the "Hello, world" example in libz.
Joerg Sonnenberger [Mon, 6 Dec 2004 11:29:51 +0000 (11:29 +0000)]
Don't include the "Hello, world" example in libz.

19 years agoHandle all types of interrupts when operating the uhci(4) controller in
David Rhodus [Sun, 5 Dec 2004 04:24:42 +0000 (04:24 +0000)]
Handle all types of interrupts when operating the uhci(4) controller in
polled mode.

from fbsd pr: 73000

19 years agoAccept resets sent while the receive window is zero.
Jeffrey Hsu [Sat, 4 Dec 2004 21:48:25 +0000 (21:48 +0000)]
Accept resets sent while the receive window is zero.

Alternative fix to FreeBSD bug kern/72502.

19 years agoFix the boottime calculation when the time of day is set in absolute terms.
Matthew Dillon [Sat, 4 Dec 2004 20:38:45 +0000 (20:38 +0000)]
Fix the boottime calculation when the time of day is set in absolute terms.
We want boottime to be calculated based on the current real time minus our
best uptime guess.  gd_time_seconds survives a lot of time issues and is our
best uptime guess and since it is already used to calculate the new basetime,
we can just assign boottime to basetime.

Note that boottime is not defined quite the same way as basetime.  The
system's internal timebase is not compensated for drift or ever jumped,
and is guarenteed to be monotonically increasing.  Drift compensation is
accomplished by adjusting basetime, so basetime will always slowly diverge
from boottime if e.g. ntpd is running.

Submitted-by: Paul Herman <pherman@frenchfries.net>
19 years agoHandle window updates inside header prediction to increase the hit rate.
Jeffrey Hsu [Sat, 4 Dec 2004 10:14:27 +0000 (10:14 +0000)]
Handle window updates inside header prediction to increase the hit rate.

19 years agoWe have to replicate listening IPv6 sockets in the wildcard table
Jeffrey Hsu [Sat, 4 Dec 2004 06:27:59 +0000 (06:27 +0000)]
We have to replicate listening IPv6 sockets in the wildcard table
because they're also used to match incoming IPv4 connections.

19 years agoReturn retval if the second sysctl failed, not NULL.
Joerg Sonnenberger [Sat, 4 Dec 2004 00:34:36 +0000 (00:34 +0000)]
Return retval if the second sysctl failed, not NULL.

19 years ago- strings.h -> string.h
Liam J. Foy [Fri, 3 Dec 2004 22:51:47 +0000 (22:51 +0000)]
- strings.h -> string.h
- Malloc sets errno. Use err and not errx.
- Static functions
- Make WARNS 6 clean
- Add WARNS?= 6

19 years agoReplace div_pcblist / rip_pcblist / udp_pcblist with in_pcblist_global.
Joerg Sonnenberger [Fri, 3 Dec 2004 20:29:53 +0000 (20:29 +0000)]
Replace div_pcblist / rip_pcblist / udp_pcblist with in_pcblist_global.
This is a slight change of semantic for rip sockets, which have now a
jail check too.

19 years agoMake rp(4) compilable again. Don't even think about unloading this stuff.
Joerg Sonnenberger [Fri, 3 Dec 2004 17:59:20 +0000 (17:59 +0000)]
Make rp(4) compilable again. Don't even think about unloading this stuff.

Spotted-by: corecode.
Fix a warning by not inling functions used only once.

19 years agoRemove unused tcpdump sources.
Joerg Sonnenberger [Fri, 3 Dec 2004 16:05:43 +0000 (16:05 +0000)]
Remove unused tcpdump sources.

19 years agoDon't read userland pointers directly, copy them first into kernel land
Joerg Sonnenberger [Wed, 1 Dec 2004 21:38:50 +0000 (21:38 +0000)]
Don't read userland pointers directly, copy them first into kernel land
and verify the location.

Security-fix for CAN-2004-1066 (FreeBSD-SA-04:17.procfs).

Submitted-by: Colin Percival <colin.percival@wadham.ox.ac.uk>
Credits: Bryan Fulton, Ted Unangst, and the SWAT analysis tool
         Coverity, Inc.

19 years ago- Remove registers from rcorder
Liam J. Foy [Wed, 1 Dec 2004 19:44:53 +0000 (19:44 +0000)]
- Remove registers from rcorder
- Bump WARNS upto 6 while here

Submitted by: Steve Mynott <steve.mynott@gmail.com>

19 years ago- Remove unnecessary casts
Liam J. Foy [Wed, 1 Dec 2004 18:27:06 +0000 (18:27 +0000)]
- Remove unnecessary casts
- Static usage
- Add WARNS 6
- Add $DragonFly$ tag

19 years agojob.c: 1.51->1.52
Joerg Sonnenberger [Wed, 1 Dec 2004 15:50:51 +0000 (15:50 +0000)]
job.c: 1.51->1.52
Author: ru
Log:
"unset verbose" is 13 characters, not 10.

job.c:1.58->1.59
Author: harti
Log:
Get rid of the shell table sentinel. It isn't needed anymore because
JobMatchShell returns NULL when no shell name matches since revision 1.51.

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
Use __arysize(shells) instead of expanding it manually.

19 years agocompat.c:1.38->1.39
Joerg Sonnenberger [Wed, 1 Dec 2004 15:44:20 +0000 (15:44 +0000)]
compat.c:1.38->1.39
job.c:1.55->1.56
Author: harti
Log:
Fix a (very) long standing bug in make (this has been there probably
from the beginning). Make used to handle all its interrupt-time stuff
directly from the signal handler, including calls to printf, accessing
global data and so on. This is of course wrong and could provoke a core
dump when interrupting make. Just set a flag in the signal handler and
do everything else from the main thread.

PR:             bin/29103

config.h:1.14->1.15
main.c:1.97->1.98
parse.c:1.57->1.58
Author: harti
Log:
Eliminate the define for POSIX and build with Posix behaviour.
Our make has been build with POSIX enabled from the first day
and the ifdef'ed out code served no purpose.

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agocond.c:1.27->1.28
Joerg Sonnenberger [Wed, 1 Dec 2004 15:17:28 +0000 (15:17 +0000)]
cond.c:1.27->1.28
make.h:1.23->1.24
parse.c:1.55->1.56
Author: harti
Log:
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>

parse.c:1.56->1.57
uthor: harti
Log:
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)

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agovar.c: 1.44->1.45
Joerg Sonnenberger [Wed, 1 Dec 2004 15:09:44 +0000 (15:09 +0000)]
var.c: 1.44->1.45
Author: ru
Log:
Moved the code for :U and :L modifiers where it belongs, so that
the fallback for SysV (now in POSIX) variable substitution works
for old_string arguments starting with 'U' or 'L'.

var.c:1.45->1.46
Author: harti
Log:
Allow variable substitutions in SYSV variable substitutions like
$(SRC:.c=$O). This brings us closer to other makes.

Reviewed by:    ru
Obtained from:  NetBSD

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agovar.c: 1.42->1.43
Joerg Sonnenberger [Wed, 1 Dec 2004 15:06:55 +0000 (15:06 +0000)]
var.c: 1.42->1.43
make.1: 1.63->1.64
Author: marcel, ru
Log:
Implement the O modifier. The O modifier sorts the words in a
variable. The implementation is based upon the patch sent to
arch@, but modified to be compatible with NetBSD. The modifier
that does a reverse sort has been dropped for now, but the
ability to add one later has been preserved.

Document the `O' modifier.

19 years agoAdd rdate(8). This supports both SNTP(RFC 2030) and RFC 868.
Joerg Sonnenberger [Wed, 1 Dec 2004 15:04:43 +0000 (15:04 +0000)]
Add rdate(8). This supports both SNTP(RFC 2030) and RFC 868.

Obtained-from: OpenBSD

19 years agoMove ntp.org's ntp into the attic.
Joerg Sonnenberger [Wed, 1 Dec 2004 14:17:22 +0000 (14:17 +0000)]
Move ntp.org's ntp into the attic.

19 years agoChange the default for ntpd back to -s, the bug which triggered this
Joerg Sonnenberger [Wed, 1 Dec 2004 04:16:42 +0000 (04:16 +0000)]
Change the default for ntpd back to -s, the bug which triggered this
has been fixed.

19 years agoForce commited to annotate missing log message.
Joerg Sonnenberger [Wed, 1 Dec 2004 04:14:08 +0000 (04:14 +0000)]
Force commited to annotate missing log message.

Sync with OpenBSD. Most of the local changes have been merged back.

This fixes an important problem with the DNS lookup, which made ntpd
almost impossible to kill.

19 years agoMerge from vendor branch NTPD:
Joerg Sonnenberger [Wed, 1 Dec 2004 04:14:08 +0000 (04:14 +0000)]
Merge from vendor branch NTPD:
Force commited to annotate missing log message.

Sync with OpenBSD. Most of the local changes have been merged back.

This fixes an important problem with the DNS lookup, which made ntpd
almost impossible to kill.

19 years agoForce commited to annotate missing log message.
Joerg Sonnenberger [Wed, 1 Dec 2004 04:14:08 +0000 (04:14 +0000)]
Force commited to annotate missing log message.

Sync with OpenBSD. Most of the local changes have been merged back.

This fixes an important problem with the DNS lookup, which made ntpd
almost impossible to kill.

19 years ago*** empty log message ***
Joerg Sonnenberger [Wed, 1 Dec 2004 04:09:27 +0000 (04:09 +0000)]
*** empty log message ***

19 years agoMerge from vendor branch NTPD:
Joerg Sonnenberger [Wed, 1 Dec 2004 04:09:27 +0000 (04:09 +0000)]
Merge from vendor branch NTPD:
*** empty log message ***

19 years ago*** empty log message ***
Joerg Sonnenberger [Wed, 1 Dec 2004 04:09:27 +0000 (04:09 +0000)]
*** empty log message ***

19 years agojob.c:1.52->1.53
Joerg Sonnenberger [Wed, 1 Dec 2004 02:02:14 +0000 (02:02 +0000)]
job.c:1.52->1.53
job.h:1.22->1.23
main.c:1.92->1.93
Author: harti
Log:
Remove the remote stuff from make. This actually never worked in our make
because the necessary files were not imported with the original import.
If somebody really needs it, there is still the devel/pmake port.

This is just the first step and removes just everything that is ifdef'ed out.
Otherwise the code is unchanged.

Checked by:     md5

Approved by:    no objections on arch@

config.h:1.12->1.13
job.c:1.53->1.54
job.h:1.23->1.24
Author: harti
Log:
Now with the remote job support removed there can be no remote jobs and
no jobs that need to be remigrated. Remove the flags and the associated
code.

config.h:1.13->1.14
main.c:1.93->1.94
Author: phk
Log:
Get rid of now unused maxLocal variables.

job.c:1.54->1.55
job.h:1.24->1.25
main.c:1.94->1.95
Author: phk
Log:
Get rid of more local/remote leftovers

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agomake.1: 1.77->1.78
Joerg Sonnenberger [Wed, 1 Dec 2004 01:31:52 +0000 (01:31 +0000)]
make.1: 1.77->1.78
Author: harti
Log:
Make explicit that MAKEOBJDIRPREFIX and MAKOBJDIR must be set
as environment variables and should not be set on make's command
line. They happen to work accidentially as command line variables
too when none of the sub-makes wants to play games with them (because
make is putting command line variables into the environment and will
find them there later on). Makefile.inc1 wants to change
MAKEOBJDIRPREFIX. In this case one cannot set it on the command line.

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agoMakefile: 1.32->1.33
Joerg Sonnenberger [Wed, 1 Dec 2004 01:29:31 +0000 (01:29 +0000)]
Makefile: 1.32->1.33
main.c: 1.90->1.91
nonints.h: 1.22->1.23
var.c: 1.47->1.48
Author: harti
Log:
Put variable assignments on .MAKEFLAGS and .MFLAGS targets into
the .MAKEFLAGS variable so that these are also passed to sub-makes.
This makes the handling of variables in the command environment more
consistent.

PR:             bin/68853
Submitted by:   Martin Kamerhofer <data@sbox.tugraz.at>

make.1:1.78->1.79
Author: ru
Log:
Document the effects of modifying the .MAKEFLAGS internal
variable and using the .MAKEFLAGS special target, and the
differences between them.

Reviewed by:    harti

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
Slightly adjust the change Var_Quote to not cast away a const.

19 years agoMakefile: 1.31->1.32
Joerg Sonnenberger [Wed, 1 Dec 2004 01:10:17 +0000 (01:10 +0000)]
Makefile: 1.31->1.32
main.c: 1.89->1.90
nonints.h: 1.21->1.22
var.c: 1.46->1.47
Author: harti
Log:
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

make.1: 1.75->1.76
Author: harti
Log:
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.

make.1: 1.76->1.77
Author: harti
Log:
Correct the .Dd date. Pluralize 'assignment' in one place.

Requested by: ru

19 years agoSwitch a strncpy into a strlcpy. I'm not sure why this triggers propolice,
Joerg Sonnenberger [Tue, 30 Nov 2004 20:12:21 +0000 (20:12 +0000)]
Switch a strncpy into a strlcpy. I'm not sure why this triggers propolice,
the use seems to be correct.

19 years agoRemove struct ipprotosw. It's identical to protosw, so use the generic
Joerg Sonnenberger [Tue, 30 Nov 2004 19:21:26 +0000 (19:21 +0000)]
Remove struct ipprotosw. It's identical to protosw, so use the generic
version directly.

19 years agoDon't include stddef.h from the kernel.
Joerg Sonnenberger [Tue, 30 Nov 2004 19:17:08 +0000 (19:17 +0000)]
Don't include stddef.h from the kernel.

19 years agoMakefile:1.30->1.31
Joerg Sonnenberger [Tue, 30 Nov 2004 19:12:57 +0000 (19:12 +0000)]
Makefile:1.30->1.31
compat.c:1.36->1.37
job.c:1.49->1.50
Author: harti
Log:
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

make.1:1.74->1.75
Author: harti
Log:
Bump the date in .Dd for the recent '+' flag commit.

Requested by: ru

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>
19 years agoFix a bug in ESTALE handling for NFS. If we get ESTALE in vn_open() we
Matthew Dillon [Tue, 30 Nov 2004 18:59:52 +0000 (18:59 +0000)]
Fix a bug in ESTALE handling for NFS.  If we get ESTALE in vn_open() we
want to retry the operation, but if we cannot re-resolve the namespace
(i.e. the file is really gone) we were incorrectly calling vput(vp) where
vp might have been NULL.

Reported-by: David Rhodus <sdrhodus@gmail.com>
19 years agomake.1: 1.67->1.68
Joerg Sonnenberger [Tue, 30 Nov 2004 18:18:06 +0000 (18:18 +0000)]
make.1: 1.67->1.68
Author: ru
Log:
Markup nits.

make.1: 1.70->1.71
Author: ru
Log:
Mechanically kill hard sentence breaks.

make.1: 1.71->1.72
Author: keramida
Log:
Remove the dependency of the :C/regexp/replacement/ variable modifier
from the :S modifier which follows a bit further below.  This way the
reader can read each of these two descriptions without having to jump
back and forth in the manpage.

PR:             docs/26943
Submitted by:   Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>