Commit Graph

3826 Commits

Author SHA1 Message Date
lukem 75e3195cad * replace ifdefs against __SVR4 and __linux__ with DIRENT_MISSING_D_NAMLEN;
it's more portable and more obvious
* remove the mkgmtime() && HAVE_TIMEGM stuff:
	a) why should netbsd have to define HAVE_TIMEGM to compile cleanly?
	b) foreign compiles of ftp should just be linked with working
	   timegm function

a more portable version of this ftp client will be released as a 3rdparty
product; no use polluting our code with half-baked attempts...
1999-09-26 02:00:12 +00:00
lukem a222db7c70 * use %lld instead of %qd to print out (long long) vars.
(slightly more portable; e.g, solaris supports this)
* remove some fluff (lint)
1999-09-24 14:28:14 +00:00
lukem 14b5ecf789 use an off_t instead of quad_t (or long #ifndef NO_QUAD) to store the
temporary restart point. (yet another portability fix...)
1999-09-24 12:52:18 +00:00
lukem ec4e414dc8 fix a couple of thinkos in my recent work:
* abort_remote(): replace borken MIN(4,BUFSIZ) with just BUFSIZ; it
  should have been MAX(4,BUFSIZ), but it's probably safe to assume that
  BUFSIZ is at least 3... (fix from simonb)
* auth_url(): use the correct variable when calculating a buffer size.
1999-09-24 06:57:37 +00:00
lukem cb8c56db8a if getsockopt() returns a buffer size of <= 0, set them to 8192.
this works around a problem in certain OS from Sun with a version < 5.6...
1999-09-24 06:14:40 +00:00
lukem e73d848293 in complete(), only copy the word if there is one.
`cd <TAB>' was triggering _DIAGASSERT(src != NULL)).
1999-09-24 05:35:09 +00:00
lukem 76c8d5f094 * finish replacing snprintf() with sprintf(), for portability reasons.
add lots of comments about how to size up the buffers, and add extra
  checks to hopefully ensure that there won't be an overflow (unless
  someone modifies the length of the sprintf()s).
* as part of the above, slightly rework the way the `*' bar is calculated.
  also fixes a display bug when > 160 stars were needed to be printed.
  the maximum progress bar width at this time is 256.
* remove some code that checks the port that was #if 0-ed out as part of the
  ipv6 migration; it's not going to be used again.
1999-09-24 00:48:24 +00:00
dmcmahill 10800b97f9 add description of the -t option 1999-09-23 15:42:06 +00:00
dmcmahill df5a9e3cb5 fix -t option 1999-09-23 15:41:31 +00:00
tron 22cf28baac Fix wrong option string in call to getopt(3). Patch supplied by
Geoff C. Wing in PR bin/8475.
1999-09-23 08:47:47 +00:00
lukem 700e3c1ec7 * add support for `xferbuf', which sets both `sndbuf' and `rcvbuf'
* document the above three commands
* rototill the way the sndbuf and rcvbuf work. remove resetsockbufsize()
* use the appropriate socket buffer size as the size of the buffer that
  the read()/write() loops use. speeds up things in some cases.
1999-09-22 07:18:31 +00:00
lukem 5d3667b758 replace snprintf() with strlcpy(), strlcat(), or direct assignment
where appropriate. (strlc*() are easier to port to foriegn systems).

XXX; there's still a few snprintf's in the progress meter stuff to convert
1999-09-22 03:01:53 +00:00
lukem 84e2c387e7 * protect more of the AF_INET6 stuff with #ifdef INET6 (for portability)
* in the main data moving loops only call the initial gettimeofday() if
  rate throttling is enabled (saves a system call per loop when not
  throttling).
1999-09-21 13:17:22 +00:00
lukem 20a4d96576 reword EPSV status line 1999-09-21 13:10:16 +00:00
lukem 2ef7f5d71d add trailing . to message 1999-09-21 12:57:51 +00:00
lukem f7ead868c0 cast 4th arg to [gs]etsockopt() to (void *), to satisfy some foriegn systems 1999-09-21 11:18:27 +00:00
lukem 26738e38b8 only default to epsv4 if INET6 is defined 1999-09-21 10:11:56 +00:00
cgd 7132ce2fd3 RCS ID police (sigh) 1999-09-21 06:24:46 +00:00
tron ab40c54610 Use full hostnames when sorting rwho database entries. Fixes PR bin/8401
by John Darrow.
1999-09-20 20:35:43 +00:00
christos f6ae64deff Free the right thing. 1999-09-20 04:12:16 +00:00
ad a74cd67dcf Some cleanup [Fixes to follow as soon as I get a CD-ROM drive at home] 1999-09-18 21:15:23 +00:00
kim 6c6c0c0d5c Make this compile on Solaris... 1999-09-16 19:57:54 +00:00
mycroft 2500a4b975 Some minor cleanup of :: tests. 1999-09-16 00:54:14 +00:00
mycroft ce14db1fcd Fix a bug in the previous. In the `compat' case, we don't actually use the
list of target nodes returned by Make_ExpandUse().  We have to search the
cohorts explicitly while iterating through the tree.  So, tweak CompatMake()
to do this.
1999-09-16 00:49:48 +00:00
sommerfeld bcb141e5d0 Reuse the Hash_Entry `name' field to store the variable name when we
can (i.e., everything except environment variables, which aren't
stored in hash tables).

While we're here, inline the body of VarDelete into Var_Delete since
it's the only caller and it's just simpler that way when v->name can
share storage with the hash entry and may not need to be freed
separately.

Speeds up the infamous libc build benchhmark maybe 1% on PIII, 4% on
alpha pc164

Suggested by Perry Metzger.
1999-09-15 22:51:05 +00:00
is cef52aa203 Add -L option. netstat -r -L behaves like 4.3BSD netstat -r, that is, it
does not show route table entries pointing to link level addresses (ARP
entries or IPv6 neighbour discovery entries).
1999-09-15 20:12:18 +00:00
is 4d1abcb145 Netstat knows about "-f inet6". 1999-09-15 19:57:02 +00:00
mycroft b12871c6cb Rework how :: dependencies are handled.
Build a list of `cohorts' as before, but do *not* link each one into all the
parent nodes; instead, copy the `cohort' lists into the stream of targets to
be built inside Make_ExpandUse().  Also do the attribute propagation as a
separate pass after parsing.
This eliminates several O(n^2) algorithms.
1999-09-15 10:47:37 +00:00
mycroft c29ad80902 More cleanup code bites it. 1999-09-15 08:48:17 +00:00
mycroft dd291116bc Don't bother iterating through all the data structures to free(3) everything
right before exiting.
(The code is still present, `#ifdef CLEANUP', in case someone needs it...)
1999-09-15 08:43:21 +00:00
mycroft 441a442e46 Fix another case where we stat(2)ed .PHONY targets. 1999-09-15 05:56:33 +00:00
mycroft ff6341a190 Nuke Buf_{G,Ung}etByte{,s}(), since they aren't used, and make BufExpand do
power-of-2 allocation.
1999-09-15 04:16:31 +00:00
mycroft c33b6eca55 Avoid using Lst_Member() in SuffExpandChildren(), by avoiding Lst_ForEach() and
passing in the LstNode of the child being inspected.  Shaves off another few %,
particularly when there are long child lists containing $ expansions (e.g. in
libc).
1999-09-15 03:59:44 +00:00
mycroft d2ec8b0e26 Replace the linear variable list in the GNode with a hash table. Gives a
small (~10% on my machine) speedup building libc.
Changes by: perry (+ bug fix and minor change by me)
Reviewed by: mycroft sommerfeld
1999-09-15 02:56:34 +00:00
mycroft a502b0ee92 warn()->warnx() in a couple of places. 1999-09-14 22:49:14 +00:00
mrg 217279cb42 add a note about "audioctl encodings", to find available supported encodings. 1999-09-14 05:04:21 +00:00
tron ac79ed84db Name possible encodings for "-e" option and add an example provided by
Ben Wong in PR bin/8391. Thanks must go to Ross Harvey for helping me
with the "nroff" stuff.
1999-09-13 19:36:30 +00:00
tron feac6b2836 Use "NULL" instead of "0" for null pointer. 1999-09-13 17:35:33 +00:00
tron 5b011b57a2 Fix broken "-f" and "-P" options. Patches supplied by Ben Wong in
PR bin/8390.
1999-09-13 17:18:21 +00:00
kleink 03126e1c99 Use full month names with .Dd, as per mdoc.samples(7). 1999-09-12 18:47:10 +00:00
jdolecek 1a3b3e1f42 pull in <sys/mount.h> (with _KERNEL) to get definition of struct netexport,
used in struct ntfsmount
1999-09-12 16:47:42 +00:00
itojun 510eaf2f65 fix duplicated "leshort 42 Hitachi SH" (one of them should be "beshort").
(part of NetBSD/sh3 patches)
1999-09-12 16:38:16 +00:00
itojun bb41dd1eaa add "#ifdef __sh3__" section.
(part of NetBSD/sh3 patches)
1999-09-12 16:10:45 +00:00
dbj e1c216bcdf RTF_PROTO1 is indicated by the flag '1' and RTF_PROTO2 is indicated by the flag '2',
not the other way around
1999-09-12 02:33:43 +00:00
chs 21eedb0ec1 the PMAP_NEW option is gone as the new interface is no longer optional. 1999-09-12 01:19:23 +00:00
christos ab01074993 Add :O var modifier, that sorts the words in a variable. 1999-09-12 00:17:50 +00:00
simonb 1f7c79634d Fix inconsistancy at start of copyright message. 1999-09-10 04:05:28 +00:00
kleink 938ac456e0 Define __LINT__, per XCU5. 1999-09-09 09:34:25 +00:00
fredb 66635b21d1 Doc previously undocumented `-k' option, correctly note mutually exclusive
options, various stylistic changes.
Closes PR bin/8325.
1999-09-08 20:32:03 +00:00
jwise 75eb9e11a9 Slight improvement to last fix: don't need to reset the cpp tempfile for
files which don't need to be run through cpp.  Also, use vfork() instead of
fork().

Both from Anders Hjalmarsson (Anders.Hjalmarsson@economics.gu.se)
1999-09-07 02:36:57 +00:00