summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
...
* - less verbose make cleanBernhard Reutner-Fischer2008-11-074-16/+16
|
* - fix another fallout from r23660Bernhard Reutner-Fischer2008-10-292-3/+3
|
* Finally fix the MALLOC=y and MALLOC_SIMPLE=y breakage from svn 23660. (I ↵Rob Landley2008-10-288-74/+68
| | | | found it, this is Bernhard's patch to fix it. Tested and it Works For Me (tm)).
* - pull in prototype for memalign()Bernhard Reutner-Fischer2008-10-271-0/+1
|
* - tidy up inline:Bernhard Reutner-Fischer2008-10-241-1/+1
| | | | ldso and syscalls are __always_inline (the latter would need more cleanup)
* This should fix malloc with debug and without threads. (Chase N Douglas)Bernhard Reutner-Fischer2008-10-166-23/+59
| | | | This should have been in r23660. Untested.
* Fix bug 4994 hangs on read(). I have tested the patch extensibly on ARM/LT.old.Khem Raj2008-10-1110-75/+57
| | | | | Thank you Chase Douglas for reporting it and for the patch.
* - Fix strtol*() with xlocale (on e.g. x86_64) (closes #2544)Bernhard Reutner-Fischer2008-10-081-5/+5
|
* - fix compilation of UCLIBC_HAS_PTY && !ASSUME_DEVPTS && !LINUX_SPECIFICBernhard Reutner-Fischer2008-09-301-2/+3
|
* - fix compilation of legacy modeBernhard Reutner-Fischer2008-09-251-2/+7
|
* - remove posix_openpt relocationBernhard Reutner-Fischer2008-09-111-0/+1
|
* Fix some locale multibyte tests failures ad below:Carmelo Amoroso2008-09-092-16/+50
| | | | | | | | | | | libc/stdlib/_strtod.c -> tst_wcstod; libc/stdlib/stdlib.c -> tst_mblen, tst_mbtowc, tst_wctomb; libc/stdio/_scanf.c -> tst_swscanf; libc/string/strncmp.c -> tst_wcsncmp; libc/misc/wchar/wchar.c -> tst_mbrlen, tst_mbrtowc, tst_wcswidth. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* - remove a couple of duplicate includesBernhard Reutner-Fischer2008-08-272-2/+0
|
* - trim any trailing whitespaceBernhard Reutner-Fischer2008-07-2318-19/+19
|
* - fix inline keywordBernhard Reutner-Fischer2008-07-232-13/+13
|
* - revert incorrect parts of r22257 and 22259Bernhard Reutner-Fischer2008-06-073-7/+6
| | | | since posix_openpt lives in getpt.c it has to stay there unconditionally.
* - remove __USE_BSD guard from __bsd_getpt().Bernhard Reutner-Fischer2008-06-071-2/+0
| | | | | Fixes compilation error for defined UCLIBC_HAS_PTY && !defined UNIX98PTY_ONLY which need both __libc_ptyname1 and __libc_ptyname2 for ptsname_r().
* - UCLIBC_HAS_GETPT pulls in getpt.Bernhard Reutner-Fischer2008-06-071-1/+4
| | | | - ptsname_r depends on UCLIBC_HAS_PTY just like ptsname()
* This fixes a problem with the move of libc_hidden_proto to string.h.Bernd Schmidt2008-06-041-1/+0
| | | | | | | | | | | | | The obsolete functions bcopy, index, etc. are not supposed to be used within uClibc itself. Hence, there is no libc_hidden_def for them, but the previous patch did not just move libc_hidden_protos, it also added new ones for the legacy functions. As a result, programs which use these functions can no longer link with uClibc. This fixes it by removing the unnecessary libc_hidden_protos. I've also removed all inclusions of <strings.h> from uClibc source files: since we define _GNU_SOURCE, it is sufficient to include <string.h>. We then do not need to duplicate the libc_hidden_proto block in <strings.h>.
* - adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer2008-06-034-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like o UCLIBC_HAS_GNU_ERROR o UCLIBC_HAS_BSD_ERR o UCLIBC_HAS_PTY o UCLIBC_HAS_GETPT (1) o UCLIBC_SYSCALL_STUBS o UCLIBC_SYSCALL_STUB_WARNING o UCLIBC_LINUX_SPECIFIC (2) o UCLIBC_BSD_SPECIFIC (3) o UCLIBC_NTP_LEGACY (4) o UCLIBC_SV4_DEPRECATED (5) o UCLIBC_HAVE_REALTIME (6) o UCLIBC_HAVE_ADVANCED_REALTIME (7) o UCLIBC_HAVE_EPOLL (8) o UCLIBC_HAVE_XATTR (9) o UCLIBC_HAVE_PROFILING (10) (1) make non-standard getpt optional and implement standard posix_openpt (2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), personality() ppoll(), setresuid() (3) mincore(), getdomainname(), setdomainname() (4) ntp_adjtime(), ntp_gettime() aliases (5) ustat() [use statfs(2) in your code instead] (6) All marked as "(REALTIME)" in SUSv3 (7) All marked as "(ADVANCED REALTIME)" in SUSv3 (8) epoll_create(), epoll_ctl(), epoll_wait() (9) all Extended Attributes (10) helpers for gcc's -finstrument-functions - Fixes _dl_exit() - Implements sleep(3) for !UCLIBC_HAVE_REALTIME - Implements usleep(3) for !UCLIBC_HAVE_REALTIME - adds #warning about incorrect posix_fadvise{,64}() - removes unused and unwanted uselib() Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead of formerly 130k.
* libc/stdlib/stdlib.c: fix whitespace damage. No code changesDenis Vlasenko2008-06-021-92/+86
| | | | | (verified with objdump)
* fix bug 1577: '`' is not an acceptable digit for strto[u]l().Denis Vlasenko2008-06-021-13/+13
| | | | | Code size is not changed on i386.
* add missing includes of unistd.h for smallint usageDenis Vlasenko2008-06-011-1/+0
| | | | | remove a few duplicate includes of unistd.h
* - try to pickup UINTMAX_MAXBernhard Reutner-Fischer2008-05-301-0/+1
|
* - Avoid warning about undefined preprocessor token. No obj-code changes.Bernhard Reutner-Fischer2008-05-302-2/+2
|
* replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.Denis Vlasenko2008-05-201-2/+1
|
* Introduce and use small[u]int type. Changes in size:Denis Vlasenko2008-05-204-5/+5
| | | | | | | | | | | | | | - 79 0 28 107 6b libc/inet/rpc/create_xid.o + 76 0 25 101 65 libc/inet/rpc/create_xid.o - 126 0 4 130 82 libc/misc/assert/__assert.o + 123 0 1 124 7c libc/misc/assert/__assert.o - 648 4 24 676 2a4 libc/misc/internals/__uClibc_main.o + 645 4 21 670 29e libc/misc/internals/__uClibc_main.o - 230 0 4 234 ea libc/stdlib/abort.o + 216 0 1 217 d9 libc/stdlib/abort.o - 129 0 4 133 85 libc/termios/tcgetsid.o + 126 0 1 127 7f libc/termios/tcgetsid.o
* - note that __drand48_iterate should be voidBernhard Reutner-Fischer2008-05-201-0/+3
|
* - remove old-style definitions. No object-code changes.Bernhard Reutner-Fischer2008-05-204-13/+4
|
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-1914-23/+23
| | | | | | | | | in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
* realpath: do not set bogus errno when readlink fails.Denis Vlasenko2008-05-081-22/+26
|
* __uc_malloc: remove stray semicolonsDenis Vlasenko2008-04-281-3/+3
|
* add hidden_proto's for __uc_mallocDenis Vlasenko2008-02-121-0/+1
| | | | | (patch by Bernd Schmidt <bernds_cb1 at t-online.de>)
* - 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
|