summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Further refine some #ifs:das2004-09-171-2/+2
| | | | | | | - Simplify the logic by using __GNUC_PREREQ__. Suggested by stefanf. - Make math.h compile with old (pre-8.0) versions of icc. Submitted by sf [sic].
* Fix two ugly errors:kientzle2004-09-171-2/+6
| | | | | | | | | 1. The correct cutoff for large uid/gid handling is 1<<18, not 1<<20. 2. Limit the uid/gid in the 'x' extension header (where numeric extensions are not permitted) to 1<<18, but use the correct value in the regular header (where numeric extensions are permitted). Thanks to: Dan Nelson MFC after: 3 days
* There is no such manual page in FreeBSD.pjd2004-09-161-2/+0
|
* Implement cancellation points in libc interfaces, as specified by POSIX.mtm2004-09-162-0/+314
|
* Fix a condition where the hole would be inserted in the wrongkuriyama2004-09-131-4/+2
| | | | | | place during a split. Obtained from: NetBSD
* We have now so many GEOM classes that it is better to just skip unknownpjd2004-09-131-12/+2
| | | | | | | classes than exiting. Reviewed by: le OK'ed by: phk
* Ignore geom_stripe providers.le2004-09-131-0/+2
| | | | MFC in: one week
* I found "portsdb -u" dumps core with recent INDEX file, and this iskuriyama2004-09-101-0/+2
| | | | | | | | | | | | | | | caused by refering broken (uninitialized?) pointer which is retrieved from __bt_new() (and from mpool_new()). I don't know why this linp[0] is read before stored because this should be controlled by .lower and .upper member of PAGE structure which are correctly initialized. But this workaround fixes the problem on my environment and this module has #ifdef PURIFY option which initializes new and reused memory from mpool by memset(p, 0xff, size) like as I did. Please feel free to fix the real bug instead of my workaround.
* Fix format strings to unbreak with -DDEBUG option.kuriyama2004-09-104-19/+20
|
* Use the recently introduced RES_DFLRETRY parameter instead of a well-hiddenyar2004-09-091-1/+1
| | | | constant for the default number of retries.
* bump .Ddalfred2004-09-091-1/+1
| | | | requested by: ru
* Add/document autoreq_getxid(3), which gets the autofs requestalfred2004-09-093-5/+22
| | | | | | | | | transaction id from the request, this is useful for debugging. Fix the autoh_freeall(3) function to properly free the array of auto handles. Before it was freeing individual members of the list OK, however it was then advancing the pointer and freeing the wrong data for the whole list.
* Remove debug output.alfred2004-09-081-4/+4
|
* Fix a .Fn that should be an .Fa.alfred2004-09-081-3/+16
| | | | | Clear up the spelling and language when describing how to select/poll for an autofs event.
* sync with private code:alfred2004-09-084-4/+8
| | | | | fix a 5.x'ism that 4.x needs protection from. make this code compile standalone.
* Fix two problems with REG_ICASE that were introduced with the addition oftjr2004-09-051-13/+10
| | | | | | | | | | | multibyte character support: - In CHadd(), avoid writing past the end of the character set bitmap when the opposite-case counterpart of wide characters with values less than NC have values greater than or equal to NC. - In CHaddtype(), fix a braino that caused alphabetic characters to be added to all character classes! (but only with REG_ICASE) PR: 71367
* Refactor a bunch of scheduler code to give basically the same behaviourjulian2004-09-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but with slightly cleaned up interfaces. The KSE structure has become the same as the "per thread scheduler private data" structure. In order to not make the diffs too great one is #defined as the other at this time. The KSE (or td_sched) structure is now allocated per thread and has no allocation code of its own. Concurrency for a KSEGRP is now kept track of via a simple pair of counters rather than using KSE structures as tokens. Since the KSE structure is different in each scheduler, kern_switch.c is now included at the end of each scheduler. Nothing outside the scheduler knows the contents of the KSE (aka td_sched) structure. The fields in the ksegrp structure that are to do with the scheduler's queueing mechanisms are now moved to the kg_sched structure. (per ksegrp scheduler private data structure). In other words how the scheduler queues and keeps track of threads is no-one's business except the scheduler's. This should allow people to write experimental schedulers with completely different internal structuring. A scheduler call sched_set_concurrency(kg, N) has been added that notifies teh scheduler that no more than N threads from that ksegrp should be allowed to be on concurrently scheduled. This is also used to enforce 'fainess' at this time so that a ksegrp with 10000 threads can not swamp a the run queue and force out a process with 1 thread, since the current code will not set the concurrency above NCPU, and both schedulers will not allow more than that many onto the system run queue at a time. Each scheduler should eventualy develop their own methods to do this now that they are effectively separated. Rejig libthr's kernel interface to follow the same code paths as linkse for scope system threads. This has slightly hurt libthr's performance but I will work to recover as much of it as I can. Thread exit code has been cleaned up greatly. exit and exec code now transitions a process back to 'standard non-threaded mode' before taking the next step. Reviewed by: scottl, peter MFC after: 1 week
* Some old tar archives rely on "regular-file-plus-trailing-slash" tokientzle2004-09-041-12/+22
| | | | | | | | | | | | | | | denote a directory. Unfortunately, in the presence of GNU or POSIX extensions, this code was checking the truncated filename stored in the regular header rather than the full filename stored in the extended attribute. As a result, long filenames with '/' in just the right position would trigger this check and be erroneously marked as directories. Move the check so it only considers the full filename. Note: the check can't simply be disabled for archives that contain these extensions because there are some very broken archivers out there. Thanks to: Will Froning MFC after: 3 days
* Reset the seek pointer to 0 when a file is successfully opened,iedowse2004-09-041-0/+2
| | | | | | | | | | | | | since otherwise the initial seek offset will contain the directory offset of the filesystem block that contained its directory entry. This bug was mostly harmless because typically the directory is less than one filesystem block in size so the offset would be zero. It did however generally break loading a kernel from the (large) kernel compile directory. Also reset the seek pointer when a new inode is opened in read_inode(), though this is not actually necessary now because all callers set it afterwards.
* Unbreak memmove(). Return the dst argument. While here, fix the ENDmarcel2004-09-041-7/+6
| | | | macro to actually reference memmove, not memcpy.
* Unbreak memcpy(). memcpy() is defined to return the dst argument.marcel2004-09-041-6/+5
| | | | | | By using r8 instead of r14 to do the swap, we put the dst argument in the return register. Since bcopy() doesn't clobber r8, we don't have to do anything else. This fixes ports/textproc/aspell.
* Normalize the makefile.alfred2004-09-031-8/+3
| | | | submitted by: ru
* Hook libautofs to the build.alfred2004-09-031-1/+1
|
* Add a BUGS section and copy the wording from mmap(2)'s MAP_NOSYNC,roam2004-09-031-0/+9
| | | | | | | | | documenting the obsoleteness of the msync(2) syscall and its single remaining purpose. PR: 70916 Submitted by: Radim Kolar <hsn@netmag.cz> MFC after: 3 days
* Hook autofs to the build.alfred2004-09-022-4/+7
|
* Septepber -> Septembertjr2004-09-011-1/+1
| | | | Noticed by: ru
* Back out the previous change. glob() still does use strcmp() to ordertjr2004-09-011-4/+4
| | | | pathnames.
* Per Ruslan, bsd.lib.mk already has support for dynamically-generatedkientzle2004-09-011-17/+11
| | | | | | | | .h files. This simplifies the Makefile here a bit and makes it behave better in a couple of situations. While I'm here, clean up some comments and try to improve the organization a bit. Thanks to: Ruslan Ermilov (The Marvelous Makefile Guru)
* Enter the autofs.alfred2004-08-314-0/+820
|
* Start the de-orbital burn of our previous FreeBSD version compat libsobrien2004-08-291-3/+1
| | | | | | living in usr/src. We need to use them from ports to record dependencies. Discussed with: re(scottl)
* Add cross-reference to ftw(3).tjr2004-08-291-0/+1
|
* Remove the misleading description of the 'key' argument toroam2004-08-271-17/+1
| | | | | | | | | mpool_open(3) - it is *not* really used for synchronization; in fact, it is not used at all. PR: 70929 Submitted by: Martin Kammerhofer <dada@sbox.tugraz.at> MFC after: 3 days
* Cache uid-from-uname and gid-from-gname lookups during extraction.kientzle2004-08-271-17/+84
| | | | | | | This should provide a big performance boost for folks using NIS or LDAP. MFC after: 3 days Thanks to: Jun Kuriyama (for reminding me that this was still on my TODO list)
* Correct a denial-of-service vulnerability in zlib.nectar2004-08-262-0/+6
| | | | | | | For reference, this bug was first reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252253 Submitted by: "Dmitry V. Levin" <ldv@altlinux.org>
* Don't forget to va_end() the va_list we get from va_copy().des2004-08-262-0/+2
| | | | | Submitted by: Sean McNeil <sean@mcneil.com> MFC after: 3 days
* Don't edit permissions of pre-existing directories during extract.kientzle2004-08-261-1/+1
| | | | | | | | This closes a security hole. Otherwise, libarchive will happily extract into directories to which it lacks write permissions by resetting the permissions during the extract. Thanks to: Kris Kennaway
* It is not legal to re-use a va_list variable. This causedkientzle2004-08-261-1/+4
| | | | | | a crash on amd64, in particular. Thanks to: Sean McNeil
* Add missing brackets. It was committed from wrong tree.davidxu2004-08-262-2/+2
|
* gcc -O2 cleanup. tested for a long time.davidxu2004-08-254-8/+8
| | | | Reviewed by: deischen
* Make profiling actually work. The gcc compiler emits a call to themarcel2004-08-252-4/+79
| | | | | | | | | | | | | _mcount() stub when profiling is enabled. Emit this code sequence for assembly routines as welli (MCOUNT definition in <machine/asm.h>. We do not pass the GOT entry however as the 4th argument, because it's not used. The _mcount() stub calls __mcount(), which does the actual work. Define _MCOUNT_DECL to define __mcount. We do not have an implementation of mcount(), so we define MCOUNT as empty, but have a weak alias to _mcount() in _mcount.S. Note that the _mcount() stub in the kernel is slightly different from the stub in userland. This is because we do not have to worry about nested routines in the kernel.
* note that it is the caller's responsibility to free any buffer passedalfred2004-08-241-0/+5
| | | | to setvbuf(3) and friends.
* Replace the current implementations of ftw() and nftw() with the OpenBSDtjr2004-08-243-193/+208
| | | | | implementations written by Todd C. Miller. These are cleaner, less buggy and actively maintained.
* struct tm.tm_year is listed as 'years since 1900', and is signed. Onpeter2004-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | 64 bit systems, years roughly -2^31 through 2^31 can be represented in time_t without any trouble. 32 bit time_t systems only range from roughly 1902 through 2038. As a consequence, none of the date munging code for all the various calendar tweaks before then is present. There are other problems including the fact that there was no 'year zero' and so on. So rather than get excited about trying to figure out when the calendar jumped by two weeks etc, simply disallow negative (ie: prior to 1900) years. This happens to have an important side effect. If you bzero a 'struct tm', it corresponds to 'Jan 0, 1900, 00:00 GMT'. This happens to be representable (after canonification) in 64 bit time_t space. Zero tm structs are generally an error and mktime normally returns -1 for them. Interestingly, it tries to canonify the 'jan 0' to 'dec 31, 1899', ie: year -1. This conveniently trips the negative year test above, which means we can trivially detect the null 'tm' struct. This actually tripped up code at work. :-/ (Don't ask)
* Make sure we allocate at least enough space for the TCB for variant I TLS.dfr2004-08-231-0/+2
| | | | MFC after: 3 days
* Update documentation to match reality: glob() sorts its result accordingtjr2004-08-231-4/+4
| | | | | | | to the current LC_COLLATE setting, not in "ASCII order". PR: 54391 MFC after: 1 week
* Pull debug symbols in for statically linked binary.davidxu2004-08-212-0/+8
| | | | Reviewed by: desichen
* Back out the call to _init_tls() - something is broken there and itdfr2004-08-211-2/+0
| | | | prevents all static binaries from running.
* Re-word warning about the UTF2 encoding, taking care to use the wordtjr2004-08-211-3/+3
| | | | "obsolete" instead of "deprecated".
* Bump document date for previous.tjr2004-08-212-2/+2
|
* Re-word warning about the rune interface, taking care to use the wordtjr2004-08-212-12/+10
| | | | "obsolete" instead of "deprecated".
OpenPOWER on IntegriCloud