summaryrefslogtreecommitdiffstats
path: root/libc/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* Add printf wchar support for %lc (%C) and %ls (%S).Manuel Novoa III2002-11-041-15/+41
| | | | | | | | | | | | | Require printf format strings to be valid multibyte strings beginning and ending in their initial shift state, as per the stds. Fixed a bug in _wchar_wcsntoutf8s(). Don't store wcs position if dst is NULL. Also, introduce an awful hack into _wchar_wcsntoutf8s() and wcsrtombs() in order to support %ls in printf. See comments below for details. Change behaviour of wc<->mb functions when in the C locale. Now they do a 1-1 map for the range 0x80-UCHAR_MAX. This is for backwards compatibility and consistency with the stds requirements that a printf format string by a valid multibyte string beginning and ending in it's initial shift state.
* Fix a stupid bug.Manuel Novoa III2002-11-011-0/+1
|
* Reworked setlocale() return values and locale arg processing toManuel Novoa III2002-11-011-89/+166
| | | | | | | be more like glibc. Applications expecting to be able to query locale settings should now work... at the cost of almost doubling the size of the setlocale object code. Fixed a bug in the internal fixed-size-string locale specifier code.
* Ok, this commit is _huge_ and its gonna change the world. I'veEric Andersen2002-10-3115-23/+23
| | | | | | | | | | | | | | | been working on a new config system on and off for about 6 months now, but I've never been fully satisfied. Well, I'm finally am happy with the new config system, so here it is. This completely removes the old uClibc configuration system, and replaces it with an entirely new system based on LinuxKernelConf, from http://www.xs4all.nl/~zippel/lc/ As it turns out, Linus has just merged LinuxKernelConf into Linux 2.5.45, so it looks like I made the right choice. I have thus far updated only x86. I'll be updating the other architectures shortly. -Erik
* ANSI/ISO C99 requires assert() to write to stderr. This means thatManuel Novoa III2002-10-281-0/+35
| | | | | | | | writing to STDERR_FILENO is insufficient, as the user could freopen stderr. It is also insufficient to output to fileno(stderr) since this would fail in the custom stream case. I didn't remove the old code though, as it doesn't use stdio stream functionality and is useful in debugging the stdio code.
* Allow timezone info to be specified in a file... /etc/TZ. Turned on byManuel Novoa III2002-10-281-3/+132
| | | | | | | | | | | | | | default for now. From the comments... * Defining __TIME_TZ_FILE causes tzset() to attempt to read the TZ value * from the file /etc/TZ if the TZ env variable isn't set. The file contents * must be the intended value of TZ, followed by a newline. No other chars, * spacing, etc is allowed. As an example, an easy way for me to init * /etc/TZ appropriately would be: echo CST6CDT > /etc/TZ Also optimized timezone setting when the timezone string hasn't changed, as well as fixed a minor buglet wrt SUSv3-allowed chars in TZ std and dst fields.
* Fixup dependsEric Andersen2002-10-251-3/+3
|
* Doh. Add a missing #include to interp.c. I wonder why it used toEric Andersen2002-10-251-0/+1
| | | | | | work? Perhaps the wrapper bug miles fixed? Regardless this is very much needed. -Erik
* This commit contains a patch from Stefan Allius <allius@atecom.com> to changeEric Andersen2002-10-011-56/+111
| | | | | | | how uClibc handles _init and _fini, allowing shared lib constructors and destructors to initialize things in the correct sequence. Stefan ported the SH architecture. I then ported x86, arm, and mips. x86 and arm are working fine, but I don't think I quite got things correct for mips.
* Replace _LIBC_REENTRANT with __UCLIBC_HAS_THREADS__Eric Andersen2002-09-261-2/+4
| | | | -Erik
* Add gnu obstack support. I still need to implement the obstack_printfManuel Novoa III2002-09-193-1/+671
| | | | and obstack_vprintf, but at least now the reiserfsprogs build.
* Hide my personal #warning reminders. Add __wcschrnul, rename strchrnulManuel Novoa III2002-09-193-3/+14
| | | | to __strchrnul, and add weak aliases for them.
* Fix a thinko -- I used the wrong symbol to check for LFS support.Eric Andersen2002-09-141-1/+1
| | | | -Erik
* Patch from Tiago Marques <tmarques@viaconnect.inf.br> -- fall back toEric Andersen2002-09-101-3/+12
| | | | | using SOCK_STREAM if SOCK_DGRAM fails. -Erik
* Fixed compile bugs having to do with 64-bit filesystem operations that"Steven J. Hill"2002-09-091-0/+4
| | | | need to be disabled when 'DOLFS' is disabled.
* Support fstatvfs64 and statvfs64Eric Andersen2002-09-033-1/+120
| | | | -Erik
* Oops. Turns out I broke statvfs() and fstatvfs() back in February,Eric Andersen2002-09-032-26/+0
| | | | | | when I accidentally changed them unconditionally into the 64 bit versions... Oops. -Erik
* Implement missing readdir64_r.cEric Andersen2002-08-262-1/+81
| | | | -Erik
* Make shm stuff work properly.Eric Andersen2002-08-251-11/+8
| | | | -Erik
* Eliminate wrapping of struct stat and use the kernel versionEric Andersen2002-08-191-1/+1
| | | | | | directly. Eliminate all the attendant baggage. Fix internal types to match kernel types more closely. -Erik
* Add a .note section to make gdb happyEric Andersen2002-08-193-1/+83
|
* Call the pthread setup junk early if possible.Eric Andersen2002-08-191-3/+10
|
* Be prepared to call __pthread_initialize_minimalEric Andersen2002-08-191-0/+1
|
* Fix use of __pthread_once, and fix rpc usage of thread localEric Andersen2002-08-121-0/+1
| | | | | storage.... -Erik
* Revert commit by davidm to printf.c that initialized conv_numManuel Novoa III2002-08-122-3/+4
| | | | | | | | | needlessly. To do so increases the generated code size with bcc. Eliminate duplicate define warnings in wstring.c. Fix potentially broken preprocessor comparisons. The preprocessor converts integers to maximal signed type, so inequality comparisons involving UINTMAX_MAX, ULLONG_MAX, and (if no long long) ULONG_MAX were potentially broken.
* Shuffle things around a bit. Looks a little cleaner.Eric Andersen2002-08-081-56/+21
| | | | -Erik
* Cleanup warnings and fix prototypesEric Andersen2002-08-081-16/+11
| | | | -Erik
* Remove some noiseEric Andersen2002-08-071-13/+0
|
* A couple of little cleanups I forgot to check in.Manuel Novoa III2002-08-031-1/+1
|
* When DODEBUG and HAS_WCHAR were enabled and HAS_LOCALE was disabled,Eric Andersen2002-08-031-2/+6
| | | | | | | | wchar.c wouldn't compile: wchar.c: In function `__mbsnrtowcs': wchar.c:631: `__ctype_encoding_7_bit' undeclared (first use in this function) This fixes it by keeping the locale specific asserts hidden when not relevant. -Erik
* Do not assume NULL termination on the ut_id field. ThanksEric Andersen2002-07-161-1/+1
| | | | to mac12@po.cwru.edu for spotting this one.
* Clean up CLK_TCK situation. clock() and sysconf() now use anManuel Novoa III2002-07-151-13/+18
| | | | | | arch-specific constant value defined in bits/uClibc_clk_tck.h. Default is 100 (common/bits) but alpha uses 1024 following glibc. Override per arch as necessary.
* Tobias Anderberg <tobias.anderberg@axis.com> noticed thatEric Andersen2002-07-101-1/+1
| | | | | we were opening the socket() as SOCK_STREAM instead of using SOCK_DGRAM like we should have done.
* Add copyright message and remove dead code.Manuel Novoa III2002-07-051-157/+28
|
* Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III2002-07-037-40/+756
| | | | | | Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.
* Oops. missed a spotEric Andersen2002-07-021-0/+1
| | | | -Erik
* openlog could deadlock when called from vsyslog, soEric Andersen2002-07-021-1/+1
| | | | | allow recursive locking, -Erik
* Cleanup the function pointer comparisionsEric Andersen2002-06-201-7/+7
| | | | -Erik
* Add in thread locking for tzset() and associated data. Also, fix a bug soManuel Novoa III2002-06-181-5/+42
| | | | that localtime_r() calls tzset() to initialize/update timezone data.
* Fix thread locking so it worksEric Andersen2002-06-181-45/+20
| | | | -Erik
* Fix locking. KillEric Andersen2002-06-181-5/+18
|
* Some commentaryEric Andersen2002-06-181-5/+4
| | | | -Erik
* Shuffle the logic around a bitEric Andersen2002-06-171-56/+49
| | | | -Erik
* Some cleanups so utmp/wtmp behaves. Fix potential use ofEric Andersen2002-06-173-90/+210
| | | | | | uninitialized memory. Prepare to reentrantify the utmp stuff. -Erik
* Ah kant spel mi nameEric Andersen2002-06-171-1/+1
|
* Commit the new time stuff, even though I haven't made it threadsafe yet.Manuel Novoa III2002-06-1721-2203/+1879
| | | | At least people can play with it. Also, fix a buglet in setenv.c.
* time() is implemented in syscalls.cEric Andersen2002-06-152-39/+1
| | | | -Erik
* Added a version of nl_langinfo for the stub C/POSIX locale support.Manuel Novoa III2002-06-081-3/+92
|
* Fixup totally broken locking code... No storage for the mutex,Eric Andersen2002-05-308-29/+29
| | | | | wrong ifdef macro.. -Erik
* Cope with systems that don't glob all these together, but useEric Andersen2002-05-303-17/+48
| | | | | separate syscalls. -Erik