summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/bits/uClibc_stdio.h
AgeCommit message (Collapse)Author
2016-11-27remove UCLIBC_HAS_LFSWaldemar Brodkorb
2015-12-17libc/stdio: Rework custom streams interface similar to glibc.Waldemar Brodkorb
Save 20 bytes per FILE structure, avoid indirect call for read/write/seek/close operations for normal streams. Additionally, custom streams has fileno = -2 now, like in glibc. bloat-o-meter report (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y): function old new delta fopencookie 69 131 +62 ftello64 233 260 +27 fseeko64 298 319 +21 fclose 423 442 +19 .rodata 16696 16708 +12 fileno_unlocked 53 45 -8 __ns_name_pack 859 851 -8 vswscanf 184 144 -40 vdprintf 231 187 -44 vsscanf 210 151 -59 vswprintf 269 201 -68 vsnprintf 249 181 -68 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/7 up/down: 141/-295) Total: -154 bytes Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2012-11-18drop support for pre ISO-C compilersMike Frysinger
This drops __signed, __volatile, and __const. Only the latter was used in the code base, and for uClibc, not consistently. Much of the code used plain "const" which meant "__const" was useless. Really, the point of this is to stay in sync with what glibc did. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-15remove uClibc_mutex.h on installPeter S. Mazinger
Add a comment to uClibc_stdio.h to keep macros in sync with uClibc_mutex.h Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15errno and *_init cleanupPeter S. Mazinger
Define a common view of __errno_location, __h_errno_location in common header and use that everywhere, __uClibc_main.c is no special. The rule adopted: for enabled threads we make in libc the __GI_x() variants strong, x() weak and (should) provide another strong x() in libpthread. If threads are disabled, even the __GI_x() variants are weak. _stdio_init,_stdio_term,_locale_init: make all hidden weak in common header Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15uClibc_stdio.h: change the guard used to include stdio-lock.hPeter S. Mazinger
My intention was to get rid of uClibc_mutex.h completely on install, but it introduces other dependencies. It affects anyway only the installed case. Note: since NPTL was added, the FILE structure changes between the build and the installed version. I wanted to fix this by the earlier commit. Reverting the behaviour to IMHO a wrong one. While there, remove libc-lock.h and stdio-lock.h on install (even though glibc has them -wrongly- installed). Reported-by: Tony Wu <tung7970@gmail.com> Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15uClibc_stdio.h: guard internals with _LIBCPeter S. Mazinger
Provide __UCLIBC_IO_MUTEX for the installed version Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15uClibc_stdio.h: remove consistency checkPeter S. Mazinger
Redefining stuff is no good for consistency, anyway, Config.in takes care of this case, it can't happen. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15uClibc_stdio.h: remove parts solved in features.hPeter S. Mazinger
Try to have one and only view of settings, no special handling for stdio code. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15stdio.h: move __STDIO_{GETC,PUTC}_MACRO dependent part to uClibc_stdio.hPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15uClibc_stdio.h: move internal to _stdio.h and make them hiddenPeter S. Mazinger
Move __stdio_mutex_init,_stdio_openlist_{use,del}_count to _stdio.h. Make _stdio_validate_FILE hidden. Make _stdio_openlist_{add,del}_lock hidden for non-NPTL. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-17rework internal uClibc mutexes to support futex locking, and nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2007-01-28- commentary typo fixBernhard Reutner-Fischer
2007-01-09Aurelien Jacobs writes:Joakim Tjernlund
After our last update a new compilation breakage appeared when compiling gcc: /home/aurel/geex/geexbox/build.i386/toolchain/i386-pc-linux-uclibc/sysroot/usr/include/bits/uClibc_stdio.h:346: error: expected initializer before 'attribute_hidden' Some investigations revealed that the following changeset is responsible for this breakage: http://uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_stdio.h?rev=16801&r1=16793&r2=16801&diff_format=h Reverting just one hunk of this changeset fixed the problem us. I'm not sure this is the right fix, but please see attached patch. Look good to me.
2006-12-08Fill in a few more of the missing pieces...Eric Andersen
2006-12-07Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen
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.
2006-12-06stdio update from mjn3Eric Andersen
2006-01-22Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA ↵Peter S. Mazinger
is a useless attempt
2005-12-16Better guards within _LIBC, cleanup, typosPeter S. Mazinger
2005-12-16Disable some unused stuff, better guard for libcPeter S. Mazinger
2005-12-14Do hidden brk, hide _brk as well for some archs, convert users of brkPeter S. Mazinger
2005-12-11Make sure we are really within uClibc only, these bits should move from the ↵Peter S. Mazinger
visible header
2005-11-15Hide more of stdio,getdents, use internal __raisePeter S. Mazinger
2005-11-09booooring license updatesMike Frysinger
2004-05-07Fix a couple of issues in configurations I hadn't tested.Manuel Novoa III
2004-04-14Fix typo.Manuel Novoa III
2004-02-11New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III
Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
2003-12-27Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III
were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
2003-11-06Add a utility macro.Manuel Novoa III
2003-11-05Remove erroneous trailing semicolon.Manuel Novoa III
2003-08-01Add a new *scanf implementation, includeing the *wscanf functions.Manuel Novoa III
Should be standards compliant and with several optional features, including support for hexadecimal float notation, locale awareness, glibc-like locale-specific digit grouping with the `'' flag, and positional arg support. I tested it pretty well (finding several bugs in glibc's scanf in the process), but it is brand new so be aware. The *wprintf functions now support floating point output. Also, a couple of bugs were squashed. Finally, %a/%A conversions are now implemented. Implement the glibc xlocale interface for thread-specific locale support. Also add the various *_l(args, locale_t loc_arg) funcs. NOTE!!! setlocale() is NOT threadsafe! NOTE!!! The strto{floating point} conversion functions are now locale aware. The also now support hexadecimal floating point notation. Add the wcsto{floating point} conversion functions. Fix a bug in mktime() related to dst. Note that unlike glibc's mktime, uClibc's version always normalizes the struct tm before attempting to determine the correct dst setting if tm_isdst == -1 on entry. Add a stub version of the libintl functions. (untested) Fixed a known memory leak in setlocale() related to the collation data. Add lots of new config options (which Erik agreed to sort out :-), including finally exposing some of the stripped down stdio configs. Be careful with those though, as they haven't been tested in a long time. (temporary) GOTCHAs... The ctype functions are currently incorrect for 8-bit locales. They will be fixed shortly. The ctype functions are now table-based, resulting in larger staticly linked binaries. I'll be adding an option to use the old approach in the stub locale configuration.
2002-11-22Ok... here's the summary:Manuel Novoa III
Hopefully locale support will build when cross compiling now. Collation is still not supported, but that's what I'm currently working on. In the next couple of days, I'll probably put up a couple of files for download that will save people the trouble of generating all the glibc locales. Added *wprintf functions, although they currently don't support floating point. That will be fixed when I rewrite _dtostr... or possibly before. Added the wcsto{inttype} functions. Added iconv() and a mini iconv utility. The require locale support and only provide for conversions involving the various unicode encodings { UCS-4*, UCS-2*, UTF-32*, UTF-16*, UTF-8 }, the 8-bit codesets built with the locale data, and the internal WCHAR_T.
2002-11-03Implement locale-specific grouping in printf for base 10 integer conversionsManuel Novoa III
when the grouping flag "'" is specified. Grouping for floating point values may wait until I do a rewrite of the floating pt to string code...
2002-10-31Ok, this commit is _huge_ and its gonna change the world. I'veEric Andersen
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
2002-08-12Revert commit by davidm to printf.c that initialized conv_numManuel Novoa III
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.
2002-07-07Attempt to clean up the strerror_r situation.Manuel Novoa III
2002-07-03Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III
Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.
2002-06-18Fix perror() and printf("%m") to not call strerror(), as required by theManuel Novoa III
standards. Temporarily added a utility function to wrap Erik's strerror_r so that "Unknown error xxx" strings can be generated for errno's which cause strerror_r to fail. That utility function will eventually be merged in with the strerror/strerror_r functions when I change over to optionallly mmap'ing the system error strings to provide for lower mem comsumption on non-MMU platforms, as well as locale-specific system error messages.
2002-03-12Fix another O_LARGEFILE bug. Also, I forget to make floating point optionalManuel Novoa III
in the new printf code.
2002-03-12Oops.. had left thread support forced on.Manuel Novoa III
2002-03-12Fixup redefinition of NL_ARGMAXEric Andersen
2002-03-12Swap in the new stdio code.Manuel Novoa III