From 3bde123df8673b236fb554fac71d6d53cf67b629 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Sat, 22 Sep 2012 08:10:28 -0400 Subject: Update pigz to 2.2.5 source code --- pigz/yarn.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'pigz/yarn.c') diff --git a/pigz/yarn.c b/pigz/yarn.c index 0562e7010..5e557f3f1 100644 --- a/pigz/yarn.c +++ b/pigz/yarn.c @@ -1,6 +1,6 @@ /* yarn.c -- generic thread operations implemented using pthread functions - * Copyright (C) 2008 Mark Adler - * Version 1.1 26 Oct 2008 Mark Adler + * Copyright (C) 2008, 2012 Mark Adler + * Version 1.3 13 Jan 2012 Mark Adler * For conditions of distribution and use, see copyright notice in yarn.h */ @@ -13,11 +13,19 @@ 1.0 19 Oct 2008 First version 1.1 26 Oct 2008 No need to set the stack size -- remove Add yarn_abort() function for clean-up on error exit + 1.2 19 Dec 2011 (changes reversed in 1.3) + 1.3 13 Jan 2012 Add large file #define for consistency with pigz.c + Update thread portability #defines per IEEE 1003.1-2008 + Fix documentation in yarn.h for yarn_prefix */ /* for thread portability */ -#define _POSIX_PTHREAD_SEMANTICS -#define _REENTRANT +#define _XOPEN_SOURCE 700 +#define _POSIX_C_SOURCE 200809L +#define _THREAD_SAFE + +/* use large file functions if available */ +#define _FILE_OFFSET_BITS 64 /* external libraries and entities referenced */ #include /* fprintf(), stderr */ @@ -199,6 +207,8 @@ local void reenter(void *dummy) thread *match, **prior; pthread_t me; + (void)dummy; + /* find this thread in the threads list by matching the thread id */ me = pthread_self(); possess(&(threads_lock)); -- cgit v1.2.3