[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Missing includes of errno.h
From: |
Momchil Velikov |
Subject: |
[PATCH] Missing includes of errno.h |
Date: |
14 Nov 2002 00:42:06 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Some files access ``errno'' and use error number symbols without
including <errno.h>
~velco
diff -rudpN libc/tags/initial/sysdeps/posix/readv.c
libc/trunk/sysdeps/posix/readv.c
--- libc/tags/initial/sysdeps/posix/readv.c Sun Nov 10 23:45:43 2002
+++ libc/trunk/sysdeps/posix/readv.c Sun Nov 10 23:37:00 2002
@@ -23,6 +23,7 @@
#include <stdbool.h>
#include <sys/param.h>
#include <sys/uio.h>
+#include <errno.h>
/* Read data from file descriptor FD, and put the result in the
buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
@@ -46,7 +47,7 @@ __libc_readv (int fd, const struct iovec
/* Check for ssize_t overflow. */
if (SSIZE_MAX - bytes < vector[i].iov_len)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
bytes += vector[i].iov_len;
diff -rudpN libc/tags/initial/sysdeps/posix/writev.c
libc/trunk/sysdeps/posix/writev.c
--- libc/tags/initial/sysdeps/posix/writev.c Sun Nov 10 23:45:43 2002
+++ libc/trunk/sysdeps/posix/writev.c Sun Nov 10 23:37:01 2002
@@ -23,6 +23,7 @@
#include <stdbool.h>
#include <sys/param.h>
#include <sys/uio.h>
+#include <errno.h>
/* Write data pointed by the buffers described by VECTOR, which
is a vector of COUNT `struct iovec's, to file descriptor FD.
@@ -46,7 +47,7 @@ __libc_writev (int fd, const struct iove
/* Check for ssize_t overflow. */
if (SSIZE_MAX - bytes < vector[i].iov_len)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
bytes += vector[i].iov_len;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Missing includes of errno.h,
Momchil Velikov <=