Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-03-16 23:05:10 +0300
committerJeff Johnston <jjohnstn@redhat.com>2007-03-16 23:05:10 +0300
commita167bcd8e59baf24d5a200d0c3e31817433974c6 (patch)
tree3390f1e4032614b611a661dfcd50d8de273299bd /newlib/libc/stdio64
parent826b5591dd604ef68abadff7c8cb7c19e221b9af (diff)
2007-03-16 Eric Blake <ebb9@byu.net>
* libc/stdio64/fseek064.c (_fseeko64_r): Fix reentrancy. * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
Diffstat (limited to 'newlib/libc/stdio64')
-rw-r--r--newlib/libc/stdio64/freopen64.c4
-rw-r--r--newlib/libc/stdio64/fseeko64.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c
index c795cba44..4cc717261 100644
--- a/newlib/libc/stdio64/freopen64.c
+++ b/newlib/libc/stdio64/freopen64.c
@@ -196,10 +196,10 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
fp->_bf._size = 0;
fp->_lbfsize = 0;
if (HASUB (fp))
- FREEUB (fp);
+ FREEUB (ptr, fp);
fp->_ub._size = 0;
if (HASLB (fp))
- FREELB (fp);
+ FREELB (ptr, fp);
fp->_lb._size = 0;
if (f < 0)
diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c
index fe7e9be06..15f285f40 100644
--- a/newlib/libc/stdio64/fseeko64.c
+++ b/newlib/libc/stdio64/fseeko64.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1990 The Regents of the University of California.
+ * Copyright (c) 1990, 2007 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -197,7 +197,7 @@ _DEFUN (_fseeko64_r, (ptr, fp, offset, whence),
*/
if (fp->_bf._base == NULL)
- __smakebuf (fp);
+ __smakebuf_r (ptr, fp);
if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT))
goto dumb;
if ((fp->_flags & __SOPT) == 0)
@@ -283,7 +283,7 @@ _DEFUN (_fseeko64_r, (ptr, fp, offset, whence),
fp->_p = fp->_bf._base + o;
fp->_r = n - o;
if (HASUB (fp))
- FREEUB (fp);
+ FREEUB (ptr, fp);
fp->_flags &= ~__SEOF;
_funlockfile(fp);
return 0;
@@ -304,7 +304,7 @@ _DEFUN (_fseeko64_r, (ptr, fp, offset, whence),
fp->_r = 0;
fp->_p = fp->_bf._base;
if (HASUB (fp))
- FREEUB (fp);
+ FREEUB (ptr, fp);
fp->_flags &= ~__SEOF;
n = target - curoff;
if (n)
@@ -330,7 +330,7 @@ dumb:
}
/* success: clear EOF indicator and discard ungetc() data */
if (HASUB (fp))
- FREEUB (fp);
+ FREEUB (ptr, fp);
fp->_p = fp->_bf._base;
fp->_r = 0;
/* fp->_w = 0; *//* unnecessary (I think...) */