aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/Makefile.inc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r229848:Ed Schouten2012-11-221-3/+4
| | | | | | | | | | | | | | | | | Add aligned_alloc(3). The C11 folks reinvented the wheel by introducing an aligned version of malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead of returning the allocation by reference, it returns the address, just like malloc(3). I'm MFCing this now, as it seems aligned_alloc(3) is needed to make the new version of libc++ work, which was merged back to FreeBSD 9 in r243376. Requested by: dim Notes: svn path=/stable/9/; revision=243405
* MFC r237573:Isabell Long2012-07-151-0/+1
| | | | | | | | | | | | | | Add more locale-specific functions to the relevant man pages and Makefiles: - libc/stdtime/strftime.3 - libc/stdtime/strptime.3 - libc/stdlib/strfmon.3 Approved by: gabor (mentor) Approved by: re (kib) Notes: svn path=/stable/9/; revision=238482
* Merge quick_exit and changes required for C++11 code to compile against ↵David Chisnall2012-05-221-3/+5
| | | | | | | | | | | FreeBSD headers. Merges changes from: r227472 r227475 r227475 r227476 r227476 r227490 r227490 r228322 r228323 r228329 r228330 r228528 r228529 r228529 r228901 r228918 r228918 r232971 r232971 Also bump __FreeBSD_version for this and the xlocale merge. Notes: svn path=/stable/9/; revision=235786
* Fix building of 32-bit compat libraries on amd64 with clang, and usingDimitry Andric2011-07-181-4/+0
| | | | | | | | | | | | | | | | | -g, by reverting r219139. The LLVM PR referenced in that revision was fixed in the mean time, and we imported a clang snapshot soon afterwards, so the temporary workaround of disabling clang's integrated assembler is no longer needed. In this particular case, using e.g. DEBUG_FLAGS=-g causes clang to output certain directives into assembly that our version of GNU as chokes on. Reported by: dougb Approved by: re (kib) Notes: svn path=/head/; revision=224201
* Don't add sigwait.c to MISRCS here when sigwait.c lives under ../sys andMarcel Moolenaar2011-03-171-1/+1
| | | | | | | it's already added to SRCS there. Notes: svn path=/head/; revision=219709
* Put in a temporary workaround for ctfmerge hanging on processingDimitry Andric2011-03-011-0/+4
| | | | | | | | | | | | | | | | | | | kernel.debug (or possibly other files), when WITH_CTF is active. This is caused by a bug in clang's integrated assembler, causing malloc to sometimes hang during initialization in statically linked executables that use threading, such as the copy of ctfmerge that is built during the bootstrap stage of buildworld. The bug has been submitted upstream: http://llvm.org/bugs/show_bug.cgi?id=9352 Note that you might have to rebuild and install libc first, to get your kernel build to finish, because the ctfmerge binary built during bootstrap is linked with your base system's copy of libc.a, which might already contain a bad copy of malloc.o. Notes: svn path=/head/; revision=219139
* Because POSIX does not allow EINTR to be returned from sigwait(),David Xu2010-09-101-1/+1
| | | | | | | | | | | add a wrapper for it in libc and rework the code in libthr, the system call still can return EINTR, we keep this feature. Discussed on: thread Reviewed by: jilles Notes: svn path=/head/; revision=212405
* Powerpc is special here. powerpc and powerpc64 use different ABIs, soWarner Losh2010-08-241-2/+2
| | | | | | | | | their implementations aren't in the same files. Introduce LIBC_ARCH and use that in preference to MACHINE_CPUARCH. Tested by amd64 and powerpc64 builds (thanks nathanw@) Notes: svn path=/head/; revision=211774
* MFtbemd:Warner Losh2010-08-231-2/+2
| | | | | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform. Notes: svn path=/head/; revision=211725
* Simplify. We can just use .sinclude here.Ed Schouten2009-06-231-3/+1
| | | | | | | Submitted by: Christoph Mallon Notes: svn path=/head/; revision=194703
* MTC r183949:Alexander Leidinger2008-10-171-0/+5
| | | | | | | | | | Allow to define MALLOC_PRODUCTION with a make variable instead of polluting the global CFLAGS. Reviewed by: jasone Notes: svn path=/head/; revision=183969
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.Ed Schouten2008-08-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan Notes: svn path=/head/; revision=181905
* Significantly reduce the memory leak as noted in BUGS section forSean Farley2007-07-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value. Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv(). New regression module for tools/regression/environ to test these functions. It also can be used to test the performance. Bump __FreeBSD_version to 700050 due to API change. PR: kern/99826 Approved by: wes Approved by: re (kensmith) Notes: svn path=/head/; revision=171195
* Add malloc_usable_size(3).Jason Evans2006-03-281-1/+1
| | | | | | | Discussed with: arch@ Notes: svn path=/head/; revision=157236
* Import of OpenBSD's strtonum(3) which is a nicer version of strtoll(3)Andre Oppermann2006-03-141-3/+4
| | | | | | | | | | | providing proper error checking and other improvements. Obtained from: OpenBSD Requested by: flz (to port Open[BGP|OSPF]D) MFC after: 3 days Notes: svn path=/head/; revision=156707
* Add each directory's symbol map file to SYM_MAPS.Daniel Eischen2006-03-131-0/+2
| | | | Notes: svn path=/head/; revision=156613
* In preparation for a new malloc implementation:Jason Evans2006-01-121-2/+3
| | | | | | | | | | | | | | | | * 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
* Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convertTom Rhodes2005-12-241-5/+6
| | | | | | | | | | | 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
* Link radixsort(3) to sradixsort(3), make the latter appear inRuslan Ermilov2004-05-121-0/+1
| | | | | | | the whatis(1) output. Notes: svn path=/head/; revision=129151
* Add getopt_long_only() from OpenBSD and other OpenBSD cleanupsAndrey A. Chernov2004-02-241-0/+1
| | | | | | | | PR: 63173 Submitted by: Marius Strobl <marius@alchemy.franken.de> Notes: svn path=/head/; revision=126189
* Don peril sensitive (ie: bikeshed sensitive) sunglasses and quietlyPeter Wemm2003-10-281-1/+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! Notes: svn path=/head/; revision=121639
* MFp4: Link strtof.3 and strtold.3 to strtod.3.Tim J. Robbins2003-04-051-0/+1
| | | | Notes: svn path=/head/; revision=113105
* Replace our ancient dtoa/strtod implementation with the gdtoaDavid Schultz2003-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | package, a more recent, generalized set of routines. Among the changes: - Declare strtof() and strtold() in stdlib.h. - Add glue to libc to support these routines for all kinds of ``long double''. - Update printf() to reflect the fact that dtoa works slightly differently now. As soon as I see that nothing has blown up, I will kill src/lib/libc/stdlib/strtod.c. Soon printf() will be able to use the new routines to output long doubles without loss of precision, but numerous bugs in the existing code must be addressed first. Reviewed by: bde (briefly), mike (mentor), obrien Notes: svn path=/head/; revision=112163
* Add an MLINK malloc.conf(5) -> malloc(3).Mike Barcroft2003-01-241-1/+2
| | | | Notes: svn path=/head/; revision=109803
* Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akinJuli Mallett2003-01-021-7/+8
| | | | | | | | | | | to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes to the user being granted the pty. Submitted by: Ryan Younce <ryany@pobox.com> Reviewed by: security-officer@, standards@, mike@ Notes: svn path=/head/; revision=108574
* libc_r wasn't so tied to libc for 22 months.Ruslan Ermilov2002-11-181-5/+3
| | | | Notes: svn path=/head/; revision=107052
* - Remove the lsearch() and lfind() functions and their manpage fromRobert Drehmel2002-10-161-2/+3
| | | | | | | | | | | | the compatibility library libcompat. - Add new implementations of lsearch() and lfind() which conform to IEEE Std 1003.1-2001 to libc. Add a new manual page for them and add them to the makefile. - Add function prototypes for lsearch() and lfind() to the search.h header. Notes: svn path=/head/; revision=105250
* - Remove the old insque() and remque() functions and their manualRobert Drehmel2002-10-161-5/+6
| | | | | | | | | | | | page from the compatibility library. - Add new implementations of insque() and remque() which conform to IEEE Std 1003.1-2001 to libc. Add a new manual page for them and connect them to the build. - Add the prototypes of insque() and remque() to the search.h header. Notes: svn path=/head/; revision=105245
* Add getopt_long(3).Eric Melville2002-09-291-2/+2
| | | | | | | | Obtained from: NetBSD Sponsored by: Apple Notes: svn path=/head/; revision=104128
* Implement C99's _Exit() interface.Garrett Wollman2002-09-101-3/+4
| | | | | | | | | Implement a version of qsort that provides a thunk to the comparison function. Update manual pages. Notes: svn path=/head/; revision=103165
* Use the merged strtod.c everywhere. This has been tested on alpha andPeter Wemm2001-12-021-10/+1
| | | | | | | ia64. Notes: svn path=/head/; revision=87225
* Implement strtoimax() and strtoumax()Bill Fenner2001-11-281-8/+8
| | | | Notes: svn path=/head/; revision=87027
* Add atoll(3) to conform POSIX and C99Andrey A. Chernov2001-11-281-1/+3
| | | | Notes: svn path=/head/; revision=87017
* o Implement imaxabs(), imaxdiv(), llabs(), lldiv().Mike Barcroft2001-11-151-4/+6
| | | | | | | | | | o Update abs(3), div(3), labs(3), ldiv(3) to reflect standards conformance and add additional references. Reviewed by: bde, wollman Notes: svn path=/head/; revision=86368
* reconnect strfmon.c to build listAlexey Zelkin2001-09-071-1/+1
| | | | Notes: svn path=/head/; revision=83205
* Add strfmon.3 to the fray.Jeroen Ruigrok van der Werven2001-09-071-1/+1
| | | | | | | | | | | This is a first cut, but enough to help people interested in using it further than before. More text coming to illustrate use and provide more details. Based on standards' text. Notes: svn path=/head/; revision=83194
* strfmon(3) is not ready to go live.David E. O'Brien2001-09-061-1/+1
| | | | Notes: svn path=/head/; revision=83137
* Add strfmon(3) implementation. It still contains few XXX's because I lostAlexey Zelkin2001-09-051-3/+3
| | | | | | | | | | | | my last version of this work due to HDD crash, but this version cleanly passed all POSIX and SuSv2 tests. I am working on testing scripts which should test this implementation against all locales and surely more fixes will come soon. Reviewed by: ache, silence at -audit & -developers Notes: svn path=/head/; revision=83104
* Only pull in the MD files if they exist. This allows for progressiveMark Peek2001-07-311-0/+2
| | | | | | | implementation and compilation when bringing up a new architecture. Notes: svn path=/head/; revision=80743
* Add new, from scratch implementation of hsearch() et al that actually works.Ruslan Ermilov2001-05-151-3/+4
| | | | | | | | Obtained from: NetBSD MFC after: 1 month Notes: svn path=/head/; revision=76613
* Add sranddev.3 to MLINKSAndrey A. Chernov2001-04-231-1/+1
| | | | Notes: svn path=/head/; revision=75864
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+1
| | | | Notes: svn path=/head/; revision=74870
* Make tdelete(3), tfind(3), and twalk(3) links to tsearch(3).Dima Dorfman2001-03-151-0/+1
| | | | | | | Approved by: nik Notes: svn path=/head/; revision=74268
* Impliment the ISO-C99 strto[u]ll()David E. O'Brien2001-02-271-4/+5
| | | | | | | and rewrite strto[u]q() in terms of it. Notes: svn path=/head/; revision=73152
* Back out previous commit (MLINK malloc.conf.5 -> malloc.3).Eivind Eklund2000-10-291-1/+0
| | | | | | | | | This did not work correctly with whatis(1). Issue brought up by: mpp Notes: svn path=/head/; revision=67876
* Add link malloc.conf.5 -> malloc.3Eivind Eklund2000-10-291-0/+1
| | | | Notes: svn path=/head/; revision=67864
* bring in binary search tree code.Alfred Perlstein2000-07-011-2/+2
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=62321
* Fixed missing installation of a link to rand_r.3.Bruce Evans1999-12-231-1/+1
| | | | Notes: svn path=/head/; revision=55032
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Fix style problems noted by Bruce:Warner Losh1998-09-161-3/+3
| | | | | | | | | o No copyright on reallocf. o Order makefile list correctly. o indent reallocf properly. Notes: svn path=/head/; revision=39322