summaryrefslogtreecommitdiffstats
path: root/libc/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Removed pointless initialization to 0 of DIR fieldsCarmelo Amoroso2007-12-071-1/+0
| | | | | | | after having added memset. Thanks to Peter Mazinger for pointing this out. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix opendir problem when statically linked due to a missingCarmelo Amoroso2007-12-051-0/+1
| | | | | | | | | initialization of the mutex field within DIR struct. When linked dynamically instead, __pthread_mutex_init will initialize the mutex itself. Without this fix, any call to readdir will stuck forever trying to acquire the mutex. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Add some necessary Makefile bits for UCLIBC_FORMAT_FLAT_SEP_DATA.Bernd Schmidt2007-11-231-0/+3
|
* Some shared flat improvements.Bernd Schmidt2007-11-231-0/+7
| | | | | | | | Fix minor errors: - UCLIBC_SHARED_FLAT_ID instead of SHARED_FLAT_ID - use -Wl,-shared-lib-id properly Use libc_so.a as the source for the shared libc, in order to be able to use -mleaf-id-shared-library on the Blackfin.
* Do not return error when fprintf returns 0 in addmntent().Khem Raj2007-11-101-5/+2
| | | | | fprintf is considered failing if the return is less than 0
* also fix bug 1012 by moschny in 64bit version of readdirMike Frysinger2007-09-151-1/+1
|
* bug 1310: drop hidden aliases to data since some arches crap with this due ↵Mike Frysinger2007-09-151-14/+13
| | | | to copy relocs
* make regex_old.c, ruserpass.c use __uc_malloc,Denis Vlasenko2007-07-303-9/+10
| | | | | | | | | | | | | replace "buf = malloc(BUFSIZ); if (!buf) abort();" by __uc_malloc elsewhere. With last 7 patches together uclibc has 3k of static data total with fairly big .config and with 2k being used for 2 x BUFSIZ stdio buffer: text data bss dec hex filename 114 132 2048 2294 8f6 _stdio.o (ex lib/libc.a) total data 593 total bss 3062
* make utent.c, getpass.c use __uc_mallocDenis Vlasenko2007-07-301-4/+8
|
* change the auxvt code from being dependent on MMU to !LDSO as auxvt things ↵Mike Frysinger2007-06-011-5/+5
| | | | are ELF-specific, not MMU-specific
* Nickolai Zeldovich writes: if the temp name already exists, then the retry ↵Mike Frysinger2007-05-061-10/+9
| | | | code does not create a new temp name as the code to do so is outside of the retry loop
* svn 17941/17943 broke the build. 18032 made the threaded case compile Rob Landley2007-03-081-9/+4
| | | | | | again, this makes the non-threaded case compile again. I have no idea if this is the proper fix, I'm just tired if it not compiling for two weeks.
* Fix a build break due to errno and h_errno being unresolved symbols. Rob Landley2007-03-071-2/+2
| | | | (No idea if this is the right fix but it's something for now.)
* need to double check internal errno handling wrt libpthreadMike Frysinger2007-02-221-0/+2
|
* add missing file for previous commit as pointed out by Peter KjellerstedtMike Frysinger2007-02-211-0/+21
|
* redo errno handling so that it should work both in thread and non-threaded ↵Mike Frysinger2007-02-213-26/+10
| | | | situations
* - should look if LFS is enabled as suggested by pkj in #1131. This generates ↵Bernhard Reutner-Fischer2007-01-301-1/+1
| | | | identical cc1 input for LFS enabled (compared to before r17652) but makes sure that we pickup the non-LFS if LFS is turned off (like r17652 did in this case).
* - fix compilation of GNU glob with !LFSBernhard Reutner-Fischer2007-01-291-1/+1
| | | | Sounds like a typo, really
* Peter Mazinger pointed out that my last commit was faulty.Joakim Tjernlund2007-01-111-1/+1
| | | | This should fix it.
* Fix SEGV for static builds in exit() path.Joakim Tjernlund2007-01-102-1/+26
| | | | Leave the now obsolete libc/misc/pthread dir in for now.
* create new menu so people can select what format they wish to build uClibcMike Frysinger2006-12-112-9/+9
|
* these weaks are also needed in libc.so for the time beingEric Andersen2006-12-091-1/+1
|
* oops, use __pthread_mutex_unlock() not pthread_mutex_unlock()Eric Andersen2006-12-091-1/+2
|
* silence a lot of warnings and fix a few genuine bugs while I'm at it.Eric Andersen2006-12-093-2/+28
|
* Richard Sandiford writes: add support for init/fini arrays in shared flat ↵Mike Frysinger2006-12-085-5/+149
| | | | libraries