summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
...
* - fix compilation:Bernhard Reutner-Fischer2008-01-171-0/+3
| | | | | In file included from toolchain_build_i386/gcc-3.4.6/libiberty/hashtab.c:49: build_i386/staging_dir/i386-linux-uclibc/sys-include/malloc.h:193: error: ISO C forbids data definition with no type or storage class
* michael_d writes in 1879:Mike Frysinger2008-01-051-1/+1
| | | | | | When no TIOCGPTN definition is present in the kernel headers, the library's ptsname() function will not work. The libc/stdlib/ptsname_r.c file is the problem. This file includes a complicated nest of #if directives. One of these #if's has the opposite sense from what is required.
* realpath: reduce stack usage from 3*PATH_MAX (12k) to 1*PATH_MAX (4k).Denis Vlasenko2007-12-031-34/+36
| | | | | | | | | reduction is achieved by direct use of user-supplied PATH_MAX sized buffer for result (without intermediate copy) and changes in copy_buf[] usage - now it is used for both "source" pathname and link name (it works because they have to be less than PATH_MAX combined, otherwise we return NULL).
* Fix author name and copyright notice in __uc_malloc.cDenis Vlasenko2007-09-191-6/+4
|
* fix assembler error. libc_hidden_data_def cannot work on COMMONs,Denis Vlasenko2007-09-191-3/+6
| | | | | | | thus need to initialize stuff with 0 to force it into bss. All hell can again break loose if future gcc will be smart enough to ignore it.
* add libc_hidden_xxxx for __uc_mallocDenis Vlasenko2007-09-151-0/+2
|
* introduce __uc_malloc, so that users can intercept libc internal OOM.Denis Vlasenko2007-07-302-1/+42
|
* - commentary typo fixBernhard Reutner-Fischer2007-05-041-1/+1
|
* fix from Bernd Schmidt for realloc shrinkage bugMike Frysinger2007-04-241-0/+5
|
* fix up malloc debug buildingMike Frysinger2007-04-1310-13/+14
|
* POSIX says you can use realloc() to shrink buffers ... make sure we dont ↵Mike Frysinger2007-04-111-1/+2
| | | | trigger a buffer overflow in that case
* POSIX requires that errno be set whenever 0 is returned by malloc()Mike Frysinger2007-04-023-3/+7
|
* revert 17821, wait for better test casesEric Andersen2007-02-081-1/+1
|
* Miguel Angel Alvarez writes:Eric Andersen2007-02-081-1/+1
| | | | | | | | | Hi. I have found a bug in realpath that did not allow me to use it with symlinks. Although I am using 0.9.28.1, the bug is present in 0.9.28 and also in the trunk. I attach a suggested patch. Please let me know if the solution is correct.
* handle file_name==NULL and file_name=="" as required by POSIXMike Frysinger2007-02-081-0/+8
|
* Richard Sandiford writes:Mike Frysinger2007-01-292-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | However, retesting on m68k showed up a problem that had appeared in uClibc since the last time I tried. Specifically, revision 15785 did: -#define HEAP_GRANULARITY (sizeof (HEAP_GRANULARITY_TYPE)) +#define HEAP_GRANULARITY (__alignof__ (HEAP_GRANULARITY_TYPE)) -#define MALLOC_ALIGNMENT (sizeof (double)) +#define MALLOC_ALIGNMENT (__alignof__ (double)) The problem is that (a) MALLOC_HEADER_SIZE == MALLOC_ALIGNMENT (b) the header contains a size value of type size_t (c) sizeof (size_t) is 4 on m68k, but... (d) __alignof__ (double) is only 2 (the largest alignment used on m68k) So we only allocate 2 bytes for the 4-byte header, and the least significant 2 bytes of the size are in the user's area rather than the header. The patch below fixes that problem by redefining MALLOC_HEADER_SIZE to: MAX (MALLOC_ALIGNMENT, sizeof (size_t)) (but without the help of the MAX macro ;)). However, we really would like to have word alignment on Coldfire. It makes a big performance difference, and because we have to allocate a 4-byte header anyway, what wastage there is will be confined to the end of the allocated block. Any wastage will also be limited to 2 bytes per allocation compared to the current alignment. I've therefore used the __aligned__ type attribute to create a double type that has at least sizeof (size_t) bytes of alignment. I've introduced a new __attribute_aligned__ macro for this. It might seem silly protecting against old or non-GNU compilers here, but the extra alignment is only an optimisation, and having the macro is more in the spirit of the other attribute code.
* fix from Bryan Wu: return NULL upon error, not the NULL stringMike Frysinger2007-01-241-4/+3
|
* rename local "brk" var so it doesnt namespace collide with the brk() functionMike Frysinger2006-12-171-18/+18
|
* mostly revert the locking changes for 'malloc', as the implementationEric Andersen2006-12-112-8/+10
| | | | | | | | does not easily lend itself to becoming complete pthread cancelation safe without first investing in some deep and serious thought... The other malloc implementations are pthread cancelation safe, and this one is mostly used for uClinux, where the lack is at least less likely to be a common problem.
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-072-8/+8
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-0713-229/+237
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* - Cleanout the only occurance of the SUSv3 LEGACY function getwd() that wasBernhard Reutner-Fischer2006-11-291-6/+1
| | | | furthermore ifdef'ed out anyway.
* - gcvt() is marked LEGACY in XSI and mandatory in BSD.Bernhard Reutner-Fischer2006-11-291-1/+4
| | | | Also make compilation conditional on float support.
* fix from psm: makes use of the malloc debug option in malloc-standard as wellMike Frysinger2006-08-253-12/+7
|
* merge fix from blackfin cvs:Mike Frysinger2006-08-052-2/+2
| | | | bernds writes: Use __alignof__ instead of sizeof to get alignments. Eliminates some warnings about misalignments when malloc debugging is enabled.
* fixup my copyright notice, trim stale remnants of older notices whichEric Andersen2006-07-052-2/+0
| | | | I had clearly run search/replace on that were cluttering things up.
* fixup my copyright notice, trim stale remnants of older notices whichEric Andersen2006-07-052-40/+12
| | | | I had clearly run search/replace on that were cluttering things up.
* Mark some functions as BSD onlyPeter S. Mazinger2006-03-231-0/+2
|
* Correct build if UCLIBC_HAS_CTYPE_TABLES is not definedPeter S. Mazinger2006-03-222-3/+3
|
* Mark some functions as GNU, provide missing hidden memmem, remove ↵Peter S. Mazinger2006-03-221-1/+0
| | | | _ISOC99/XOPEN_SOURCE
* Fix 'realloc' and revert previous changes to tests. malloc tests all pass ↵"Steven J. Hill"2006-03-171-1/+1
| | | | regardless of the setting of MALLOC_GLIBC_COMPAT.
* Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, ↵Peter S. Mazinger2006-03-109-14/+0
| | | | most of global data relocations are back
* Do not use __XL_NPP macroPeter S. Mazinger2006-02-241-4/+20
|
* guard __ignore_x correctly, move undefs to their proper place, add ↵Peter S. Mazinger2006-02-241-27/+52
| | | | prototypes. Should I do all the other *max aliases as well
* exclude 2 files from multi if XLOCALE enabledPeter S. Mazinger2006-02-221-0/+1
|
* check for a 0 size first, then check for a NULL pointerMike Frysinger2006-02-221-2/+2
|
* sync minor touchups with glibcMike Frysinger2006-02-203-11/+13
|
* tweak the idea between having a MMU and actually using itMike Frysinger2006-02-184-4/+4
|
* DOMULTI may be used for libc, the excluded files need work, ↵Peter S. Mazinger2006-02-151-1/+3
| | | | linuxthreads[_db] as well, don't try on slow box
* Reorganize a bit for IMAPeter S. Mazinger2006-02-151-12/+8
|
* after much deliberation, may i present Joseph S. Myers patch to add support ↵Mike Frysinger2006-02-141-11/+3
| | | | | | | | for .init and .fini array processing for the gory details, see the mailing list: http://www.uclibc.org/lists/uclibc/2006-January/014079.html http://www.uclibc.org/lists/uclibc/2006-February/014285.html
* libc-{a,so,multi}-y replaced by libc-y covering common objects both in ↵Peter S. Mazinger2006-02-134-156/+79
| | | | libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore
* Update some copyrightsPeter S. Mazinger2006-02-131-2/+4
|
* Add files for IMA. Yes, I know it's a hack and no, I won't split the ↵Peter S. Mazinger2006-02-1368-0/+525
| | | | affected files
* Remove unused filesPeter S. Mazinger2006-02-132-68/+0
|
* More renames for IMAPeter S. Mazinger2006-02-133-2/+2
|
* Don't compile arc4random if option not setPeter S. Mazinger2006-02-132-5/+4
|
* just drop all of the debug codeMike Frysinger2006-02-091-2/+1
|
* Bernhard Fischer says: get rid of local ret variableMike Frysinger2006-02-081-3/+1
|
* janlana writes in Bug 700: use standard uint* types rather than u_intMike Frysinger2006-02-081-15/+15
|