rpms/live555/EL-6 live-cloexec.patch, NONE, 1.1 live-intptr.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 live-inet_ntop.patch, 1.2, 1.3 live-uselocale.patch, 1.2, 1.3 live555.spec, 1.13, 1.14 sources, 1.10, 1.11

Nicolas Chauvet kwizart at rpmfusion.org
Wed Jan 4 22:48:36 CET 2012


Author: kwizart

Update of /cvs/free/rpms/live555/EL-6
In directory se02.es.rpmfusion.net:/tmp/cvs-serv18851/EL-6

Modified Files:
	.cvsignore live-inet_ntop.patch live-uselocale.patch 
	live555.spec sources 
Added Files:
	live-cloexec.patch live-intptr.patch 
Log Message:
Update to current snapshot


live-cloexec.patch:
 GroupsockHelper.cpp |   24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

--- NEW FILE live-cloexec.patch ---
Copyright (C) 2011 Rémi Denis-Courmont.
Licensed under GNU General Public License version 2 or higher.
diff -ru live.orig/groupsock/GroupsockHelper.cpp live555/groupsock/GroupsockHelper.cpp
--- live.orig/groupsock/GroupsockHelper.cpp	2011-08-23 18:19:59.000000000 +0300
+++ live/groupsock/GroupsockHelper.cpp	2011-08-23 18:26:32.000000000 +0300
@@ -49,13 +49,33 @@
   reuseFlag = 1;
 }
 
+static int makeSocket(int type)
+{
+  int fd;
+
+#ifdef SOCK_CLOEXEC
+  fd = socket(AF_INET, type|SOCK_CLOEXEC, 0);
+  if (fd != -1 || errno != EINVAL)
+      return fd;
+#endif
+
+  fd = socket(AF_INET, type, 0);
+  if (fd == -1)
+    return -1;
+#ifdef FD_CLOEXEC
+  fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+  return fd;
+}
+
+
 int setupDatagramSocket(UsageEnvironment& env, Port port) {
   if (!initializeWinsockIfNecessary()) {
     socketErr(env, "Failed to initialize 'winsock': ");
     return -1;
   }
 
-  int newSocket = socket(AF_INET, SOCK_DGRAM, 0);
+  int newSocket = makeSocket(SOCK_DGRAM);
   if (newSocket < 0) {
     socketErr(env, "unable to create datagram socket: ");
     return newSocket;
@@ -161,7 +181,7 @@
     return -1;
   }
 
-  int newSocket = socket(AF_INET, SOCK_STREAM, 0);
+  int newSocket = makeSocket(SOCK_STREAM);
   if (newSocket < 0) {
     socketErr(env, "unable to create stream socket: ");
     return newSocket;

live-intptr.patch:
 BasicUsageEnvironment/BasicHashTable.cpp        |    7 ++++---
 BasicUsageEnvironment/BasicTaskScheduler0.cpp   |    3 ++-
 BasicUsageEnvironment/include/BasicHashTable.hh |    4 +++-
 groupsock/Groupsock.cpp                         |    3 ++-
 liveMedia/MP3StreamState.cpp                    |    9 +++++----
 liveMedia/RTCP.cpp                              |    9 +++++----
 6 files changed, 21 insertions(+), 14 deletions(-)

--- NEW FILE live-intptr.patch ---
diff -up live/BasicUsageEnvironment/BasicHashTable.cpp.vlc3 live/BasicUsageEnvironment/BasicHashTable.cpp
--- live/BasicUsageEnvironment/BasicHashTable.cpp.vlc3	2011-09-02 22:52:41.000000000 +0200
+++ live/BasicUsageEnvironment/BasicHashTable.cpp	2011-09-19 23:20:03.696255717 +0200
@@ -26,6 +26,7 @@ along with this library; if not, write t
 #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 @@ void BasicHashTable::rebuild() {
 }
 
 unsigned BasicHashTable::hashIndexFromKey(char const* key) const {
-  unsigned result = 0;
+  uintptr_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) + (uintptr_t)c;
     }
     result &= fMask;
   } else if (fKeyType == ONE_WORD_HASH_KEYS) {
-    result = randomIndex((unsigned long)key);
+    result = randomIndex((uintptr_t)key);
   } else {
     unsigned* k = (unsigned*)key;
     unsigned long sum = 0;
diff -up live/BasicUsageEnvironment/BasicTaskScheduler0.cpp.vlc3 live/BasicUsageEnvironment/BasicTaskScheduler0.cpp
--- live/BasicUsageEnvironment/BasicTaskScheduler0.cpp.vlc3	2011-09-02 22:52:41.000000000 +0200
+++ live/BasicUsageEnvironment/BasicTaskScheduler0.cpp	2011-09-19 23:20:03.697255868 +0200
@@ -19,6 +19,7 @@ along with this library; if not, write t
 
 #include "BasicUsageEnvironment0.hh"
 #include "HandlerSet.hh"
+#include <stdint.h>
 
 ////////// A subclass of DelayQueueEntry,
 //////////     used to implement BasicTaskScheduler0::scheduleDelayedTask()
@@ -68,7 +69,7 @@ TaskToken BasicTaskScheduler0::scheduleD
 }
 
 void BasicTaskScheduler0::unscheduleDelayedTask(TaskToken& prevTask) {
-  DelayQueueEntry* alarmHandler = fDelayQueue.removeEntry((long)prevTask);
+  DelayQueueEntry* alarmHandler = fDelayQueue.removeEntry((intptr_t)prevTask);
   prevTask = NULL;
   delete alarmHandler;
 }
diff -up live/BasicUsageEnvironment/include/BasicHashTable.hh.vlc3 live/BasicUsageEnvironment/include/BasicHashTable.hh
--- live/BasicUsageEnvironment/include/BasicHashTable.hh.vlc3	2011-09-02 22:52:41.000000000 +0200
+++ live/BasicUsageEnvironment/include/BasicHashTable.hh	2011-09-19 23:20:03.701256472 +0200
@@ -24,6 +24,8 @@ along with this library; if not, write t
 #include "HashTable.hh"
 #endif
 
+#include <stdint.h>
+
 // A simple hash table implementation, inspired by the hash table
 // implementation used in Tcl 7.6: <http://www.tcl.tk/>
 
@@ -87,7 +89,7 @@ private:
   unsigned hashIndexFromKey(char const* key) const;
     // used to implement many of the routines above
 
-  unsigned randomIndex(unsigned long i) const {
+  unsigned randomIndex(uintptr_t i) const {
     return (((i*1103515245) >> fDownShift) & fMask);
   }
 
diff -up live/groupsock/Groupsock.cpp.vlc3 live/groupsock/Groupsock.cpp
--- live/groupsock/Groupsock.cpp.vlc3	2011-09-19 23:20:03.690254809 +0200
+++ live/groupsock/Groupsock.cpp	2011-09-19 23:20:03.698256018 +0200
@@ -17,6 +17,7 @@ along with this library; if not, write t
 // 'Group sockets'
 // Implementation
 
+#include <stdint.h>
 #include "Groupsock.hh"
 #include "GroupsockHelper.hh"
 //##### Eventually fix the following #include; we shouldn't know about tunnels
@@ -401,7 +402,7 @@ int Groupsock::outputToAllMembersExcept(
 	= (TunnelEncapsulationTrailer*)&data[size];
       TunnelEncapsulationTrailer* trailer;
 
-      Boolean misaligned = ((unsigned long)trailerInPacket & 3) != 0;
+      Boolean misaligned = ((uintptr_t)trailerInPacket & 3) != 0;
       unsigned trailerOffset;
       u_int8_t tunnelCmd;
       if (isSSM()) {
diff -up live/liveMedia/MP3StreamState.cpp.vlc3 live/liveMedia/MP3StreamState.cpp
--- live/liveMedia/MP3StreamState.cpp.vlc3	2011-09-02 22:52:41.000000000 +0200
+++ live/liveMedia/MP3StreamState.cpp	2011-09-19 23:20:03.699256170 +0200
@@ -21,6 +21,7 @@ along with this library; if not, write t
 #include "MP3StreamState.hh"
 #include "InputFile.hh"
 #include "GroupsockHelper.hh"
+#include <stdint.h>
 
 #if defined(__WIN32__) || defined(_WIN32)
 #define snprintf _snprintf
@@ -36,8 +37,8 @@ MP3StreamState::~MP3StreamState() {
   // 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(fid_long);
     } else {
       CloseInputFile(fFid);
     }
@@ -192,7 +193,7 @@ void MP3StreamState::writeGetCmd(char co
   char const* const getCmdFmt = "GET %s HTTP/1.1\r\nHost: %s:%d\r\n\r\n";
 
   if (fFidIsReallyASocket) {
-    long fid_long = (long)fFid;
+    intptr_t fid_long = (intptr_t)fFid;
     int sock = (int)fid_long;
     char writeBuf[100];
 #if defined(IRIX) || defined(ALPHA) || defined(_QNX4) || defined(IMN_PIM) || defined(CRIS)
@@ -391,7 +392,7 @@ unsigned MP3StreamState::readFromStream(
 					unsigned numChars) {
   // Hack for doing socket I/O instead of file I/O (e.g., on Windows)
   if (fFidIsReallyASocket) {
-    long fid_long = (long)fFid;
+    intptr_t fid_long = (intptr_t)fFid;
     int sock = (int)fid_long;
     unsigned totBytesRead = 0;
     do {
diff -up live/liveMedia/RTCP.cpp.vlc3 live/liveMedia/RTCP.cpp
--- live/liveMedia/RTCP.cpp.vlc3	2011-09-02 22:52:41.000000000 +0200
+++ live/liveMedia/RTCP.cpp	2011-09-19 23:20:03.700256322 +0200
@@ -18,6 +18,7 @@ along with this library; if not, write t
 // RTCP
 // Implementation
 
+#include <stdint.h>
 #include "RTCP.hh"
 #include "GroupsockHelper.hh"
 #include "rtcp_from_spec.h"
@@ -81,14 +82,14 @@ void RTCPMemberDatabase::reapOldMembers(
 
     HashTable::Iterator* iter
       = HashTable::Iterator::create(*fTable);
-    unsigned long timeCount;
+    uintptr_t timeCount;
     char const* key;
-    while ((timeCount = (unsigned long)(iter->next(key))) != 0) {
+    while ((timeCount = (uintptr_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 < (uintptr_t)threshold) { // this SSRC is old
+        intptr_t ssrc = (uintptr_t)key;
         oldSSRC = (unsigned)ssrc;
         foundOldMember = True;
       }


Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/live555/EL-6/.cvsignore,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- .cvsignore	24 Jan 2011 22:16:07 -0000	1.9
+++ .cvsignore	4 Jan 2012 21:48:35 -0000	1.10
@@ -1 +1 @@
-live.2011.01.24.tar.gz
+live.2011.11.20.tar.gz

live-inet_ntop.patch:
 groupsock/Groupsock.cpp                     |    9 +++++---
 groupsock/include/GroupsockHelper.hh        |    2 -
 groupsock/inet.c                            |   29 ++++++++++------------------
 liveMedia/DarwinInjector.cpp                |    3 +-
 liveMedia/OnDemandServerMediaSubsession.cpp |    5 ++--
 liveMedia/PassiveServerMediaSubsession.cpp  |    5 ++--
 liveMedia/RTSPClient.cpp                    |    3 +-
 liveMedia/RTSPServer.cpp                    |   19 +++++++++++-------
 liveMedia/SIPClient.cpp                     |    7 +++---
 liveMedia/ServerMediaSession.cpp            |    5 ++--
 testProgs/sapWatch.cpp                      |    5 ++--
 11 files changed, 50 insertions(+), 42 deletions(-)

Index: live-inet_ntop.patch
===================================================================
RCS file: /cvs/free/rpms/live555/EL-6/live-inet_ntop.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- live-inet_ntop.patch	24 Jan 2011 22:16:07 -0000	1.2
+++ live-inet_ntop.patch	4 Jan 2012 21:48:36 -0000	1.3
@@ -177,9 +177,9 @@
    increaseSendBufferTo(envir(), clientSocket, 50*1024);
  
  #ifdef DEBUG
--  envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr) << '\n';
+-  envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr) << "\n";
 +  char buf[16];
-+  envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr, buf) << '\n';
++  envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr, buf) << "\n";
  #endif
  
    // Create a new object for this RTSP session.

live-uselocale.patch:
 live/liveMedia/Locale.cpp        |   13 ++++++-------
 live/liveMedia/RTSPCommon.cpp    |    2 +-
 live/liveMedia/include/Locale.hh |   17 ++++++++++-------
 liveMedia/RTSPClient.cpp         |    8 ++++----
 4 files changed, 21 insertions(+), 19 deletions(-)

Index: live-uselocale.patch
===================================================================
RCS file: /cvs/free/rpms/live555/EL-6/live-uselocale.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- live-uselocale.patch	24 Jan 2011 22:16:07 -0000	1.2
+++ live-uselocale.patch	4 Jan 2012 21:48:36 -0000	1.3
@@ -68,7 +68,7 @@
  }
 --- live.orig/liveMedia/RTSPClient.cpp	2010-03-16 03:09:46.000000000 +0100
 +++ live/liveMedia/RTSPClient.cpp	2010-08-24 15:04:31.000000000 +0200
-@@ -1019,7 +1019,7 @@
+@@ -469,7 +469,7 @@
      // This is the default value; we don't need a "Scale:" header:
      buf[0] = '\0';
    } else {
@@ -77,7 +77,7 @@
      sprintf(buf, "Scale: %f\r\n", scale);
    }
  
-@@ -1033,11 +1033,11 @@
+@@ -483,11 +483,11 @@
      buf[0] = '\0';
    } else if (end < 0) {
      // There's no end time:
@@ -91,8 +91,6 @@
      sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
    }
  
---- live/liveMedia/RTSPClient.cpp	2010-08-24 17:05:46.000000000 +0200
-+++ live.new/liveMedia/RTSPClient.cpp	2010-08-24 17:04:50.000000000 +0200
 @@ -935,7 +935,7 @@
  }
  


Index: live555.spec
===================================================================
RCS file: /cvs/free/rpms/live555/EL-6/live555.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- live555.spec	8 Oct 2011 11:32:16 -0000	1.13
+++ live555.spec	4 Jan 2012 21:48:36 -0000	1.14
@@ -1,9 +1,9 @@
-%global		date	2011.01.24
+%global		date	2011.11.20
 %global		live_soversion 0
 
 Name:		live555
 Version:	0
-Release:	0.30.%{date}%{?dist}.1
+Release:	0.33.%{date}%{?dist}
 Summary:	Live555.com streaming libraries
 
 Group:		System Environment/Libraries
@@ -12,9 +12,11 @@
 Source0:	http://live555.com/liveMedia/public/live.%{date}.tar.gz
 Patch0:		live.2010.01.16-shared.patch
 #Thoses patches are Copyright Rémi Denis-Courmont - provided as GPLv2+
-Patch1:         live-getaddrinfo.patch
-Patch2:         live-inet_ntop.patch
-Patch3:         live-uselocale.patch
+Patch1:		live-uselocale.patch
+Patch2:		live-inet_ntop.patch
+Patch3:		live-intptr.patch
+Patch4:		live-getaddrinfo.patch
+Patch5:		live-cloexec.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Provides: live555date%{_isa} = %{date}
@@ -92,6 +94,8 @@
 %patch1 -p1 -b .vlc1
 %patch2 -p1 -b .vlc2
 %patch3 -p1 -b .vlc3
+%patch4 -p1 -b .vlc4
+%patch5 -p1 -b .vlc5
 
 
 %build
@@ -193,8 +197,10 @@
 %{_libdir}/libUsageEnvironment*.a
 
 %changelog
-* Sat Oct 08 2011 Nicolas Chauvet <kwizart at gmail.com> - 0-0.30.2011.01.24.1
-- Rebuilt for target i686
+* Mon Sep 19 2011 Nicolas Chauvet <kwizart at gmail.com> - 0-0.32.2011.09.02
+- Update to 2011.09.02
+- Reorder patches
+- Add live-cloexec.patch and live-intptr.patch (rebased) from Rémi.
 
 * Tue Jan 25 2011 Nicolas Chauvet <kwizart at gmail.com> - 0-0.30.2011.01.24
 - Update to 2011.01.24


Index: sources
===================================================================
RCS file: /cvs/free/rpms/live555/EL-6/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources	24 Jan 2011 22:16:07 -0000	1.10
+++ sources	4 Jan 2012 21:48:36 -0000	1.11
@@ -1 +1 @@
-0626e80c774fb27c651c3daf6cc3fb91  live.2011.01.24.tar.gz
+8e5ebefdf7d12ca9cfd7175ff3d7eef2  live.2011.11.20.tar.gz



More information about the rpmfusion-commits mailing list