Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update #defines for thread portability and large files.
  • Loading branch information
madler committed Jan 8, 2012
1 parent c84581f commit aff2f54
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions pigz.c
Expand Up @@ -134,6 +134,7 @@
Reduce the number of input buffers
Change initial rsyncable hash to comparison value
Improve the efficiency of arriving at a byte boundary
Add thread portability #defines from yarn.c
*/

#define VERSION "pigz 2.2.3\n"
Expand Down Expand Up @@ -268,6 +269,11 @@
input buffers to about the same number.
*/

/* for thread portability */
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#define _THREAD_SAFE

/* use large file functions if available */
#define _FILE_OFFSET_BITS 64

Expand Down
14 changes: 10 additions & 4 deletions 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.2 8 Jan 2012 Mark Adler
* For conditions of distribution and use, see copyright notice in yarn.h
*/

Expand All @@ -13,11 +13,17 @@
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 8 Jan 2012 Add large file #define for consistency with pigz.c
Update thread portability #defines per IEEE 1003.1-2008
*/

/* 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 <stdio.h> /* fprintf(), stderr */
Expand Down
4 changes: 2 additions & 2 deletions yarn.h
@@ -1,6 +1,6 @@
/* yarn.h -- generic interface for thread operations
* Copyright (C) 2008 Mark Adler
* Version 1.1 26 Oct 2008 Mark Adler
* Copyright (C) 2008, 2011 Mark Adler
* Version 1.2 8 Jan 2012 Mark Adler
*/

/*
Expand Down

0 comments on commit aff2f54

Please sign in to comment.