summaryrefslogtreecommitdiffstats
path: root/libc/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* - use c89-style commentsBernhard Reutner-Fischer2008-10-031-1/+1
| | | | Closes issue #5194
* - remove some duplicate includesBernhard Reutner-Fischer2008-09-301-4/+2
|
* i18n: Fix mbrtowc function to handle 0xc0 and 0xc1 sequence.Carmelo Amoroso2008-09-291-1/+2
| | | | | | | | | | When the first byte of the multibyte sequence start with 0xc0 or 0xc1, the whole sequence is invalid, so the return value must be -1 (instead of -2). Fix bug #686. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* - cast both times to double for consistencyBernhard Reutner-Fischer2008-09-251-1/+1
|
* - disable gettext support in obstack.Bernhard Reutner-Fischer2008-09-251-3/+3
| | | | | In function `print_and_abort': obstack.c:(.text.print_and_abort+0x1b): undefined reference to `__dcgettext'
* - add missing hidden_defBernhard Reutner-Fischer2008-09-251-0/+2
|
* - Fix arguments to compare function. Closes #1081Bernhard Reutner-Fischer2008-09-241-1/+1
|
* - fix for r23427. Thanks to psm for mentioning this and sorry for the breakageBernhard Reutner-Fischer2008-09-191-7/+7
|
* - remove non stdc path (old style definitions). No obj-code changesBernhard Reutner-Fischer2008-09-182-255/+214
|
* - exec_comm_child can not return everBernhard Reutner-Fischer2008-09-181-1/+1
|
* - fix typoBernhard Reutner-Fischer2008-09-111-1/+1
|
* Fix some locale multibyte tests failures ad below:Carmelo Amoroso2008-09-091-2/+8
| | | | | | | | | | | 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>
* Revert latest changes. Instead of applying this work-aroundCarmelo Amoroso2008-09-091-2/+1
| | | | | | | a proper fix should ensure that statically linked mutli-threaded binaries take always the proper locking implementation. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* - remove a couple of duplicate includesBernhard Reutner-Fischer2008-08-274-6/+0
|
* - trim any trailing whitespaceBernhard Reutner-Fischer2008-07-2320-229/+229
|
* - fix inline keywordBernhard Reutner-Fischer2008-07-239-21/+21
|
* - improve UCLIBC_LINUX_SPECIFICBernhard Reutner-Fischer2008-07-144-5/+52
| | | | | compile-tested only, fixes libc/misc/statfs/fstatfs64.c:29: error: 'fstatfs' undeclared here (not in a function)
* if argv[0] is NULL, dont try to parse it and subsequently crash ... found by ↵Mike Frysinger2008-06-271-6/+8
| | | | running execve05 ltp test on blackfin ([#4194])
* Revert revision 19347, plus libc_hidden_proto for __uc_malloc.Bernd Schmidt2008-06-123-13/+9
| | | | | Some of the code is functionally identical before and after, but for now I'm just mechanically reverting the entire mess.
* Revert revision 19345 plus libc_hidden_proto for __uc_malloc.Bernd Schmidt2008-06-121-9/+4
|
* Fix hard-to-rigger locking bug in vsyslog():Denis Vlasenko2008-06-061-9/+13
| | | | | | | | | | | | | SIGPIPE handler was attempting to re-acquire an already taken lock. While at it, stop checking for sigaction failure which is not possible here. Sizes: text data bss dec hex filename - 1123 13 2 1138 472 libc/misc/syslog/syslog.o + 1112 13 2 1127 467 libc/misc/syslog/syslog.o Run tested.
* Fix typo that prevented "make clean" from removing objects in libc/misc/locale.Bernd Schmidt2008-06-041-1/+1
|
* This fixes a problem with the move of libc_hidden_proto to string.h.Bernd Schmidt2008-06-043-3/+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>.
* syslog.c: fix a buglet in prev-last commit: logic inversion in closelogDenis Vlasenko2008-06-031-3/+3
|
* syslog.c: fix indentation and style. No code changes.Denis Vlasenko2008-06-031-47/+46
|
* Fix bug 575 and other small problems noticed along the way.Denis Vlasenko2008-06-031-42/+46
| | | | | | | | | | | | | | | | | | | | | | The bug: this blocks in syslogd is stopped: #include <syslog.h> int main() { int i; for (i = 0; i < 10000; i++) syslog(LOG_INFO, "Testing, disregard...................."); return 0; } Fix: set O_NONBLOCK on fd to "/dev/log". Other fixes: do not try to write to fd -1, do not spin forever or EAGAIN, use constant sockaddr instead of recreating identical one each time, eliminate one intermediate function (SUGPIPE sig handler), use smallints where appropriate, add a few comments. Size: text data bss dec hex filename - 1140 16 21 1177 499 libc/misc/syslog/syslog.o + 1123 13 2 1138 472 libc/misc/syslog/syslog.o
* - adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer2008-06-038-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix trivial mismatch in return type of build_wcs_upper_buffer()Denis Vlasenko2008-06-031-1/+1
| | | | | (int/enum). clases bug 3234.
* suppress a few "might be used uninitialized" warnings. No code growth.Denis Vlasenko2008-06-011-2/+2
|
* add missing includes of unistd.h for smallint usageDenis Vlasenko2008-06-012-0/+2
| | | | | remove a few duplicate includes of unistd.h
* - Avoid warning about undefined preprocessor token. No obj-code changes.Bernhard Reutner-Fischer2008-05-307-9/+9
|
* - shrink a little bit.Bernhard Reutner-Fischer2008-05-301-14/+10
| | | | | | text data bss dec hex filename 1176 16 24 1216 4c0 libc/misc/syslog/syslog.o.orig 1140 16 21 1177 499 libc/misc/syslog/syslog.o
* __uClibc_main.c: save ~70 bytes by not checking that /dev/nullDenis Vlasenko2008-05-251-9/+7
| | | | | | | | | | | is indeed a char device with correct (maj,min). (If it's not such a char device, the system is screwed anyway, nothing can be done about it...) text data bss dec hex filename - 715 4 21 740 2e4 libc/misc/internals/__uClibc_main.o + 644 4 21 669 29d libc/misc/internals/__uClibc_main.o
* - fix warning about old-style function definitionBernhard Reutner-Fischer2008-05-211-32/+33
| | | | This could need a pull from upstream to do away with these __STDC__ conditionals.
* - fix warning about static not being at the beginning of a declBernhard Reutner-Fischer2008-05-211-1/+1
|
* replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.Denis Vlasenko2008-05-204-31/+18
|
* Introduce and use small[u]int type. Changes in size:Denis Vlasenko2008-05-205-8/+7
| | | | | | | | | | | | | | - 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
* - remove old-style definitions. No object-code changes.Bernhard Reutner-Fischer2008-05-203-27/+7
|
* - silence warningBernhard Reutner-Fischer2008-05-201-1/+1
|
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-1935-119/+119
| | | | | | | | | 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.
* Added a bounch of locale fixes.Carmelo Amoroso2008-05-192-1/+3
| | | | | | | | | | | | | | | | | * extra/locale/gen_wc8bit.c: use strrchr to parse locale name to handle the case in which it contains a '.' character like ANSI_X3.4-1968 * include/locale.h: use __UCLIBC_HAS_XLOCALE__ to control inclusion of xlocale.h only * libc/misc/ctype/ctype.c: add missing weak_alias for __tolower_l and __toupper_l * libc/misc/locale/locale.c: use strcasecmp (case insensitive) for utf-8 locale name. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Experimentally move libc_hidden_proto(time) to time.h.Denis Vlasenko2008-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only code change observed is actually a case where we were not doing that as needed: 00000000 <__GI_tzset>: -53 push %ebx -e8 00 00 00 00 call 6 <__GI_tzset+0x6> -5b pop %ebx -81 c3 03 00 00 00 add $0x3,%ebx - R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 6a 00 push $0x0 -e8 fc ff ff ff call 10 <__GI_tzset+0x10> - R_386_PLT32 time +e8 fc ff ff ff call 3 <__GI_tzset+0x3> + R_386_PC32 __GI_time 3d ff 4e 98 45 cmp $0x45984eff,%eax 0f 9e c0 setle %al 0f b6 c0 movzbl %al,%eax 50 push %eax -e8 fc ff ff ff call 21 <__GI_tzset+0x21> +e8 fc ff ff ff call 14 <__GI_tzset+0x14> R_386_PC32 _time_tzset 58 pop %eax 5a pop %edx -5b pop %ebx c3 ret No mass migration of libc_hidden_proto(foo) planned. Lets wait for potential fallout first.
* Added support for error_print_progname as proposedCarmelo Amoroso2008-04-221-3/+9
| | | | by Will Newton <will.newton@gmail.com>
* Functions should be either exported in public .h filesDenis Vlasenko2008-04-121-2/+1
| | | | | | | | | | | | | and marked with libc_hidden_proto/def(), or not be exported in .h files and be hidden (or even static if possible). We have five functions which violate this. Fixing: netdb.h: export ruserpass() rpc/rpc.h: export xdr_accepted_reply() and xdr_rejected_reply() make inet_ntoa_r static function (it is not exported in any .h file) make _time_tzset hidden function (it is not exported in any .h file)
* add hidden_proto's for __uc_mallocDenis Vlasenko2008-02-124-0/+4
| | | | | (patch by Bernd Schmidt <bernds_cb1 at t-online.de>)
* - Fix compilation: semtimedop has 4 args (and not 6)Bernhard Reutner-Fischer2008-01-091-1/+1
|
* blah, enable the stupid hidden proto for fcntlMike Frysinger2008-01-051-1/+1
|
* krichy writes in 292:Mike Frysinger2008-01-051-1/+1
| | | | | | I noticed, that in libc/misc/syslog/syslog.c when the syslog socket is opened, the close-on-exec flag is not set, as it is in gnu libc. This enables that behavior.
* implement semtimedop for #927Mike Frysinger2008-01-057-15/+56
|
* michael_d writes in #1869: make sure GNU error functions output 'program: ' ↵Mike Frysinger2008-01-051-0/+4
| | | | as documented in the function api