Update of /cvsroot/fink/experimental/fangism/finkinfo
In directory vz-cvs-3.sog:/tmp/cvs-serv22196

Modified Files:
        libtorrent15.info libtorrent15.patch 
Log Message:
smaller patches by pushing casts into atomicity macros


Index: libtorrent15.patch
===================================================================
RCS file: /cvsroot/fink/experimental/fangism/finkinfo/libtorrent15.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- libtorrent15.patch  2 Aug 2012 20:46:54 -0000       1.5
+++ libtorrent15.patch  3 Aug 2012 00:18:59 -0000       1.6
@@ -30,12 +30,12 @@
 +
 +#ifdef        USE_DARWIN_ATOMICS
 +#include <libkern/OSAtomic.h>
-+#define       __sync_add_and_fetch(x, y)      OSAtomicAdd32Barrier(y, x)
-+#define       __sync_sub_and_fetch(x, y)      OSAtomicAdd32Barrier(-(y), x)
-+#define       __sync_and_and_fetch(x, y)      OSAtomicAnd32Barrier(y, x)
-+#define       __sync_or_and_fetch(x, y)       OSAtomicOr32Barrier(y, x)
++#define       __sync_add_and_fetch(x, y)      OSAtomicAdd32Barrier(y, 
(int32_t*)x)
++#define       __sync_sub_and_fetch(x, y)      OSAtomicAdd32Barrier(-(y), 
(int32_t*)x)
++#define       __sync_and_and_fetch(x, y)      OSAtomicAnd32Barrier(y, 
(uint32_t*)x)
++#define       __sync_or_and_fetch(x, y)       OSAtomicOr32Barrier(y, 
(uint32_t*)x)
 +#define       __sync_lock_test_and_set(x, y)  OSAtomicTestAndSetBarrier(y, x)
-+#define       __sync_bool_compare_and_swap(x, y, z)   
OSAtomicCompareAndSwap32Barrier(y, z, x)
++#define       __sync_bool_compare_and_swap(x, y, z)   
OSAtomicCompareAndSwap32Barrier(y, z, (int32_t*)x)
 +#define       __sync_fetch_and_or(x, y)       ( __sync_or_and_fetch(x, y), *x 
)
 +#define       __sync_fetch_and_and(x, y)      ( __sync_and_and_fetch(x, y), 
*x )
 +#endif
@@ -113,91 +113,6 @@
    log_outputs.clear();
    log_children.clear();
  
---- libtorrent-0.13.2-orig/src/torrent/utils/signal_bitfield.cc        
2012-07-31 17:33:38.000000000 -0700
-+++ libtorrent-0.13.2/src/torrent/utils/signal_bitfield.cc     2012-07-31 
17:38:56.000000000 -0700
-@@ -52,7 +52,7 @@
-     throw internal_error("signal_bitfield::add_signal(...): Cannot add empty 
slot.");
- 
-   unsigned int index = m_size;
--  __sync_add_and_fetch(&m_size, 1);
-+  __sync_add_and_fetch((int32_t*)(&m_size), 1);
- 
-   m_slots[index] = slot;
-   return index;
-@@ -62,7 +62,7 @@
- signal_bitfield::work() {
-   bitfield_type bitfield;
- 
--  while (!__sync_bool_compare_and_swap(&m_bitfield, (bitfield = m_bitfield), 
0))
-+  while (!__sync_bool_compare_and_swap((int32_t*)(&m_bitfield), (bitfield = 
m_bitfield), 0))
-     ; // Do nothing.
- 
-   unsigned int i = 0;
---- libtorrent-0.13.2-orig/src/torrent/utils/thread_base.cc    2012-07-31 
17:46:01.000000000 -0700
-+++ libtorrent-0.13.2/src/torrent/utils/thread_base.cc 2012-08-01 
13:00:55.000000000 -0700
-@@ -69,7 +69,7 @@
- 
- void
- thread_base::stop_thread() {
--  __sync_fetch_and_or(&m_flags, flag_do_shutdown);
-+  __sync_fetch_and_or((uint32_t*)&m_flags, flag_do_shutdown);
-   interrupt();
- }
- 
-@@ -88,7 +88,7 @@
- 
- void
- thread_base::interrupt() {
--  __sync_fetch_and_or(&m_flags, flag_no_timeout);
-+  __sync_fetch_and_or((uint32_t*)&m_flags, flag_no_timeout);
- 
-   while (is_polling() && has_no_timeout()) {
-     pthread_kill(m_thread, SIGUSR1);
-@@ -115,7 +115,7 @@
-       thread->call_events();
-       thread->signal_bitfield()->work();
- 
--      __sync_fetch_and_or(&thread->m_flags, flag_polling);
-+      __sync_fetch_and_or((uint32_t*)&thread->m_flags, flag_polling);
- 
-       // Call again after setting flag_polling to ensure we process
-       // any events set while it was working.
-@@ -143,7 +143,7 @@
-         poll_flags = torrent::Poll::poll_worker_thread;
- 
-       thread->m_poll->do_poll(next_timeout, poll_flags);
--      __sync_fetch_and_and(&thread->m_flags, ~(flag_polling | 
flag_no_timeout));
-+      __sync_fetch_and_and((uint32_t*)&thread->m_flags, ~(flag_polling | 
flag_no_timeout));
-     }
- 
-   } catch (torrent::shutdown_exception& e) {
---- libtorrent-0.13.2-orig/src/thread_disk.cc  2012-08-01 13:03:26.000000000 
-0700
-+++ libtorrent-0.13.2/src/thread_disk.cc       2012-08-01 13:03:45.000000000 
-0700
-@@ -64,7 +64,7 @@
-     if ((m_flags & flag_did_shutdown))
-       throw internal_error("Already trigged shutdown.");
- 
--    __sync_or_and_fetch(&m_flags, flag_did_shutdown);
-+    __sync_or_and_fetch((uint32_t*)&m_flags, flag_did_shutdown);
-     throw shutdown_exception();
-   }
- 
---- libtorrent-0.13.2-orig/test/torrent/utils/thread_base_test.h       
2012-08-02 11:25:18.000000000 -0700
-+++ libtorrent-0.13.2/test/torrent/utils/thread_base_test.h    2012-08-02 
11:30:45.000000000 -0700
-@@ -71,10 +71,10 @@
- 
-   void                init_thread();
- 
--  void                set_pre_stop() { __sync_or_and_fetch(&m_test_flags, 
test_flag_pre_stop); }
--  void                set_acquire_global() { 
__sync_or_and_fetch(&m_test_flags, test_flag_acquire_global); }
-+  void                set_pre_stop() { 
__sync_or_and_fetch((uint32_t*)&m_test_flags, test_flag_pre_stop); }
-+  void                set_acquire_global() { 
__sync_or_and_fetch((uint32_t*)&m_test_flags, test_flag_acquire_global); }
- 
--  void                set_test_flag(int flags) { 
__sync_or_and_fetch(&m_test_flags, flags); }
-+  void                set_test_flag(int flags) { 
__sync_or_and_fetch((uint32_t*)&m_test_flags, flags); }
- 
- private:
-   void                call_events();
 --- libtorrent-0.13.2/test/torrent/object_static_map_test.h.orig       
2012-08-02 12:40:04.000000000 -0700
 +++ libtorrent-0.13.2/test/torrent/object_static_map_test.h    2012-08-02 
12:42:13.000000000 -0700
 @@ -9,14 +9,14 @@

Index: libtorrent15.info
===================================================================
RCS file: /cvsroot/fink/experimental/fangism/finkinfo/libtorrent15.info,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- libtorrent15.info   2 Aug 2012 21:35:36 -0000       1.7
+++ libtorrent15.info   3 Aug 2012 00:18:59 -0000       1.8
@@ -16,7 +16,8 @@
 Source-MD5: 96c0b81501357df402ab592f59ecaeab
 
 PatchFile: %n.patch
-PatchFile-MD5: a16759ddc52896ec013537f761346560
+PatchFile-MD5: 8651c44b858170b075829d60e28aeb70
+# PatchFile-MD5: a16759ddc52896ec013537f761346560
 
 #PKG_CONFIG_PATH: %p/lib/system-openssl/lib/pkgconfig
 BuildDependsOnly: true


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to