[vlc-commits] contrib: clean up live-win64 patch
Rémi Denis-Courmont
git at videolan.org
Fri Jul 1 22:25:38 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 1 17:55:36 2011 +0300| [29999684de880d5cbf89f29051859fc4a10c83bc] | committer: Rémi Denis-Courmont
contrib: clean up live-win64 patch
Remove some useless cast changes. Apply the patch always as it is
correct on all architecture. Drop the errno code part which is wrong
(live needs the Winsock error codes, not the <io.h> ones).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29999684de880d5cbf89f29051859fc4a10c83bc
---
.../{live-win64.patch => live-intptr.patch} | 32 +++----------------
contrib/src/live555/rules.mak | 4 +--
2 files changed, 6 insertions(+), 30 deletions(-)
diff --git a/contrib/src/live555/live-win64.patch b/contrib/src/live555/live-intptr.patch
similarity index 86%
rename from contrib/src/live555/live-win64.patch
rename to contrib/src/live555/live-intptr.patch
index 00e5865..4fca02f 100644
--- a/contrib/src/live555/live-win64.patch
+++ b/contrib/src/live555/live-intptr.patch
@@ -88,32 +88,28 @@ diff -ruN live/liveMedia/MP3StreamState.cpp live.new/liveMedia/MP3StreamState.cp
- long fid_long = (long)fFid;
- closeSocket((int)fid_long);
+ intptr_t fid_long = (intptr_t)fFid;
-+ closeSocket((int)(intptr_t)fid_long);
++ closeSocket(fid_long);
} else {
fclose(fFid);
}
-@@ -201,8 +202,8 @@
+@@ -201,7 +202,7 @@
char const* const getCmdFmt = "GET %s HTTP/1.1\r\nHost: %s:%d\r\n\r\n";
if (fFidIsReallyASocket) {
- long fid_long = (long)fFid;
-- int sock = (int)fid_long;
+ intptr_t fid_long = (intptr_t)fFid;
-+ int sock = (int)(intptr_t)fid_long;
+ int sock = (int)fid_long;
char writeBuf[100];
#if defined(IRIX) || defined(ALPHA) || defined(_QNX4) || defined(IMN_PIM) || defined(CRIS)
- /* snprintf() isn't defined, so just use sprintf() */
-@@ -412,8 +413,8 @@
+@@ -412,7 +413,7 @@
unsigned numChars) {
// Hack for doing socket I/O instead of file I/O (e.g., on Windows)
if (fFidIsReallyASocket) {
- long fid_long = (long)fFid;
-- int sock = (int)fid_long;
+ intptr_t fid_long = (intptr_t)fFid;
-+ int sock = (int)(intptr_t)fid_long;
+ int sock = (int)fid_long;
unsigned totBytesRead = 0;
do {
- waitUntilSocketIsReadable(fEnv, sock);
diff -ruN live/liveMedia/RTCP.cpp live.new/liveMedia/RTCP.cpp
--- live/liveMedia/RTCP.cpp 2009-07-28 03:05:14.000000000 +0200
+++ live.new/liveMedia/RTCP.cpp 2009-08-19 00:57:01.000000000 +0200
@@ -164,21 +160,3 @@ diff -ruN live/liveMedia/RTCP.cpp live.new/liveMedia/RTCP.cpp
return (((i*1103515245) >> fDownShift) & fMask);
}
-diff -ruN live/groupsock/include/NetCommon.h live.new/groupsock/include/NetCommon.h
---- live/groupsock/include/NetCommon.h 2009-07-28 03:05:14.000000000 +0200
-+++ live.new/groupsock/include/NetCommon.h 2009-08-19 19:00:59.000000000 +0200
-@@ -37,8 +37,12 @@
- #define closeSocket closesocket
- #define EWOULDBLOCK WSAEWOULDBLOCK
- #define EINPROGRESS WSAEWOULDBLOCK
--#define EAGAIN WSAEWOULDBLOCK
--#define EINTR WSAEINTR
-+#ifndef EAGAIN
-+ #define EAGAIN WSAEWOULDBLOCK
-+#endif
-+#ifndef EINTR
-+ #define EINTR WSAEINTR
-+#endif
-
- #if defined(_WIN32_WCE)
- #define NO_STRSTREAM 1
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index 0007aee..330b833 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -13,9 +13,7 @@ live555: live555-latest.tar.gz .sum-live555
$(UNPACK)
patch -p0 < $(SRC)/live555/live-uselocale.patch
patch -p0 < $(SRC)/live555/live-inet_ntop.patch
-ifdef HAVE_WIN64
- patch -p0 < $(SRC)/live555/live-win64.patch
-endif
+ patch -p0 < $(SRC)/live555/live-intptr.patch
ifndef HAVE_WIN32
ifndef HAVE_WINCE
patch -p0 < $(SRC)/live555/live-getaddrinfo.patch
More information about the vlc-commits
mailing list