From 11cb05e10b5311bbaebfc67a6358d21fcd1b948d Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 15 Oct 2009 09:43:20 -0400 Subject: OSX 10.6 x86_64 fixes for configure and libusb; Audio is next --- usrp/host/lib/fusb_darwin.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usrp/host/lib/fusb_darwin.h') diff --git a/usrp/host/lib/fusb_darwin.h b/usrp/host/lib/fusb_darwin.h index bb717b58c..63016648b 100644 --- a/usrp/host/lib/fusb_darwin.h +++ b/usrp/host/lib/fusb_darwin.h @@ -75,10 +75,10 @@ class s_buffer { private: char* d_buffer; - UInt32 d_n_used, d_n_alloc; + size_t d_n_used, d_n_alloc; public: - inline s_buffer (UInt32 n_alloc = 0) { + inline s_buffer (size_t n_alloc = 0) { d_n_used = 0; d_n_alloc = n_alloc; if (n_alloc) { @@ -92,11 +92,11 @@ public: delete [] d_buffer; } }; - inline UInt32 n_used () { return (d_n_used); }; - inline void n_used (UInt32 bufLen) { + inline size_t n_used () { return (d_n_used); }; + inline void n_used (size_t bufLen) { d_n_used = (bufLen > d_n_alloc) ? d_n_alloc : bufLen; }; - inline UInt32 n_alloc () { return (d_n_alloc); }; - void buffer (char* l_buffer, UInt32 bufLen) { + inline size_t n_alloc () { return (d_n_alloc); }; + void buffer (char* l_buffer, size_t bufLen) { if (bufLen > d_n_alloc) { fprintf (stderr, "s_buffer::set: Copying only allocated bytes.\n"); bufLen = d_n_alloc; @@ -173,7 +173,7 @@ public: usb_interface_t* d_interface; s_queue_ptr d_queue; circular_buffer* d_buffer; - UInt32 d_bufLenBytes; + size_t d_bufLenBytes; mld_mutex_ptr d_readRunning; mld_condition_ptr d_runBlock, d_readBlock; -- cgit From 5d311c58cb66a5132bc5978ef7ccf109ea58f66e Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 19 Oct 2009 10:21:33 -0400 Subject: moved all 'fprintf (stderr, ...)' calls to std::cerr, for 'universal' OSX printing of long and pointer types --- usrp/host/lib/fusb_darwin.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usrp/host/lib/fusb_darwin.h') diff --git a/usrp/host/lib/fusb_darwin.h b/usrp/host/lib/fusb_darwin.h index 63016648b..735e5f16d 100644 --- a/usrp/host/lib/fusb_darwin.h +++ b/usrp/host/lib/fusb_darwin.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -98,11 +98,11 @@ public: inline size_t n_alloc () { return (d_n_alloc); }; void buffer (char* l_buffer, size_t bufLen) { if (bufLen > d_n_alloc) { - fprintf (stderr, "s_buffer::set: Copying only allocated bytes.\n"); + std::cerr << "s_buffer::set: Copying only allocated bytes." << std::endl; bufLen = d_n_alloc; } if (!l_buffer) { - fprintf (stderr, "s_buffer::set: NULL buffer.\n"); + std::cerr << "s_buffer::set: NULL buffer." << std::endl; return; } bcopy (l_buffer, d_buffer, bufLen); -- cgit