summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Simplify sigwait code a bit by using a waitset and removing oldsigmask.davidxu2003-07-276-44/+34
| | | | Reviewed by: deischen
* Set mc_len to sizeof(mcontext_t), otherwise it is an invalid context.davidxu2003-07-261-0/+1
|
* Fix typo.davidxu2003-07-262-10/+10
|
* Revert previous commit. We don't use setjmp()/longjmp() for contextmarcel2003-07-251-4/+2
| | | | | | switching anymore, so there's no need to save and restore GP. This change breaks threaded applications linked against libc_r. Pull the tier 2 card again: relink. This will link against libthr instead.
* Fix for 64 bit platforms. sysctl's length args are pointers topeter2003-07-252-3/+6
| | | | | | size_t, not int. This could be fatal where size_t is long. Reviewed by: bp
* Add wrapper for kqueue() to keep track of the allocated fd and allow it tomp2003-07-252-0/+54
| | | | | | | be closed. This fixes a file descriptor leak when closing a kqueue() fd. Reviewed by: deischen MFC after: 1 week
* An u_int8_t can never be bigger than 255, so remove a useless check.mux2003-07-251-2/+0
| | | | Spotted by: GCC
* Make library WARNS=6 clean. The problems have been: alignment on sparc64harti2003-07-254-7/+8
| | | | and one of the usual sizeof(in_addr_t) == sizeof(u_long) bugs.
* Print group name in getfacl output when calculating an effectiverwatson2003-07-241-2/+3
| | | | | | permission set based on a more restrictive mask. Submitted by: Glen Gibb <grg@ridley.unimelb.edu.au>
* Turn on the extended syntax, which TCP_wrappers has by default, asmarkm2003-07-241-1/+1
| | | | distributed.
* Remove GCC-specific debugging option.markm2003-07-241-1/+1
| | | | OK'ed by: phk
* Don't check for the existance of src/crypto/ for building items thatmarkm2003-07-241-1/+1
| | | | | may contain crypto. The days of ITAR paranoia are over, and the simple macro tests that remain are sufficient.
* Make sure that a "make release" (more accurately the bit that makesmarkm2003-07-241-0/+2
| | | | | the crunched binary) get a non-cryptographic telnet. This is overkill in that it covers stuff that is not normally used in a crunched binary.
* Implement _get_curthread and _set_curthread. We use GCCs builtinmarcel2003-07-241-1/+6
| | | | | function this, which expands to PAL calls (rduniq and wruniq). This needs adjustment when TLS is implemented.
* Ensure that for the cryptographic instances of *telnet*, the "crypto"markm2003-07-241-0/+1
| | | | distribution is used. This only affects release-building.
* Connect libncp/libsmb to the build. They compile, but have a couple ofpeter2003-07-241-0/+5
| | | | | silly bugs that probably wont quite make a segfault. eg: passing a pointer to an int to sysctl instead of a pointer to a size_t.
* Document an additional error return value. The connect(2) call can alsodds2003-07-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return EACCES on non-Unix domain sockets as demonstrated by the following program: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main(int argc, char *argv[]) { struct sockaddr_in rem_addr; int sock; if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); exit(1); } bzero((char *)&rem_addr, sizeof(rem_addr)); rem_addr.sin_family = AF_INET; rem_addr.sin_addr.s_addr = INADDR_NONE; rem_addr.sin_port = htons(10000); if (connect(sock, (struct sockaddr *)&rem_addr, sizeof(rem_addr)) < 0) { perror("connect"); exit(1); } } The call chain returning this value is probably: kern/uipc_syscalls.c:connect kern/uipc_socket.c:soconnect netinet/tcp_usrreq.c:tcp_usr_connect netinet/tcp_output.c:tcp_output netinet/ip_output.c:ip_output Reviewed by: schweikh (mentor) MFC after: 2 weeks
* Fixed some style bugs (misplacement and misformatting of some commented-outbde2003-07-231-4/+2
| | | | code).
* Only provide one copy of the math functions. If we provide a MD function,peter2003-07-2326-80/+32
| | | | | | | | do not also provide a __generic_XXX version as well. This is how we used to runtime select the generic vs i387 versions on the i386 platform. This saves a pile of #defines in the src/math_private.h file to undo the __generic_XXX renames in some of the *.c files.
* No longer need the internal __get_hw_float() function.peter2003-07-232-51/+0
|
* Now that we do not need to do runtime detection for the broken defaultpeter2003-07-233-6/+21
| | | | | | | | | fp emulator, stop doing the runtime selection of hardware or emulated floating point operations on i386. Note that I have not suppressed the duplicate compiles yet. While here, fix the alpha. It has provided specific copysign/copysignf functions since the beginning of time, but they have never been used.
* Move idle kse wakeup to outside of regions where locks are held.deischen2003-07-2316-146/+260
| | | | | | | | This eliminates ping-ponging of locks, where the idle KSE wakes up only to find the lock it needs is being held. This gives little or no gain to M:N mode but greatly speeds up 1:1 mode. Reviewed & Tested by: davidxu
* Make sure the crypto versions of libfetch and fetch(1) appear inru2003-07-221-0/+1
| | | | | | the "crypto" distribution. Approved by: des
* Instantiate explicit callable versions of the machine/ieeefp.h inlinespeter2003-07-229-1/+67
| | | | for the use of non-GCC compilers and C++ code.
* Turn off the libc/quad functions since they are not needed for amd64peter2003-07-221-0/+9
| | | | and just cause lots of warnings.
* Revert previous commit after fixing libpam.des2003-07-211-1/+1
|
* Test correct macro for "without crypto" option(s).markm2003-07-201-1/+1
|
* Add missing arguments to _amd64_restore_context() when called fromdeischen2003-07-202-4/+8
| | | | THR_SETCONTEXT().
* Now that we have the stubs for alpha and we can build itmtm2003-07-201-6/+6
| | | | | | | | on that platform, invert the test for the platforms on which libthr is built. Amd64 and powerpc are the only platforms excluded. Compile tested on: amd64, alpha
* This commit was generated by cvs2svn to compensate for changes in r117783,mtm2003-07-192-0/+55
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * The MD framework for libthr on alphamtm2003-07-192-0/+55
|
* Override libc function raise(), in threading mode, raise() willdavidxu2003-07-195-0/+110
| | | | | | send signal to current thread. Reviewed by: deischen
* Make raise and _raise as weak symbols, so they can be overriden bydavidxu2003-07-191-1/+4
| | | | | | thread library. Reviewed by: deischen
* Add some very beta amd64 bits. These will also need some tweaking.deischen2003-07-1911-0/+921
|
* Add amd64 versions of makecontext() and signalcontext() neededdeischen2003-07-193-1/+208
| | | | | for libkse (makecontext() is also needed for libthr). These probably will need some tweaking.
* Rewrite to reflect slight change in semantics for C99, and note a bugwollman2003-07-191-22/+39
| | | | in the standard. Defer to gettimeofday(2) for error indications.
* C99 compliance: time() always sets its return value in both placeswollman2003-07-191-4/+7
| | | | | | (if present), even on error. Pointed out by: Wojtek Lerch, on the Austin Group mailing-list
* Revert to using yp_order() to probe for master.paswd.by* maps andwpaul2003-07-181-7/+14
| | | | | | | | | | | | | | | don't probe the server at all for passwd.by* maps. This fixes interoperability with the Services For UNIX NIS server (which is really a front end to Captive^WActiveDirectory). This server incorrectly returns success for all YPPROC_MASTER requests, even for maps that don't exist, which makes it impossible to (ab)use it to probe for the existence of the master.passwd.by* maps. This is a little kludgey, but basically restores the original behavior of getpwent.c as it is in -stable, and works around both the lack of YPPROC_ORDER on NIS+ servers as well as the broken YPPROC_MASTER on Services For UNIX servers.
* Whitespace after keywords per style(9).wollman2003-07-181-2/+2
|
* Cleanup thread accounting. Don't reset a threads timeslicedeischen2003-07-186-76/+54
| | | | | | | | when it blocks; it only gets reset when it yields. Properly set a thread's default stack guardsize. Reviewed by: davidxu
* Add a preemption point when a mutex or condition variable isdeischen2003-07-184-12/+36
| | | | | | | | | | | | | | | handed-off/signaled to a higher priority thread. Note that when there are idle KSEs that could run the higher priority thread, we still add the preemption point because it seems to take the kernel a while to schedule an idle KSE. The drawbacks are that threads will be swapped more often between CPUs (KSEs) and that there will be an extra userland context switch (the idle KSE is still woken and will probably resume the preempted thread). We'll revisit this if and when idle CPU/KSE wakeup times improve. Inspired by: Petri Helenius <pete@he.iki.fi> Reviewed by: davidxu
* Clean up KSE specific data (KSD) macros a bit.deischen2003-07-181-29/+8
| | | | Reviewed by: davidxu
* o Eliminate upcall for PTHREAD_SYSTEM_SCOPE thread, now itdavidxu2003-07-1732-790/+1204
| | | | | | | | | | | | | is system bound thread and when it is blocked, no upcall is generated. o Add ability to libkse to allow it run in pure 1:1 threading mode, defining SYSTEM_SCOPE_ONLY in Makefile can turn on this option. o Eliminate code for installing dummy signal handler for sigwait call. o Add hash table to find thread. Reviewed by: deischen
* Very big makeover in the way telnet, telnetd and libtelnet are built.markm2003-07-167-412/+19
| | | | | | | | | | | | | | | | | | | | | | | Previously, there were two copies of telnet; a non-crypto version that lived in the usual places, and a crypto version that lived in crypto/telnet/. The latter was built in a broken manner somewhat akin to other "contribified" sources. This meant that there were 4 telnets competing with each other at build time - KerberosIV, Kerberos5, plain-old-secure and base. KerberosIV is no longer in the running, but the other three took it in turns to jump all over each other during a "make buildworld". As the crypto issue has been clarified, and crypto _calls_ are not a problem, crypto/telnet has been repo-copied to contrib/telnet, and with this commit, all telnets are now "contribified". The contrib path was chosen to not destroy history in the repository, and differs from other contrib/ entries in that it may be worked on as "normal" BSD code. There is no dangerous crypto in these sources, only a very weak system less strong than enigma(1). Kerberos5 telnet and Secure telnet are now selected by using the usual macros in /etc/make.conf, and the build process is unsurprising and less treacherous.
* Add a __DECONST() to unbreak the build.des2003-07-151-1/+1
|
* Back out revision 1.22.ceri2003-07-151-1/+1
| | | | Requested by: bde
* Fix typo: Passing the first argument to exit() in out2 does not work.marcel2003-07-151-1/+1
| | | | Trust me.
* _start() needed to be written in assembly. See crt1.S.marcel2003-07-141-124/+0
|
* Rewite _start(). We cannot use a C function due to the fact that wemarcel2003-07-132-2/+193
| | | | | | | | | | | | | | | | | don't call it according to the runtime specification and especially WRT to gp this can cause trouble. The gcc 3.3.1 import broke the ia64 runtime because the compiler saved gp prior to us being able to set it properly. Restoring gp after the calls would then invalidate gp and cause segmentation faults later on. By rewriting _start() as an assembly function, we also avoided even more gcc dependences, by trying to use gcc specific features to work around the problem. This version of _start() does not reference _DYNAMIC. We register the cleanup function when it's a non-NULL pointer. The kernel will always pass a NULL pointer and dynamic linkers may pass a non-NULL pointer. The machine independent code to set __progname now unfortunately is written in assembly. So be it.
* ioctl macros and defines are now present in ioccom.h, not ioctl.h.ceri2003-07-131-1/+1
| | | | | | | Update the manpage to reflect this. PR: docs/54235 Submitted by: Karen Thode <thode12@msn.com>
OpenPOWER on IntegriCloud