[vlc-devel] commit: Port live to Win64 (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Aug 19 01:18:30 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Aug 19 01:17:30 2009 +0200| [85b6225269ac6f96df5e11ac73469ef7881f14bd] | committer: Jean-Baptiste Kempf 

Port live to Win64

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85b6225269ac6f96df5e11ac73469ef7881f14bd
---

 extras/contrib/src/Makefile                 |    3 +
 extras/contrib/src/Patches/live-win64.patch |  146 +++++++++++++++++++++++++++
 2 files changed, 149 insertions(+), 0 deletions(-)

diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index 45ca634..c8e4389 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -1279,6 +1279,9 @@ live: live555-$(LIVEDOTCOM_VERSION).tar.gz
 	$(EXTRACT_GZ)
 	patch -p0 < Patches/live-noapps.patch
 	patch -p0 < Patches/live-uselocale.patch
+ifdef HAVE_WIN64
+	patch -p0 < Patches/live-win64.patch
+endif
 
 .live: live
 ifdef HAVE_WIN32
diff --git a/extras/contrib/src/Patches/live-win64.patch b/extras/contrib/src/Patches/live-win64.patch
new file mode 100644
index 0000000..8f94a4d
--- /dev/null
+++ b/extras/contrib/src/Patches/live-win64.patch
@@ -0,0 +1,146 @@
+diff -ruN live/BasicUsageEnvironment/BasicHashTable.cpp live.new/BasicUsageEnvironment/BasicHashTable.cpp
+--- live/BasicUsageEnvironment/BasicHashTable.cpp	2009-07-28 03:05:14.000000000 +0200
++++ live.new/BasicUsageEnvironment/BasicHashTable.cpp	2009-08-19 00:58:32.000000000 +0200
+@@ -26,6 +26,7 @@
+ #endif
+ #include <string.h>
+ #include <stdio.h>
++#include <stdint.h>
+ 
+ // When there are this many entries per bucket, on average, rebuild
+ // the table to increase the number of buckets
+@@ -253,17 +254,17 @@
+ }
+ 
+ unsigned BasicHashTable::hashIndexFromKey(char const* key) const {
+-  unsigned result = 0;
++  intptr_t result = 0;
+ 
+   if (fKeyType == STRING_HASH_KEYS) {
+     while (1) {
+       char c = *key++;
+       if (c == 0) break;
+-      result += (result<<3) + (unsigned)c;
++      result += (result<<3) + (intptr_t)c;
+     }
+     result &= fMask;
+   } else if (fKeyType == ONE_WORD_HASH_KEYS) {
+-    result = randomIndex((unsigned long)key);
++    result = randomIndex((intptr_t)key);
+   } else {
+     unsigned* k = (unsigned*)key;
+     unsigned long sum = 0;
+diff -ruN live/BasicUsageEnvironment/BasicTaskScheduler0.cpp live.new/BasicUsageEnvironment/BasicTaskScheduler0.cpp
+--- live/BasicUsageEnvironment/BasicTaskScheduler0.cpp	2009-07-28 03:05:14.000000000 +0200
++++ live.new/BasicUsageEnvironment/BasicTaskScheduler0.cpp	2009-08-19 00:58:04.000000000 +0200
+@@ -19,6 +19,7 @@
+ 
+ #include "BasicUsageEnvironment0.hh"
+ #include "HandlerSet.hh"
++#include <stdint.h>
+ 
+ ////////// A subclass of DelayQueueEntry,
+ //////////     used to implement BasicTaskScheduler0::scheduleDelayedTask()
+@@ -64,7 +65,7 @@
+ }
+ 
+ void BasicTaskScheduler0::unscheduleDelayedTask(TaskToken& prevTask) {
+-  DelayQueueEntry* alarmHandler = fDelayQueue.removeEntry((long)prevTask);
++  DelayQueueEntry* alarmHandler = fDelayQueue.removeEntry((intptr_t)prevTask);
+   prevTask = NULL;
+   delete alarmHandler;
+ }
+diff -ruN live/groupsock/Groupsock.cpp live.new/groupsock/Groupsock.cpp
+--- live/groupsock/Groupsock.cpp	2009-07-28 03:05:14.000000000 +0200
++++ live.new/groupsock/Groupsock.cpp	2009-08-19 00:57:14.000000000 +0200
+@@ -17,6 +17,7 @@
+ // 'Group sockets'
+ // Implementation
+ 
++#include <stdint.h>
+ #include "Groupsock.hh"
+ #include "GroupsockHelper.hh"
+ //##### Eventually fix the following #include; we shouldn't know about tunnels
+@@ -403,7 +404,7 @@
+ 	= (TunnelEncapsulationTrailer*)&data[size];
+       TunnelEncapsulationTrailer* trailer;
+ 
+-      Boolean misaligned = ((unsigned long)trailerInPacket & 3) != 0;
++      Boolean misaligned = ((intptr_t)trailerInPacket & 3) != 0;
+       unsigned trailerOffset;
+       u_int8_t tunnelCmd;
+       if (isSSM()) {
+diff -ruN live/liveMedia/MP3StreamState.cpp live.new/liveMedia/MP3StreamState.cpp
+--- live/liveMedia/MP3StreamState.cpp	2009-07-28 03:05:14.000000000 +0200
++++ live.new/liveMedia/MP3StreamState.cpp	2009-08-19 00:56:37.000000000 +0200
+@@ -20,6 +20,7 @@
+ 
+ #include "MP3StreamState.hh"
+ #include "GroupsockHelper.hh"
++#include <stdint.h>
+ 
+ #if defined(__WIN32__) || defined(_WIN32)
+ #define snprintf _snprintf
+@@ -35,8 +36,8 @@
+   // Close our open file or socket:
+   if (fFid != NULL && fFid != stdin) {
+     if (fFidIsReallyASocket) {
+-      long fid_long = (long)fFid;
+-      closeSocket((int)fid_long);
++      intptr_t fid_long = (intptr_t)fFid;
++      closeSocket((int)(intptr_t)fid_long);
+     } else {
+       fclose(fFid);
+     }
+@@ -201,8 +202,8 @@
+   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;
+     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 @@
+ 					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;
+     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
+@@ -18,6 +18,7 @@
+ // RTCP
+ // Implementation
+ 
++#include <stdint.h>
+ #include "RTCP.hh"
+ #include "GroupsockHelper.hh"
+ #include "rtcp_from_spec.h"
+@@ -81,14 +82,14 @@
+ 
+     HashTable::Iterator* iter
+       = HashTable::Iterator::create(*fTable);
+-    unsigned long timeCount;
++    intptr_t timeCount;
+     char const* key;
+-    while ((timeCount = (unsigned long)(iter->next(key))) != 0) {
++    while ((timeCount = (intptr_t)(iter->next(key))) != 0) {
+ #ifdef DEBUG
+       fprintf(stderr, "reap: checking SSRC 0x%lx: %ld (threshold %d)\n", (unsigned long)key, timeCount, threshold);
+ #endif
+-      if (timeCount < (unsigned long)threshold) { // this SSRC is old
+-        unsigned long ssrc = (unsigned long)key;
++      if (timeCount < (intptr_t)threshold) { // this SSRC is old
++        intptr_t ssrc = (intptr_t)key;
+         oldSSRC = (unsigned)ssrc;
+         foundOldMember = True;
+       }




More information about the vlc-devel mailing list