summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add gb2312 encoding.davidxu2003-11-053-1/+120
|
* style(9)deischen2003-11-052-80/+106
| | | | Reviewed by: bde
* Don't declare the malloc lock; use the declaration provided in libc.deischen2003-11-052-2/+12
| | | | Noticed by: bde
* Remove #include of spinlock.h from libc_private.h. Declare spinlocks asdeischen2003-11-052-5/+4
| | | | | | | struct _spinlock. Keep the typedef in for now; another set of changes may come around to clean up consumers of spinlocks. Requested by: bde
* - plug memory leak.ume2003-11-056-110/+150
| | | | | | | | | | - fixed a length of the sadb extension in the case of pfkey_send_x5(). - used getprotobynumber() for printing a upper layer protocol name. - modified the output format against the change of the setkey syntax about a icmp6 type/code. - don't enumerate reserved fields. use memset. Obtained from: KAME
* Pass NULL instead of a pointer to a zeroed mbstate_t object.tjr2003-11-056-37/+17
|
* Pass NULL instead of a pointer to a zeroed mbstate_t object.tjr2003-11-052-10/+4
|
* Implement mbrtowc() and wcrtomb() directly (sync with big5.c).tjr2003-11-051-53/+50
|
* Add pthread_atfork() source code. Dan forgot to commit this file.davidxu2003-11-052-0/+112
|
* Add an implementation for pthread_atfork().deischen2003-11-0411-12/+144
| | | | | | | | Aside from the POSIX requirements for pthread_atfork(), when fork()ing, take the malloc lock to keep malloc state consistent in the child. Reviewed by: davidxu
* Add the ability to reinitialize libpthread's internal FIFO-queueingdeischen2003-11-044-30/+114
| | | | | | locks. Reviewed by: davidxu
* Add the ability to reinitialize a spinlock (libc/libpthreaddeischen2003-11-042-24/+34
| | | | | | internal lock, not a pthread spinlock). Reviewed by: davidxu
* s/foo()/foo(void)/deischen2003-11-042-4/+6
| | | | Add a blank line after a variable declaration.
* Libpthread uses the convention that all of its (non-weak) symbolsdeischen2003-11-042-10/+22
| | | | | begin with underscores and provide weak definitions without underscores. Make the pthread spinlock conform to this convention.
* Add the ability to reinitialize a mutex (internally, not a userlanddeischen2003-11-042-14/+40
| | | | | | API). Reviewed by: davidxu
* Externalize malloc's spinlock so that a thread library can takedeischen2003-11-042-0/+9
| | | | | | | | | | | it around an application's fork() call. Our new thread libraries (libthr, libpthread) can now have threads running while another thread calls fork(). In this case, it is possible for malloc to be left in an inconsistent state in the child. Our thread libraries, libpthread in particular, need to use malloc internally after a fork (in the child). Reviewed by: davidxu
* Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroedtjr2003-11-043-9/+3
| | | | | | | mbstate_t object that they ignore. The zeroing is fairly expensive, and it will never be necessary in these functions; when we support state-dependent encodings, we will pass in a pointer to the file's mbstate_t object, and only zero it at the time the file gets opened.
* Add a reference to the new utrace(2) manual page.tjr2003-11-041-1/+2
|
* * Modify libpcap to work a bit better with our 802.11 code. This meansgreen2003-11-041-1/+3
| | | | | | | | | | | | tcpdump -y ieee802_11 will work in the basic senses, including the code compilation for filters (where you may specify "link[]" to refer to parts of the 802.11 header, as well as treat it like a normal Ethernet header). Previously, it was just too far off to do anything useful for us. * While I'm here, fix some compile problems that will result from lex and yacc namespace polution when linking with -lpcap. The namespace is now "pcapyy*" instead of "yy*", and it tests fine with world and some external applications that may or may not use "yy*".
* o Save a copy of the GPT entries for which there's a chunk with anmarcel2003-11-041-10/+55
| | | | | | | | | | | index referencing it. We need to know the original type and name so that we know what to put in the table when we reconstruct it. o Clear the table entries before we rebuild it to avoid that we end up with stale data. o Sequentially populate the table entries from the chunks. For the chunks that have an index (now referencing the saved copy) we use the saved type and name. This way we can handle unknown types better. In all cases we update the start and end LBAs.
* When printing ACLs, truncate user and group names if they're too long,rwatson2003-11-031-3/+5
| | | | | | | | | rather than generating an error. This is consistent with other tools printing user and group names, and means you can read the ACL using our tools rather than being up a creek. PR: 56991 Submitted by: Michael Bretterklieber <mbretter@a-quadrat.at>
* Build address handling, traffic descriptor handling, encoding and decodingharti2003-11-031-5/+12
| | | | into the library.
* Don't divide the start and end of the chunk by the sector size whenmarcel2003-11-031-2/+2
| | | | | | filling in the GPT entry. Both are already in sector numbers (LBA) and exactly what we need for the entry. We now write a structurally correct GPT partitioning.
* Fix two bugs in the calculation of the last LBA of the GPT coveredmarcel2003-11-031-2/+2
| | | | | | | | | part of the disk. The first appears to be a typo and instead of dividing the media size with the sector size, we multiplied. The second is an off-by-1 error that's the result of mixing up count and index. The code in question is only applicable for virgin disks and is used to create the "whole" chunk, which covers only the GPT usable portion of the disk.
* Rewrite Write_Disk() so that it creates a GPT. Note that the code ismarcel2003-11-031-15/+363
| | | | | basicly untested, but the guts is all there. I need to free up a disk before I give it a spin.
* Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implementtjr2003-11-024-254/+233
| | | | | | mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left unconverted; GB18030 will be done eventually, but GBK and UTF2 may just be removed, as they are subsets of GB18030 and UTF-8 respectively.
* Turn Write_Disk() into a stub for now. It needs to be rewritten tomarcel2003-11-021-149/+2
| | | | write out a GPT and not a MBR.
* o Move Int_Open_Disk() from disk.c to open_disk.c for use by allmarcel2003-11-026-304/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | platforms except ia64 and use Int_Open_Disk() in open_ia64_disk.c on ia64. We need to know more than GEOM can provide us so we're forced to read from the disk. Move uuid_type() to open_ia64_disk.c and remove all references on non-ia64. o Pass the GEOM conftxt to Int_Open_Disk() so that only Open_Disk() needs to know about GEOM and libdisk can more easily be used with media not handled by GEOM. o Create an ia64 specific definiton of struct disk on ia64, because we don't need/have most of the fields other platforms need and other fields not applicable on platforms other than ia64. o Do not compile change.c on ia64. It's too PC specific. o In Fixup_Names() in create_chunk.c, try all partition numbers that are valid for the GPT disk. We have the total number of partitions that can be allocated in the disk structure on ia64. Also, use the GPT partition naming if we're creating one under a chunk of type "whole". It's a GPT partition in that case. o In Create_Chunk(), compile-out the PC specific code on ia64 that checks BIOS geometry restrictions. o In Debug_Disk() in disk.c, dump the ia64 specific fields. o Save the partition index in the chunk on ia64 so that we can preserve it when we write the data back to disk. This avoids that partitions get moved around or swapped after installing FreeBSD, which may render a disk unusable.
* Do not fill in d_ncylinders, d_ntracks and d_nsectors in the disklabelmarcel2003-11-021-0/+2
| | | | | on ia64. Not only do we not have a disklabel by default, we also do not have a notion of cylinders, tracks and sectors.
* Compile-out support for allfreebsd, dedicate, sanitize and bios onmarcel2003-11-021-0/+2
| | | | ia64. These commands are PC specific and not supported.
* Turn Track_Aligned(), Prev_Track_Aligned(), Next_Track_Aligned(),marcel2003-11-021-7/+22
| | | | | | Cyl_Aligned(), Prev_Cyl_Aligned() and Next_Cyl_Aligned() into tautologies on ia64. GPT removes all notion of tracks, heads and sectors per track, so there are no alignment considerations.
* o In Print_Chunk(), don't print the address of the chunk on ia64. Itmarcel2003-11-021-4/+11
| | | | | | | | doesn't have any meaning and only results in lines longer than 80 characters. o In Delete_Chunk2(), also look for chunks of type "part" under chunks of type "whole" on ia64. They're not only under chunks of type "freebsd" there.
* Remove TODO comment about creating a macro version of towctrans().tjr2003-11-011-4/+0
| | | | Remove unnecessary inclusion of <ctype.h>.
* Fix a typo that caused the optimized single-byte locale path not to be taken.tjr2003-11-011-1/+1
|
* Add a manual page for the utrace() system call.tjr2003-11-012-1/+87
| | | | Obtained from: NetBSD
* Allow mbrtowc() and wcrtomb() to be implemented directly, instead oftjr2003-11-017-50/+204
| | | | | | | | | | | | | | | | | as wrappers around the deprecated 4.4BSD rune functions. This paves the way for state-dependent encodings, which the rune API does not support. - Add __emulated_sgetrune() and __emulated_sputrune(), which are implementations of sgetrune() and sputrune() in terms of mbrtowc() and wcrtomb(). - Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to __emulated_mbrtowc() and __emulated_wcrtomb(). - Add __mbrtowc and __wcrtomb function pointers, which point to the current locale's conversion functions, or the __emulated versions. - Implement mbrtowc() and wcrtomb() as calls to these function pointers. - Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly. All of this emulation mess will be removed, together with rune support, in FreeBSD 6.
* Don't bother passing a freshly-zeroed mbstate to mbsrtowcs() etc.tjr2003-10-314-75/+25
| | | | | | | when the current implementation won't use it, anyway. Just pass NULL. This will need to be changed when state-dependent encodings are supported, but there's no need to take the performance hit in the meantime.
* Implement fgetrune(), fungetrune() and fputrune() as wrappers aroundtjr2003-10-311-36/+8
| | | | fgetwc(), ungetwc() and fputwc().
* add destination address selection described in RFC3484.ume2003-10-301-7/+412
| | | | | | | | | in KAME implementation, even when no policy is installed into kernel, getaddrinfo(3) sorts addresses. Since it causes POLA violation, I modified to don't sort addresses when no policy is installed into kernel, Obtained from: KAME
* Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree.phk2003-10-302-2/+3
|
* Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magicphk2003-10-302-2/+7
| | | | characters '*', '?' and '['.
* Allow to specify a character special device as a core file.simokawa2003-10-291-21/+18
| | | | | | | | | | | | | | This enable us to use /dev/fwmem* as a core file. e.g. ps -M /dev/fwmem0.0 -N kernel.debug dmesg -M /dev/fwmem0.0 -N kernel.debug gdb -k -c /dev/fwmem0.0 kernel.debug You need to set target EUI64 in hw.firewire.fwmem.eui64_hi/lo before opening the device. On the target arch, (PCI) bus address must be equivalent to physical address. (We cannot use this for sparc64 because of IOMMU.) No objection in: -audit
* Remove __NETBSD_SYSCALLS.tjr2003-10-291-6/+0
|
* Remove incomplete support for running FreeBSD userland on old NetBSD kernelstjr2003-10-298-31/+4
| | | | lacking the issetugid() and utrace() syscalls.
* Make this part identical with NetBSD: Use recvlen instead of inlen.mbr2003-10-291-1/+1
| | | | | | No functionality change. Obtained from: NetBSD
* Don't compare NULL against a character.mbr2003-10-291-3/+3
| | | | Obtained from: NetBSD
* Don't use NULL to compare against a char.mbr2003-10-291-2/+2
| | | | Obtained from: NetBSD
* Don't use NULL to compare against a character.mbr2003-10-291-1/+1
| | | | Obtained from: NetBSD
* Don peril sensitive (ie: bikeshed sensitive) sunglasses and quietlypeter2003-10-282-408/+1
| | | | | | | | | | | send strhash(3) off to sleep with the fishes. Nothing in our tree uses it. It has no documentation. It is nonstandard and in spite of the filename strhash.c and strhash.h, it lives in application namespace by providing compulsory global symbols hash_create()/hash_destroy()/hash_search()/ hash_traverse()/hash_purge()/hash_stats() regardless of whether you #include <strhash.h> or not. If it turns out that there is a huge application for this after all, I can repocopy it somewhere safer and we can revive it elsewhere. But please, not in libc!
* Fix a problem where libm compiled under 5.X would depend on featuresdas2003-10-272-2/+8
| | | | | | | | | | | | | | that are only in libc.so.5. This broke some 4.X applications linked to libm and run under 5.X. Background: In C99, isinf() and isnan() cannot be implemented as regular functions. We use macros that call libc functions in 5.X, but for libm-internal use, we need to use the old versions until the next time libm's major version number is bumped. Submitted by: bde Reported by: imp, kris
OpenPOWER on IntegriCloud