search for: clearerr

Displaying 19 results from an estimated 19 matches for "clearerr".

Did you mean: clearer
2020 Jul 25
0
[klibc:master] stdio: Add extern definition of clearerr()
....git;a=commit;h=1aacafeba630135c2d8377887486f5e369b598f9 Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Sat, 25 Jul 2020 18:14:41 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 25 Jul 2020 21:43:01 +0100 [klibc] stdio: Add extern definition of clearerr() We have an inline definition, but need an extern definition too. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/klibc/Kbuild | 2 +- usr/klibc/stdio/clearerr.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/usr/klibc/Kbuild b/usr/kli...
2012 May 22
0
[klibc:master] include: [stdio.h] add clearerr() prototype
...=libs/klibc/klibc.git;a=commit;h=bf526ecf1bb5c36c7f86464ed33dde836c2d8c04 Author: maximilian attems <max at stro.at> AuthorDate: Tue, 22 May 2012 22:04:05 +0200 Committer: maximilian attems <max at stro.at> CommitDate: Tue, 22 May 2012 22:04:05 +0200 [klibc] include: [stdio.h] add clearerr() prototype Seen on kmod compiling: /usr/lib/klibc/include/stdio.h:130:22: warning: no previous prototype for 'clearerr' [-Wmissing-prototypes] Signed-off-by: maximilian attems <max at stro.at> --- usr/include/stdio.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) dif...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...y: Ben Hutchings <ben at decadent.org.uk> --- usr/include/stdio.h | 20 ++++++++++++++++++++ usr/klibc/fgets.c | 1 + usr/klibc/fputc.c | 1 + usr/klibc/fputs.c | 1 + usr/klibc/fread2.c | 1 + usr/klibc/fwrite2.c | 2 ++ usr/klibc/stdio/clearerr.c | 1 + usr/klibc/stdio/feof.c | 1 + usr/klibc/stdio/ferror.c | 1 + usr/klibc/stdio/fflush.c | 2 +- usr/klibc/stdio/fgetc.c | 1 + usr/klibc/stdio/fileno.c | 1 + 12 files changed, 32 insertions(+), 1 deletion(-) diff --git a/usr/include/stdio.h b/usr/include/stdio.h index 1...
2014 Jun 24
2
[syslinux:master] isohybrid: Function to write UTF-16LE strings
...-git a/utils/isohybrid.c b/utils/isohybrid.c > index 0011b78..e308a82 100644 > --- a/utils/isohybrid.c > +++ b/utils/isohybrid.c > @@ -593,7 +593,7 @@ read_mbr_template(char *path, uint8_t *mbr) > err(1, "could not open MBR template file `%s'", path); > clearerr(fp); > ret = fread(mbr, 1, MBRSIZE, fp); > - if (ferror(fp)) > + if (ferror(fp) || ret != MBRSIZE) > err(1, "error while reading MBR template file `%s'", path); > fclose(fp); > } Shouldn't that be in a separate commit? > @@ -786,6...
2020 Aug 22
0
[ANNOUNCE] klibc 2.0.8
...it repository at: https://git.kernel.org/pub/scm/libs/klibc/klibc.git and as a tarball at: https://mirrors.kernel.org/pub/linux/libs/klibc/2.0/ New features: - Support for building with clang and lld, at least on x86 - Defined sysconf(), initially supporting only _SC_PAGE_SIZE - Defined clearerr() as extern - Defined stdio _unlocked functions and macros - Support for building without bash Bug fixes: - Fix build regression with gcc 10 - Executable stacks are disabled on architectures where they are not needed - fstype no longer checks whether an ext4 module is installed, which did not...
2006 Jan 06
2
DO NOT REPLY [Bug 3382] New: hang in read() in exclude.test of testsuite
...c4] 1000 if (ferror(fp) && errno == EINTR) (ladebug) print fp 0x3ffc0080050 (ladebug) print errno 4 (ladebug) print line "- /mid/for/foo/extra" I checked errno.h, and "4" is indeed EINTR. I think that the problem may be that clearerr() should be called before the continue -- otherwise there's nothing that would ever clear out the error condition after it has happened once. I'm attaching a simple patch that fixes the problem. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are rec...
2012 Sep 19
1
[PATCH 1/1] lua: Enabling io.read() in Lua.c32 with some restrictions
...t read_chars (lua_State *L, FILE *f, size_t n) { size_t rlen; /* how much to read */ size_t nr; /* number of chars actually read */ @@ -337,7 +343,9 @@ static int g_read (lua_State *L, FILE *f, int first) { int nargs = lua_gettop(L) - 1; int success; int n; +#ifndef NO_CLEAR_ERR clearerr(f); +#endif if (nargs == 0) { /* no arguments? */ success = read_line(L, f); n = first+1; /* to return 1 result */ @@ -348,14 +356,22 @@ static int g_read (lua_State *L, FILE *f, int first) { for (n = first; nargs-- && success; n++) { if (lua_type(L, n) == LUA_TNU...
2014 Jun 24
0
[syslinux:master] isohybrid: Function to write UTF-16LE strings
...b/utils/isohybrid.c >> index 0011b78..e308a82 100644 >> --- a/utils/isohybrid.c >> +++ b/utils/isohybrid.c >> @@ -593,7 +593,7 @@ read_mbr_template(char *path, uint8_t *mbr) >> err(1, "could not open MBR template file `%s'", path); >> clearerr(fp); >> ret = fread(mbr, 1, MBRSIZE, fp); >> - if (ferror(fp)) >> + if (ferror(fp) || ret != MBRSIZE) >> err(1, "error while reading MBR template file `%s'", path); >> fclose(fp); >> } > > Shouldn't that be in a...
2012 May 02
0
[PATCH] fish: Add --pipe-error flag to allow detection of errors in pipe commands (RHBZ#803533).
...turn -1; } + if (ferror (stdout)) { + if (!pipecmd || pipe_error) { + fprintf (stderr, "%s: write error%s\n", program_name, + pipecmd ? " on pipe" : ""); + r = -1; + } + /* We've dealt with this error, so clear the flag. */ + clearerr (stdout); + } if (pipecmd) { close (1); diff --git a/fish/guestfish.pod b/fish/guestfish.pod index a45af00..29aa2d6 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -350,6 +350,18 @@ alternative to the I<-a> option: whereas I<-a> adds an existing disk, I<-N>...
2008 Sep 10
1
Xen-3.3 Etch amd64 compil error
...undeclared (first use in this function) ../../../../../newlib-1.16.0/newlib/libc/search/bsearch.c:85: erreur: ''index'' undeclared (first use in this function) make[8]: *** [lib_a-bsearch.o] Erreur 1 Dans le fichier inclus à partir de ../../../../../newlib-1.16.0/newlib/libc/stdio/clearerr.c:56: /usr/src/xen-3.3.0/stubdom/newlib-1.16.0/newlib/libc/include/stdio.h:34:20: erreur: stddef.h : Aucun fichier ou répertoire de ce type /usr/src/xen-3.3.0/stubdom/newlib-1.16.0/newlib/libc/include/stdio.h:37:20: erreur: stdarg.h : Aucun fichier ou répertoire de ce type In file included from...
2010 Mar 06
1
ssh-keyscan bug (not really exploitable)
...ailed\n", lb->filename); - xfree(lb); - return (NULL); - } - lb->errfun = errfun; - lb->lineno = 0; - return (lb); -} - -static void -Linebuf_free(Linebuf * lb) -{ - fclose(lb->stream); - xfree(lb->buf); - xfree(lb); -} - -#if 0 -static void -Linebuf_restart(Linebuf * lb) -{ - clearerr(lb->stream); - rewind(lb->stream); - lb->lineno = 0; -} - -static int -Linebuf_lineno(Linebuf * lb) -{ - return (lb->lineno); -} -#endif - -static char * -Linebuf_getline(Linebuf * lb) -{ - size_t n = 0; - void *p; - - lb->lineno++; - for (;;) { - /* Read a line */ - if (!fgets(&am...
2012 May 31
1
klibc 2.0 release
...-v [klibc] tests: Add simple sscanf check [klibc] ipconfig: Use /run/ directory for script file [klibc] include: [sys/socket.h] define SOMAXCONN [klibc] include: [sys/elfcommon.h] define STN_UNDEF [klibc] klcc.1: document -nostdinc [klibc] include: [stdio.h] add clearerr() prototype [klibc] include: [limits.h] define SSIZE_MAX [klibc] Add faccessat() system call [klibc] README update arch status [klibc] kinit: Fix capabilities alternate read/write io without flush [klibc] capabilities: Use fflush() instead of fseek() [klibc] incl...
2014 Jun 22
16
Announcing a patch series for isohybrid.c
Hi, following will be 6 patch proposals for isohybrid.c 1: Encode GPT partition names as UTF-16LE 2: Correct blocking factor in APM partition block counts 3: Correct end block address of first GPT partition 4: Write GPT backup to the very end of the image 5: Change all fseek(3) to fseeko(3) 6: Introduce option --mbr and make isohybrid.c compilable standalone If the form needs adjustments,
2013 Oct 15
23
[PATCH 00/21] Upgrade to Lua 5.2.2, add filesystem module and get_key binding
Hi, This series targets automatic boot menu generation, but most of it is the Lua upgrade, because I got tired reading deprecated API docs. It's mostly a straightforward forward port of the earlier Syslinux specific changes to Lua 5.1, except that: * I chose the add a stub getenv() implementation to the COM32 API instead of #ifdefing out all the references in Lua, and * I kept oslib
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message ----- > From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org> > To: "Vaivaswatha Nagaraj" <vn at compilertree.com> > Cc: "LLVM Dev" <llvm-dev at lists.llvm.org> > Sent: Thursday, December 3, 2015 4:41:46 AM > Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA > >
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not allocating RBP to any virtual register, the instances of RBP in function foo are in the machine code when my register allocator starts.) Function foo calls function bar. Register RBP is not saved across the call, though it is live after the call. Function bar includes a virtual register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...eam) ; extern void rewind (FILE *__stream); extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof_unlocked (FILE *__stream...
2011 Jun 02
48
[PATCH 0/9] libxl: disk configuration handling
This is v3 of my disk series. What were previously patches 01-06 have been applied. These are the tested and updated remainder, addressing the previous comments. 1 Preparatory work. 2-4 The new parser and its documentation. 5-6 Replace old parsers with calls to the new one. 7-8 Two features, one of them essential. 9 Basic test suite for disk string parsing, as adhoc script.
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...- - errstr = gzerror (gzfp, &errnum); - error (EXIT_FAILURE, 0, "gzread: %s: %s (%d)", input_file, errstr, errnum); - } - if (r == 0) - return 0; - if ((size_t) r < size) - error (EXIT_FAILURE, 0, "gzread: %s: unexpected end of file", input_file); -#else - clearerr (fp); - if (fread (buffer, size, 1, fp) != 1) { - if (feof (fp)) - return 0; - error (EXIT_FAILURE, errno, "fread: %s: read failure", input_file); - } -#endif - return 1; -} - -static int -parse_next_entry (void) -{ - char header[110]; - - /* Skip padding and synchronize w...