aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/local.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r--newlib/libc/stdio/local.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 9ae9b40..704b6be 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -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
@@ -41,7 +41,7 @@ extern int _EXFUN(__sclose,(_PTR));
extern int _EXFUN(__stextmode,(int));
extern _VOID _EXFUN(__sinit,(struct _reent *));
extern _VOID _EXFUN(_cleanup_r,(struct _reent *));
-extern _VOID _EXFUN(__smakebuf,(FILE *));
+extern _VOID _EXFUN(__smakebuf_r,(struct _reent *, FILE *));
extern int _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *)));
extern int _EXFUN(_fwalk_reent,(struct _reent *, int (*)(struct _reent *, FILE *)));
struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
@@ -82,24 +82,25 @@ struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
/* Return true iff the given FILE cannot be written now. */
-#define cantwrite(fp) \
+#define cantwrite(ptr, fp) \
((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
- __swsetup(fp))
+ __swsetup_r(ptr, fp))
/* Test whether the given stdio file has an active ungetc buffer;
release such a buffer, without restoring ordinary unread data. */
#define HASUB(fp) ((fp)->_ub._base != NULL)
-#define FREEUB(fp) { \
+#define FREEUB(ptr, fp) { \
if ((fp)->_ub._base != (fp)->_ubuf) \
- _free_r(_REENT, (char *)(fp)->_ub._base); \
+ _free_r(ptr, (char *)(fp)->_ub._base); \
(fp)->_ub._base = NULL; \
}
/* Test for an fgetline() buffer. */
#define HASLB(fp) ((fp)->_lb._base != NULL)
-#define FREELB(fp) { _free_r(_REENT,(char *)(fp)->_lb._base); (fp)->_lb._base = NULL; }
+#define FREELB(ptr, fp) { _free_r(ptr,(char *)(fp)->_lb._base); \
+ (fp)->_lb._base = NULL; }
/* WARNING: _dcvt is defined in the stdlib directory, not here! */