summaryrefslogtreecommitdiff
path: root/mach/devstream.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:36:51 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:36:51 +0000
commit05fa8834c6644f12405ea713c48693bf2d1864f1 (patch)
treec6b6391884370c75972a2e432d42ebbb076a0cdf /mach/devstream.c
parent525c181a5a9a95e24d2111b7792608151a40eb84 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmemt/bigmem
Diffstat (limited to 'mach/devstream.c')
-rw-r--r--mach/devstream.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mach/devstream.c b/mach/devstream.c
index ba1c01b4e0..505b6573ae 100644
--- a/mach/devstream.c
+++ b/mach/devstream.c
@@ -1,6 +1,6 @@
/* stdio on a Mach device port.
Translates \n to \r\n on output, echos and translates \r to \n on input.
- Copyright (C) 1992-2016 Free Software Foundation, Inc.
+ Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@
#include <device/device.h>
#include <errno.h>
#include <string.h>
+#include <libioP.h>
static ssize_t
@@ -111,7 +112,7 @@ devstream_read (void *cookie, char *buffer, size_t to_read)
static int
dealloc_ref (void *cookie)
{
- if (mach_port_deallocate (mach_task_self (), (mach_port_t) cookie))
+ if (__mach_port_deallocate (mach_task_self (), (mach_port_t) cookie))
{
errno = EINVAL;
return -1;
@@ -130,13 +131,13 @@ mach_open_devstream (mach_port_t dev, const char *mode)
return NULL;
}
- stream = fopencookie ((void *) dev, mode,
- (cookie_io_functions_t) { write: devstream_write,
- read: devstream_read,
- close: dealloc_ref });
+ stream = _IO_fopencookie ((void *) dev, mode,
+ (cookie_io_functions_t) { write: devstream_write,
+ read: devstream_read,
+ close: dealloc_ref });
if (stream == NULL)
{
- mach_port_deallocate (mach_task_self (), dev);
+ __mach_port_deallocate (mach_task_self (), dev);
return NULL;
}