[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 135/208: errno: fix non-windows builds after af0216
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 135/208: errno: fix non-windows builds after af0216251b94e7 |
Date: |
Wed, 09 Aug 2017 17:35:32 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit a5834e525deb6d233990ae2288b156728db32cec
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Jul 10 13:58:35 2017 +0200
errno: fix non-windows builds after af0216251b94e7
---
lib/memdebug.c | 2 +-
lib/strerror.c | 12 +++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 16434f819..8c9fe9502 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -147,7 +147,7 @@ static bool countcheck(const char *func, int line, const
char *source)
source, line, func);
fflush(logfile); /* because it might crash now */
}
- SET_ERRNO(ENOMEM);
+ errno = ENOMEM;
return TRUE; /* RETURN ERROR! */
}
else
diff --git a/lib/strerror.c b/lib/strerror.c
index 35dc0a421..a85c216a5 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2004 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 2004 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -631,14 +631,16 @@ const char *Curl_strerror(struct connectdata *conn, int
err)
char *buf, *p;
size_t max;
int old_errno;
+#ifdef WIN32
DWORD old_win_err;
-
+#endif
DEBUGASSERT(conn);
DEBUGASSERT(err >= 0);
old_errno = errno;
+#ifdef WIN32
old_win_err = GetLastError();
-
+#endif
buf = conn->syserr_buf;
max = sizeof(conn->syserr_buf)-1;
*buf = '\0';
@@ -725,10 +727,10 @@ const char *Curl_strerror(struct connectdata *conn, int
err)
p = strrchr(buf, '\r');
if(p && (p - buf) >= 1)
*p = '\0';
-
+#ifdef WIN32
if(old_win_err != GetLastError())
SetLastError(old_win_err);
-
+#endif
if(errno != old_errno)
errno = old_errno;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 156/208: multi: mention integer overflow risk if using > 500 million sockets, (continued)
- [GNUnet-SVN] [gnurl] 156/208: multi: mention integer overflow risk if using > 500 million sockets, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 191/208: test1010: verify that #1718 is fixed, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 188/208: travis: BUILD_TYPE => T, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 72/208: libtest/make: generate lib1521.c, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 159/208: test1323: verify curlx_tvdiff, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 42/208: http2: fix OOM crash, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 163/208: tool_help: clarify --include is only for response headers, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 206/208: THANKS: 20 new contributors in 7.55.0, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 183/208: test130: verify comments in .netrc, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 142/208: travis: install libssh2, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 135/208: errno: fix non-windows builds after af0216251b94e7,
gnunet <=
- [GNUnet-SVN] [gnurl] 67/208: winbuild: fix boringssl build, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 168/208: libcurl: Stop using error codes defined under CURL_NO_OLDIES, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 48/208: lib1521: add curl_easy_getinfo calls to the test set, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 184/208: darwinssl: fix curlssl_sha256sum() compiler warnings on first argument, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 198/208: file: output the correct buffer to the user, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 171/208: curl_setup: Define CURL_NO_OLDIES for building libcurl, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 192/208: RELEASE-NOTES: synced with 561e9217c, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 189/208: travis: explicitly specify dist, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 178/208: travis: build osx with libressl too, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 187/208: travis: add osx build with darwinssl, gnunet, 2017/08/09