search for: _fwrite

Displaying 8 results from an estimated 8 matches for "_fwrite".

Did you mean: fwrite
2014 Apr 15
0
[klibc:master] readlink: Reduce size by calling _fwrite() instead of puts()
...klibc.git;a=commit;h=06e395cd75dc79289ae789c146795189c32babd8 Author: H. Peter Anvin <hpa at linux.intel.com> AuthorDate: Tue, 15 Apr 2014 13:23:49 -0700 Committer: H. Peter Anvin <hpa at linux.intel.com> CommitDate: Tue, 15 Apr 2014 13:23:49 -0700 readlink: Reduce size by calling _fwrite() instead of puts() We know how long the output is, so we might as well call _fwrite() directly, with the explicit termination set to \n instead of \0. Signed-off-by: H. Peter Anvin <hpa at linux.intel.com> --- usr/utils/readlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...fine getc_unlocked(f) fgetc(f) #define getchar() fgetc(stdin) +#define getchar_unlocked() getchar() __extern int ungetc(int, FILE *); __extern int printf(const char *, ...); @@ -86,17 +93,24 @@ __extern int remove(const char *); __extern size_t _fread(void *, size_t, FILE *); __extern size_t _fwrite(const void *, size_t, FILE *); __extern int fflush(FILE *); +__extern int fflush_unlocked(FILE *); __extern size_t fread(void *, size_t, size_t, FILE *); +__extern size_t fread_unlocked(void *, size_t, size_t, FILE *); __extern size_t fwrite(const void *, size_t, size_t, FILE *); +__extern siz...
2014 Apr 09
0
[klibc:master] fwrite: use memrchr() to find the final ' \n' in _IOLBF mode
...nux.intel.com> --- usr/klibc/stdio/fwrite.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/usr/klibc/stdio/fwrite.c b/usr/klibc/stdio/fwrite.c index 5d2c3f0..71ee75c 100644 --- a/usr/klibc/stdio/fwrite.c +++ b/usr/klibc/stdio/fwrite.c @@ -59,6 +59,7 @@ size_t _fwrite(const void *buf, size_t count, FILE *file) size_t bytes = 0; size_t pf_len, pu_len; const char *p = buf; + const char *q; /* We divide the data into two chunks, flushed (pf) and unflushed (pu) depending on buffering mode @@ -67,23 +68,16 @@ size_t _fwrite(const void *buf, size_t coun...
2004 Jan 27
1
printf broken with recent fd and FILE changes
I'm not sure what the root cause is, but printf writes to fd 0: mandarine:/usr/src/packages/BUILD/udev-015/klibc# ./utils/true blah mandarine:/usr/src/packages/BUILD/udev-015/klibc# ./utils/true >/dev/null blah mandarine:/usr/src/packages/BUILD/udev-015/klibc# cat utils/true.c #include <stdio.h> int main(void) { printf("blah\n"); return 0; } -- USB is for mice,
2004 Oct 19
1
[PATCH] fix fwrite declaration
...0 +0200 +++ klibc-0.186.fwrite/include/stdio.h 2004-10-19 20:06:30.000000000 +0200 @@ -90,7 +90,7 @@ fread(void *__p, size_t __s, size_t __n, } extern __inline__ size_t -fwrite(void *__p, size_t __s, size_t __n, FILE *__f) +fwrite(const void *__p, size_t __s, size_t __n, FILE *__f) { return _fwrite(__p, __s*__n, __f)/__s; } -- USB is for mice, FireWire is for men! sUse lINUX ag, n?RNBERG
2004 Jan 27
4
Re: udevinfo output broken
...writes to fd 0, all the output is lost somehow. > > > > > > > > olaf@ibook:~> i="`/sbin/udevinfo -r 2>&1`" > > > > /dev/ > > > > > > Seems like a klibc feature :) > > > libc works as expected. > > > > _fwrite gets 0x1 as f, calls fileno() which decrements it and passes it > > to write(). > > No idea if this is correct: > > --- klibc-0.98/klibc/include/stdio.h 2004-01-22 21:56:49.000000000 +0100 > +++ klibc/klibc/include/stdio.h 2004-01-27 22:50:27.000000000 +0100 > @@ -15,...
2014 May 08
2
compile error about 6.0.2
...ndeclared (first use in this function) /mlsyslinux/com32/include/stdio.h: At top level: /mlsyslinux/com32/include/stdio.h:70: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?_fread? /mlsyslinux/com32/include/stdio.h:71: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?_fwrite? /mlsyslinux/com32/include/stdio.h:73: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?fread? /mlsyslinux/com32/include/stdio.h:74: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?fwrite? /mlsyslinux/com32/include/stdio.h:97: error: expected declaration specifiers or...
2011 Mar 09
14
[PATCH 00/12] elflink shrinkage
From: Matt Fleming <matt.fleming at linux.intel.com> This is a series of patches that, * shrink the core by moving things into an ldlinux ELF module * begin wiring up some of the C versions of various functions The core now only contains essential code and loads the ldlinux module to do everything else, like providing a command line interface and loading kernels. The config file parsing