Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: ports/libxcb/nacl.patch

Issue 1260083004: Add needed functions to glibc-compat for pkg (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: fix wrong c++ lib Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/libxcb/build.sh ('k') | ports/xtrans/nacl.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/libxcb/nacl.patch
diff --git a/ports/libxcb/nacl.patch b/ports/libxcb/nacl.patch
index 5d72c02fcb0b530b32e0c483947f6c6f72a24c20..64fbddc34a983c003e75e481621e1a8861124337 100644
--- a/ports/libxcb/nacl.patch
+++ b/ports/libxcb/nacl.patch
@@ -1,7 +1,7 @@
diff --git a/configure b/configure
--- a/configure
+++ b/configure
-@@ -13123,7 +13123,9 @@ else
+@@ -13123,7 +13136,9 @@ else
$as_echo "yes" >&6; }
fi
@@ -42,41 +42,3 @@ diff --git a/src/xcb_conn.c b/src/xcb_conn.c
static int set_fd_flags(const int fd)
{
/* Win32 doesn't have file descriptors and the fcntl function. This block sets the socket in non-blocking mode */
-@@ -179,7 +199,8 @@ static int write_vec(xcb_connection_t *c, struct iovec **vector, int *count)
- int n;
- assert(!c->out.queue_len);
-
--#ifdef _WIN32
-+ /* Using writev emulation for nacl newlib. */
-+#if defined(_WIN32) || (defined(__native_client__) && defined(_NEWLIB_VERSION))
- int i = 0;
- int ret = 0,err = 0;
- struct iovec *vec;
-@@ -190,11 +211,26 @@ static int write_vec(xcb_connection_t *c, struct iovec **vector, int *count)
- vec = *vector;
- while(i < *count)
- {
-- ret = send(c->fd,vec->iov_base,vec->iov_len,0);
-+ /*
-+ * TODO(bradnelson): Drop if nacl_io supports zero length sends.
-+ * https://code.google.com/p/naclports/issues/detail?id=228
-+ */
-+ if (vec->iov_len != 0) {
-+ ret = send(c->fd,vec->iov_base,vec->iov_len,0);
-+ } else {
-+ ret = 0;
-+ }
-+ /* Generalize to posix so this can be used with nacl newlib. */
-+#if defined(__native_client__) && defined(_NEWLIB_VERSION)
-+ if(ret < 0)
-+ {
-+ if(errno == EWOULDBLOCK)
-+#else
- if(ret == SOCKET_ERROR)
- {
- err = WSAGetLastError();
- if(err == WSAEWOULDBLOCK)
-+#endif
- {
- return 1;
- }
« no previous file with comments | « ports/libxcb/build.sh ('k') | ports/xtrans/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698