summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bitwise logic error in posix_memalign().Jason Evans2006-01-121-2/+2
| | | | | | | Reported by: glebius Notes: svn path=/head/; revision=154263
* Use posix_memalign() in valloc() rather than making assumptions aboutJason Evans2006-01-122-20/+20
| | | | | | | | | the alignment of malloc()ed memory. Approved by: markm (mentor) Notes: svn path=/head/; revision=154252
* In preparation for a new malloc implementation:Jason Evans2006-01-125-66/+160
| | | | | | | | | | | | | | | | * Add posix_memalign(). * Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in rtld-elf in order to make the loader happy (even though calloc() isn't used in rtld-elf). * Add _malloc_prefork() and _malloc_postfork(), and use them instead of directly manipulating __malloc_lock. Approved by: phk, markm (mentor) Notes: svn path=/head/; revision=154248
* I wrote getnetconfig where I meant getnetpath in the previous revision.Ceri Davies2006-01-111-2/+2
| | | | Notes: svn path=/head/; revision=154224
* Add references to fhopen, fhstat, getfh, lgetfh and fhstatfs.Greg Lehey2006-01-103-0/+6
| | | | | | | Pointed out by: Antony Curtis <antony@mysql.com> Notes: svn path=/head/; revision=154202
* o Document the possibility of putting 'b' in the flag field.Ceri Davies2006-01-061-5/+11
| | | | | | | | | | While we don't use the NC_BROADCAST value of nc_flag anywhere in the RPC code, it is parseable by getnetconfigent(3) from /etc/netconfig. o Clean up some "see below"'s that were cut and pasted from netconfig.h. Notes: svn path=/head/; revision=154080
* Document the recently-added EINVAL behavior.Diomidis Spinellis2006-01-051-1/+7
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=154050
* gmon now supported on powerpcPeter Grehan2005-12-291-2/+0
| | | | Notes: svn path=/head/; revision=153815
* The minbrk symbol is hidden the same on powerpc as other FreeBSD platforms.Peter Grehan2005-12-291-1/+1
| | | | Notes: svn path=/head/; revision=153814
* Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convertTom Rhodes2005-12-244-5/+290
| | | | | | | | | | | between a 32-bit integer and a radix-64 ASCII string. The l64a_r() function is a NetBSD addition. PR: 51209 (based on submission, but very different) Reviewed by: bde, ru Notes: svn path=/head/; revision=153707
* Add abort2 manual page.Poul-Henning Kamp2005-12-232-1/+100
| | | | | | | | Submitted by: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl> Edited by: phk Notes: svn path=/head/; revision=153683
* Explicitely use a "signed char" instead of a "char", for those archs whereOlivier Houchard2005-12-221-2/+2
| | | | | | | char defaults to unsigned. Notes: svn path=/head/; revision=153641
* Implement ELF symbol versioning using GNU semantics. This code aimsAlexander Kabaev2005-12-181-0/+9
| | | | | | | | | | | | to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Implement dlvsym() function to allow lookups for a specific version of a given symbol. Notes: svn path=/head/; revision=153515
* Make our ELF64 type definitions match standards. In particular thisMarcel Moolenaar2005-12-181-3/+3
| | | | | | | | | | | | | | | | means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks Notes: svn path=/head/; revision=153504
* Add an extensible version of our *printf(3) implementation to libcPoul-Henning Kamp2005-12-169-0/+2054
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on probationary terms: it may go away again if it transpires it is a bad idea. This extensible printf version will only be used if either environment variable USE_XPRINTF is defined or one of the extension functions are called. or the global variable __use_xprintf is set greater than zero. In all other cases our traditional printf implementation will be used. The extensible version is slower than the default printf, mostly because less opportunity for combining I/O operation exists when faced with extensions. The default printf on the other hand is a bad case of spaghetti code. The extension API has a GLIBC compatible part and a FreeBSD version of same. The FreeBSD version exists because the GLIBC version may run afoul of our FILE * locking in multithreaded programs and it even further eliminate the opportunities for combining I/O operations. Include three demo extensions which can be enabled if desired: time (%T), hexdump (%H) and strvis (%V). %T can format time_t (%T), struct timeval (%lT) and struct timespec (%llT) in one of two human readable duration formats: "%.3llT" -> "20349.245" "%#.3llT" -> "5h39m9.245" %H will hexdump a sequence of bytes and takes a pointer and a length argument. The width specifies number of bytes per line. "%4H" -> "65 72 20 65" "%+4H" -> "0000 65 72 20 65" "%#4H" -> "65 72 20 65 |er e|" "%+#4H" -> "0000 65 72 20 65 |er e|" %V will dump a string in strvis format. "%V" -> "Hello\tWor\377ld" (C-style) "%0V" -> "Hello\011Wor\377ld" (octal) "%+V" -> "Hello%09Wor%FFld" (http-style) Tests, comments, bugreports etc are most welcome. Notes: svn path=/head/; revision=153486
* With current pthread implementations, a mutex initialization willDavid Xu2005-12-163-9/+19
| | | | | | | | | | | | | | | allocate a memory block. sscanf calls __svfscanf which in turn calls fread, fread triggers mutex initialization but the mutex is not destroyed in sscanf, this leads to memory leak. To avoid the memory leak and performance issue, we create a none MT-safe version of fread: __fread, and instead let __svfscanf call __fread. PR: threads/90392 Patch submitted by: dhartmei MFC after: 7 days Notes: svn path=/head/; revision=153467
* Sort .Xr by section number.David Xu2005-12-138-14/+14
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=153376
* /* You're not supposed to hit this problem */Poul-Henning Kamp2005-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some denormalized long double values, a bug in __hldtoa() (called from *printf()'s %A format) results in a base 16 digit being rounded up from 0xf to 0x10. When this digit is subsequently converted to string format, an index of 10 reaches past the end of the uppper-case hex/char array, picking up whatever the code segment happen to contain at that address. This mostly seem to be some character from the upper half of the byte range. When using the %a format instead of %A, the first character past the end of the lowercase hex/char table happens to be index 0 in the uppercase hex/char table hextable and therefore the string representation features a '0', which is supposedly correct. This leads me to belive that the proper fix _may_ be as simple as masking all but the lower four bits off after incrementing a hex-digit in libc/gdtoa/_hdtoa.c:roundup(). I worry however that the upper bit in 0x10 indicates a carry not carried. Until das@ or bde@ finds time to visit this issue, extend the hexdigit arrays with a 17th index containing '?' so that we get a invalid but consistent and printable output in both %a and %A formats whenever this bug strikes. This unmasks the bug in the %a format therefore solving the real issue may both become easier and more urgent. Possibly related to: PR 85080 With help by: bde@ Notes: svn path=/head/; revision=153375
* Add cross references to siginfo.3.David Xu2005-12-1310-3/+13
| | | | Notes: svn path=/head/; revision=153370
* Fix markeup.David Xu2005-12-061-1/+2
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=153161
* Fix markup.David Xu2005-12-051-5/+13
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=153109
* Document SIGEV_NONE and SIGEV_SIGNAL.David Xu2005-12-051-0/+15
| | | | Notes: svn path=/head/; revision=153101
* Fix prototype.Ruslan Ermilov2005-12-031-1/+1
| | | | Notes: svn path=/head/; revision=153048
* Fix type of argument.Ruslan Ermilov2005-12-031-1/+1
| | | | Notes: svn path=/head/; revision=153047
* Break hard sentence break.Ruslan Ermilov2005-12-031-1/+2
| | | | Notes: svn path=/head/; revision=153045
* Switch BUILD_ARCH in Makefile to use uname -p suggested by ru.Doug Ambrisko2005-12-033-6/+42
| | | | | | | | | | | | | | | | | Switch strncpy to strlcpy suggested by gad and issue found by pjd. Add to uname(3) man page describing: UNAME_s UNAME_r UNAME_v UNAME_m Add to getosreldate(3) man page describing: OSVERSION Submitted by: ru, pjd/gad Reviewed by: ru (man pages) Notes: svn path=/head/; revision=153041
* Remove implementation-defined, it has already been described in NOTESDavid Xu2005-12-031-5/+0
| | | | | | | section. Notes: svn path=/head/; revision=153040
* Remove implementation-defined sentences.David Xu2005-12-033-22/+5
| | | | Notes: svn path=/head/; revision=153039
* Fix lots of markup and content bug.David Xu2005-12-037-139/+201
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=153036
* syscall -> system call.David Xu2005-12-027-25/+25
| | | | Notes: svn path=/head/; revision=153018
* Fix markup.David Xu2005-12-021-1/+4
| | | | Notes: svn path=/head/; revision=153014
* Unbreak build when I fluff the clean-up of __FBSDID diff reductionDoug Ambrisko2005-12-021-0/+2
| | | | | | | | | before commit. pointyhat++ Notes: svn path=/head/; revision=153009
* Add support to easily build FreeBSD unpacked in a chroot of anotherDoug Ambrisko2005-12-022-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD machine. To do this add the man 1 uname changes to __xuname.c so we can override the settings it reports. Add OSVERSION override to getosreldate. Finally which Makefile.inc1 to use uname -m instead of sysctl -n hw.machine_arch to get the arch. type. With these change you can put a complete FreeBSD OS image into a chroot set: UNAME_s=FreeBSD UNAME_r=4.7-RELEASE UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE" UNAME_m=i386 UNAME_p=i386 OSVERSION=470000 on an amd64 or i386 and it just work including building ports and using pkg_add -r etc. The caveat for this example is that these patches have to be applied to FreeBSD 4.7 and the uname(1) changes need to be merged. This also addresses issue with libtool. This is usefull for when a build machine has been trashed for an old release and we want to do a build on a new machine that FreeBSD 4.7 won't run on ... Notes: svn path=/head/; revision=153002
* Tweak markup for POSIX standards. Minor wordsmithing.Warner Losh2005-12-011-3/+7
| | | | | | | Submitted by: ru@ Notes: svn path=/head/; revision=152990
* Document O_NOCTTY and O_SYNC. O_NOCTTY is a nop on freebsd, while onWarner Losh2005-12-011-0/+17
| | | | | | | | | | other systems it prevents a tty from becoming a controlling tty on the open. O_SYNC is the POSIX name for O_FSYNC. The Markup Police may need to tweak my references to standards. Notes: svn path=/head/; revision=152989
* Add MLINK for execvP(3).John Baldwin2005-12-011-1/+1
| | | | | | | | | PR: docs/89783 Submitted by: Andreas Kohn andreas at syndrom23 dot de MFC after: 3 days Notes: svn path=/head/; revision=152985
* Update conformance and history sections.David Xu2005-11-304-4/+16
| | | | Notes: svn path=/head/; revision=152944
* Symlink mq_send to mq_timedsend.David Xu2005-11-301-0/+2
| | | | | | | Symlink mq_receive to mq_timedreceive. Notes: svn path=/head/; revision=152943
* Add manuals for POSIX message queue.David Xu2005-11-308-2/+1077
| | | | Notes: svn path=/head/; revision=152942
* Implement following POSIX message queue interfaces:David Xu2005-11-262-1/+74
| | | | | | | mq_close, mq_getattr, mq_receive, mq_send. Notes: svn path=/head/; revision=152831
* Make SYNOPSIS compile.Ruslan Ermilov2005-11-241-1/+1
| | | | | | | Attn peter@: this manpage wasn't synced with your code changes. Notes: svn path=/head/; revision=152752
* Fix prototypes.Ruslan Ermilov2005-11-241-3/+3
| | | | | | | | Attn davidxu@: most likely, the description should also be tweaked after your undocumented changes that changed these prototypes. Notes: svn path=/head/; revision=152751
* Fix prototypes.Ruslan Ermilov2005-11-241-2/+2
| | | | Notes: svn path=/head/; revision=152749
* Keep up with const poisoning in uuid.h,v 1.3.Ruslan Ermilov2005-11-241-6/+6
| | | | Notes: svn path=/head/; revision=152748
* Fix prototype.Ruslan Ermilov2005-11-241-2/+2
| | | | Notes: svn path=/head/; revision=152746
* Fix prototype.Ruslan Ermilov2005-11-231-1/+3
| | | | Notes: svn path=/head/; revision=152734
* Fix prototype.Ruslan Ermilov2005-11-232-2/+2
| | | | Notes: svn path=/head/; revision=152733
* Fix prototypes.Ruslan Ermilov2005-11-233-4/+4
| | | | Notes: svn path=/head/; revision=152720
* There's no longer^Wyet <sys/capability.h>.Ruslan Ermilov2005-11-231-1/+1
| | | | Notes: svn path=/head/; revision=152718
* Fix inet6_opt_get_val() prototype.Ruslan Ermilov2005-11-231-1/+1
| | | | Notes: svn path=/head/; revision=152717