Commit Graph

686 Commits

Author SHA1 Message Date
Mark Murray
3fcee20fa4 Removed reference to missing libmp in a comment. We have GNU MP now. 1995-11-12 19:32:24 +00:00
Bill Paul
0f98415ed4 - Make _do_ypbind() check for /var/run/ypbind.lock and attempt to flock()
it before before trying to establish a binding. If /var/run/ypbind.lock
  doesn't exist, or if it exists and isn't locked, then ypbind isn't
  running, which means NIS is either turned off or hosed.

- Have _yp_check() call yp_unbind() after it sucessfully calls yp_bind()
  to make sure it frees resources correctly. (I don't think there's really
  a memory leak here, but it seems somehow wrong to call yp_bind() without
  making a corresponding call to yp_unbind() afterwards.)

This makes the NIS code behave a little better in cases where libc makes
calls to NIS, but it isn't running correctly (i.e. there's no ypbind).

This cleans up some strange libc behavior that manifests itself if
you have the system domain name set, but aren't actually running NIS.
In this event, the getrpcent(3) code could try to call into NIS and
cause several inexplicable "clnttcp_create error: RPC program not
registered" messages to appear. This happens because _yp_check() checks
if the system domain name is set and, if it is, proceeds to call
yp_bind() to attempt to establish a binding. Since there is no
binding file (remember: ypbind isn't running, so /var/yp/binding
will be empty), _yp_dobind() will attempt to contact ypbind to
prod it into binding the domain. And because ypbind isn't running,
the code generates the 'clnttcp_create' error. Ultimately the
_yp_check() fails and the getrpcent(3) code rolls over to the /etc/rpc
file, but the error messages are annoying, and the code should be
smart enough to forgo the binding attempt when NIS is turned off.
1995-11-05 05:39:04 +00:00
Bill Paul
215032be8c Add NIS support to getservent(3) functions (getservbyport() and getservbyname()
both call getservent() to do most of the work, so we only need to modify
this file to take care of everybody).

Note that there is only one NIS services map (services.byname) even
though there are getservbyname() and getservbyport() library functions.
1995-11-04 19:07:27 +00:00
Garrett Wollman
2f7778001d Document recent changes in socket buffers and listen(2). 1995-11-03 18:34:38 +00:00
Andrey A. Chernov
42ef439996 Add more stuff moved out from XPG3 1995-11-03 09:03:00 +00:00
Andrey A. Chernov
f9cbdf410e Move more stuff out to XPG4
Handle negative chars inside runetype/tolower/toupper
1995-11-03 08:59:02 +00:00
Andrey A. Chernov
3e912c9dee Remove my locale hack. Sigh. 1995-11-02 12:42:42 +00:00
Poul-Henning Kamp
05fc2de514 Clean up and make code (more) readable. 1995-10-29 09:49:21 +00:00
Poul-Henning Kamp
d12f212098 Add #include <sys/user.h>. 1995-10-28 16:14:18 +00:00
Adam David
5f0d67bea7 misc typos 1995-10-27 16:56:53 +00:00
Andrey A. Chernov
9f23763a01 Remove unneded ctype.h 1995-10-26 22:32:00 +00:00
Julian Elischer
cc6a66f20e Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by:	Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
1995-10-26 20:31:59 +00:00
Andrey A. Chernov
7f3f016d8c Fix it for chars with 8bit set 1995-10-23 20:49:58 +00:00
Andrey A. Chernov
34d08e870e Treat empty encoding as "C" encoding 1995-10-23 20:20:11 +00:00
Andrey A. Chernov
377da8e867 Optimize PathLocale handling.
Handle C/POSIX/"" properly.
Don't reset collate to C when it is unnecessary
1995-10-23 20:08:24 +00:00
Andrey A. Chernov
2d542a0868 Don't reset LC_TIME to C when it isn't neccessary 1995-10-23 19:52:43 +00:00
Andrey A. Chernov
24c9187962 Use fake (empty) startup_setlocale for XPG4 1995-10-23 02:25:53 +00:00
Andrey A. Chernov
9d45c3af90 Reduce static binaries bloat by splitting out normally unused
setinvalidrune()
1995-10-23 02:13:05 +00:00
Andrey A. Chernov
0975d201e0 libxpg4 added 1995-10-23 01:50:11 +00:00
Andrey A. Chernov
5b01b59e21 XPG4 hook 1995-10-23 01:45:42 +00:00
Andrey A. Chernov
350a3d3e48 Migrate from XPG4 to XPG3 (libxpg4 will be added soon)
Remove big part of my startup_setlocale hack.
Add missing manpage links.
1995-10-23 01:34:17 +00:00
Bruce Evans
6644bf3e9b Undo the the changes in the previous revision (MANSRC now works right again).
Use ${INSTALL} instead of install.
1995-10-22 19:16:01 +00:00
Bruce Evans
1b88e35b80 Update to 4.4lite2 (clean up includes; initialize the name of the master
pty correctly (it was broken for calls to openpty() after the first
successful one)).
Obtained from:	4.4lite2
1995-10-22 19:11:12 +00:00
Bruce Evans
5e0a7c7c40 Removed unnecessary include of <sys/tty.h>. tty.h apparently once had
some user interfaces in it.  It no longer does.
1995-10-22 18:52:23 +00:00
Bruce Evans
ee810ef23e Update to 4.4lite2 (initialize arrow key data completely). 1995-10-22 18:49:04 +00:00
Bruce Evans
3b4058284e Fixed lint from cc -Wall.
Cleaned up includes.
1995-10-22 18:43:26 +00:00
Bruce Evans
ccbc94648a Fixed dependencies for scrt0.o.
Build a static gcrt0.o (sgcrt0.o) too.  Currently only the dynamic gcrt0.o
is used, although -pg forces -static.
Sorted the .o targets.
1995-10-22 18:36:47 +00:00
Bruce Evans
5308354b7e Fixed use of too many args for `.Em'.
Fixed description of domain of y*().
Fixed description of error domain.  (This description is still half
redundant and half wrong, as in many other math man pages.  fdlibm
doesn't support the VAX or Tahoe.)
Fixed capitalization of `Bessel'.
1995-10-22 18:16:39 +00:00
Poul-Henning Kamp
29285d6cc5 minor cleanup, #includes. 1995-10-22 14:53:58 +00:00
Poul-Henning Kamp
88640ee125 Mino cleanup, #includes & unused vars. 1995-10-22 14:53:17 +00:00
Poul-Henning Kamp
c0d41487f2 Minor cleanup, #include's and unused vars.
Added compile-time warning to an old funky function.
1995-10-22 14:52:30 +00:00
Poul-Henning Kamp
4c3af266f6 Well, cvs commit core'ed on me, I belive I have got all the locks out,
but a commit mail got lost, it's the same as for this commit:

 lib/libc/gen  confstr.c crypt.c disklabel.c fstab.c getcap.c
          getgrent.c  getgrouplist.c getpass.c getpwent.c
          initgroups.c nlist.c  psignal.c pwcache.c setmode.c
          sleep.c sysconf.c sysctl.c  syslog.c usleep.c
 lib/libc/locale  none.c read_runemagi.c setlocale.c
 lib/libc/net  gethostbydns.c getnetbydns.c getnetbynis.c
 lib/libc/nls  msgcat.c
 lib/libc/quad  Makefile.inc
 lib/libc/regex  engine.c regcomp.c regerror.c

	Minor cleanup, mostly unused vars and missing #includes.
	Limit the number of quad functions we pull in for 'i386'.
	I still belive the quad stuff should go back into gcc.
	Add compile-time warnings about crypt functions.
1995-10-22 14:51:39 +00:00
Poul-Henning Kamp
f824233e9e Remove EXTRA_SANITY, fix a unused var. 1995-10-22 14:47:00 +00:00
Poul-Henning Kamp
16252f1166 More cleanup.
Uhm, I also forgot: I took "EXTRA_SANITY" out of malloc.c
1995-10-22 14:40:55 +00:00
Poul-Henning Kamp
e2a4bdf63c limit the number of functions we pull in for 'i386'.
I still belive this stuff should go back into gcc.
1995-10-22 14:40:17 +00:00
Poul-Henning Kamp
739398ee03 and so on... 1995-10-22 14:39:22 +00:00
Poul-Henning Kamp
fce61be7f5 As above. 1995-10-22 14:39:06 +00:00
Poul-Henning Kamp
696cbd5ff2 As above.
Oh I also put in a couple of compile-time warnings for the crypt stuff.
1995-10-22 14:38:48 +00:00
Poul-Henning Kamp
8b10240709 Minor cleanup, mostly unused vars and missing #includes. 1995-10-22 14:37:11 +00:00
Joerg Wunsch
0859bf6ff4 Finally catch up with the Frenchmen, and create the German message
catalog.
:-)
1995-10-21 23:47:43 +00:00
Peter Wemm
fc370289ab Add $Id$ since this version of the file has diverged from the BSD base a
fair bit.  I forgot to add it when I made the fixes some time ago.
1995-10-21 07:05:01 +00:00
Poul-Henning Kamp
6b44b1a3fa -fomit-frame-pointer is becomming an increasingly popular optimization,
so before somebody screws up royally, make sure this always works by
adding a -fno-omit-frame-pointer here.
1995-10-20 20:05:15 +00:00
Andrey A. Chernov
32e0d22da8 Propogate default table to restricted 8859-1 template
(only control/graph/punct/print tags used)
Based on: kaleb@x.org and Bruce suggestions
1995-10-19 19:29:55 +00:00
Joerg Wunsch
b788806eb4 Remove the bugs section. sh(1) now has a ulimit builtin. 1995-10-19 18:45:44 +00:00
Poul-Henning Kamp
ee61b5a715 put the _getenv and _strncmp under #ifdef DEBUG, which is the only time
they are used.  Saves a few bytes here and there, nothing major.
1995-10-18 15:56:55 +00:00
David Greenman
14c175f7a9 Create a scrt0.o file that specifically excludes the shared-lib support.
This will be used for -static programs.
1995-10-18 04:19:00 +00:00
David Greenman
283e0c0eb7 Doubled the performance of getenv()/__findenv() by rewriting it to not
use strncmp()..
1995-10-17 21:37:41 +00:00
Poul-Henning Kamp
eba2673a3f Add moncontrol.3 -> monstartup.3 link here. 1995-10-15 17:40:20 +00:00
Bill Paul
3948edc24c Another tweak/speedup pass:
- Fix buffer overflow problem once and for all: do away with the buffer
  copies to 'user' prior to calling _scancaches() and just pass a pointer
  to the buffer returned by yp_match()/yp_first()/yp_next()/whatever.
  (We turn the first ':' to a NUL first so strcmp() works, then change it
  back later. Submitted by Bill Fenner <fenner@parc.xerox.com> and
  tweaked slightly by me.

- Give _pw_breakout_yp() the 'more elegant solution' I promised way back when.
  Eliminate several copies to static buffers and replace them with just
  one copy. (The buffer returned by the NIS functions is at most
  YPMAXRECORD bytes long, so we should only need one static buffer of
  the same length (plus 2 for paranoia's sake).)

- Also in _pw_breakout_yp(): always set pw.pw_passwd to the username
  obtained via NIS regardless of what pw_fields says: usernames cannot
  be overridden so we have no choice but to use the name returned by
  NIS.

- _Again_ in _pw_breakout_yp(): before doing anything else, check that
  the first character of the NIS-returned buffer is not a '+' or '-'.
  If it is, drop the entry. (#define EXTRA_PARANOIA 1 :)

- Probe for the master.passwd.* maps once during __initdb() instead
  of doing it each time _getyppass() or _nextyppass() is called.

- Don't copy the NIS data buffers to static memory in _getyppass()
  and _nextyppass(): this is done in _pw_breakout_yp() now.

- Test against phkmalloc and phkmalloc/2 (TNG!) to make sure we're
  free()ing the yp buffers sanely.

- Put _havemaster(), _getyppass() and nextyppass() prototypes under
  #ifdef YP. (Somehow they ended up on the wrong side of the #endif.)

- Remove unused variable ___yp_only.
1995-10-11 21:35:08 +00:00
Poul-Henning Kamp
7aa70c9e8e phkmalloc/2
"zero' and 'junk' options to help find and diagnose malloc abuse.
EXTRA_SANITY defaults "junk" to on.
Don't dump the internal state, unless EXTRA_SANITY.
General code cleanup.
Error messages cleaned up a bit, more checking earlier.
EXTRA_SANITY is default at this time (just in case).
Performance (without EXTRA_SANITY) is better, beats gnumalloc in
both time & space most of the time:

	# In-memory test.
	./malloc 50000000 2000 8192
	159.2u 1.5s 2:41.85 99.3% 5+7742k 0+0io 0pf+0w
	./gnumalloc 50000000 2000 8192
	272.6u 0.4s 4:35.01 99.3% 5+8533k 0+0io 0pf+0w

	# Swap-space test.
	./malloc 500000 14000 8192
	6.5u 4.1s 4:08.87 4.3% 5+49209k 0+0io 9772pf+0w
	./gnumalloc 500000 14000 8192
	16.2u 14.5s 15:36.14 3.2% 5+54100k 0+0io 47651pf+0w

	# Small items test.
	./malloc 20000000 20000 2048
	67.0u 0.3s 1:07.83 99.2% 5+18199k 0+0io 4pf+0w
	./gnumalloc 20000000 20000 2048
	66.2u 0.3s 1:07.03 99.3% 5+18107k 0+0io 0pf+0w

SANITY is not an option anymore. (!!)
1995-10-08 18:44:20 +00:00