diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-03-30 16:53:43 -0700 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-03-30 16:53:43 -0700 |
commit | 09d0312fbb466ce2457df94e314ba1348039138d (patch) | |
tree | 11a10ee3ba351220b5312956b6cb14750931aec7 /examples | |
parent | 500c64aef290348a1c833983b7297bdc3f3262c4 (diff) | |
download | libusb-09d0312fbb466ce2457df94e314ba1348039138d.tar.gz |
Xcode: Update project file
Add '-fvisibility=hidden' to the additional compiler flags of the libusb
target so that internal library symbols are hidden.
Add '-pthread' to the additional compiler flags of the targets that
directly use pthread functionality
Add the 'sam3u_benchmark' and 'testlibusb' targets so that all examples
are now built and fix build warnings that occur when building
'sam3u_benchmark'.
Fix target dependencies so that all targets are able to build without
issues.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sam3u_benchmark.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/sam3u_benchmark.c b/examples/sam3u_benchmark.c index 68c2d50..b362106 100644 --- a/examples/sam3u_benchmark.c +++ b/examples/sam3u_benchmark.c @@ -28,7 +28,7 @@ #include <errno.h> #include <signal.h> -#include <libusb.h> +#include "libusb.h" #define EP_DATA_IN 0x82 @@ -125,15 +125,15 @@ static int benchmark_in(uint8_t ep) static void measure(void) { struct timeval tv_stop; - unsigned int diff_msec; + unsigned long diff_msec; gettimeofday(&tv_stop, NULL); - diff_msec = (tv_stop.tv_sec - tv_start.tv_sec)*1000; - diff_msec += (tv_stop.tv_usec - tv_start.tv_usec)/1000; + diff_msec = (tv_stop.tv_sec - tv_start.tv_sec) * 1000L; + diff_msec += (tv_stop.tv_usec - tv_start.tv_usec) / 1000L; - printf("%lu transfers (total %lu bytes) in %u miliseconds => %lu bytes/sec\n", - num_xfer, num_bytes, diff_msec, (num_bytes*1000)/diff_msec); + printf("%lu transfers (total %lu bytes) in %lu miliseconds => %lu bytes/sec\n", + num_xfer, num_bytes, diff_msec, (num_bytes * 1000L) / diff_msec); } static void sig_hdlr(int signum) |