aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/posix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/readv.c11
-rw-r--r--sysdeps/posix/waitid.c5
-rw-r--r--sysdeps/posix/writev.c11
3 files changed, 15 insertions, 12 deletions
diff --git a/sysdeps/posix/readv.c b/sysdeps/posix/readv.c
index bb6634529d..bde57b44fa 100644
--- a/sysdeps/posix/readv.c
+++ b/sysdeps/posix/readv.c
@@ -30,7 +30,7 @@
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
-__readv (int fd, const struct iovec *vector, int count)
+__libc_readv (int fd, const struct iovec *vector, int count)
{
char *buffer;
char *buffer_start;
@@ -55,8 +55,8 @@ __readv (int fd, const struct iovec *vector, int count)
/* Allocate a temporary buffer to hold the data. We should normally
use alloca since it's faster and does not require synchronization
with other threads. But we cannot if the amount of memory
- required is too large. Use 512k as the limit. */
- if (bytes < 512 * 1024)
+ required is too large. */
+ if (__libc_use_alloca (bytes))
buffer = (char *) __alloca (bytes);
else
{
@@ -94,6 +94,7 @@ __readv (int fd, const struct iovec *vector, int count)
return bytes_read;
}
-#ifndef __readv
-weak_alias (__readv, readv)
+#ifndef __libc_readv
+strong_alias (__libc_readv, __readv)
+weak_alias (__libc_readv, readv)
#endif
diff --git a/sysdeps/posix/waitid.c b/sysdeps/posix/waitid.c
index dcb93b6769..8687436309 100644
--- a/sysdeps/posix/waitid.c
+++ b/sysdeps/posix/waitid.c
@@ -1,5 +1,5 @@
/* Pseudo implementation of waitid.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1997.
@@ -28,7 +28,7 @@
#include <assert.h>
int
-waitid (idtype, id, infop, options)
+__waitid (idtype, id, infop, options)
idtype_t idtype;
id_t id;
siginfo_t *infop;
@@ -118,3 +118,4 @@ waitid (idtype, id, infop, options)
return 0;
}
+weak_alias (__waitid, waitid)
diff --git a/sysdeps/posix/writev.c b/sysdeps/posix/writev.c
index 7afdce3289..ae5ef1efb4 100644
--- a/sysdeps/posix/writev.c
+++ b/sysdeps/posix/writev.c
@@ -30,7 +30,7 @@
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
ssize_t
-__writev (int fd, const struct iovec *vector, int count)
+__libc_writev (int fd, const struct iovec *vector, int count)
{
char *buffer;
register char *bp;
@@ -55,8 +55,8 @@ __writev (int fd, const struct iovec *vector, int count)
/* Allocate a temporary buffer to hold the data. We should normally
use alloca since it's faster and does not require synchronization
with other threads. But we cannot if the amount of memory
- required is too large. Use 512k as the limit. */
- if (bytes < 512 * 1024)
+ required is too large. */
+ if (__libc_use_alloca (bytes))
buffer = (char *) __alloca (bytes);
else
{
@@ -90,6 +90,7 @@ __writev (int fd, const struct iovec *vector, int count)
return bytes_written;
}
-#ifndef __writev
-weak_alias (__writev, writev)
+#ifndef __libc_writev
+strong_alias (__libc_writev, __writev)
+weak_alias (__libc_writev, writev)
#endif