Skip to content

Commit

Permalink
zlib 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchang committed Sep 6, 2023
1 parent fddc1bd commit 5e9f5cb
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 240 deletions.
6 changes: 3 additions & 3 deletions 1.9/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ifeq ($(SYS), MAC)
CXXFLAGS += $(MACFLAGS)
BLASFLAGS ?= -framework Accelerate
LDFLAGS ?= -ldl
ZLIB ?= -L. ../zlib-1.2.13/libz.a
ZLIB ?= -L. ../zlib-1.3/libz.a
endif
ifeq ($(SYS), WIN)
Expand All @@ -58,13 +58,13 @@ ifeq ($(SYS), WIN)
# NO_LAPACK.
BLASFLAGS ?= -L. lapack/liblapack.a -L. lapack/librefblas.a
LDFLAGS ?= -lm -static-libgcc
ZLIB ?= -L. ../zlib-1.2.13/libz.a
ZLIB ?= -L. ../zlib-1.3/libz.a
endif
# These must appear after the MAC/WIN-specific ?= statements.
BLASFLAGS ?= -L/usr/lib64/atlas -llapack -lblas -lcblas -latlas
LDFLAGS ?= -lm -lpthread -ldl
ZLIB ?= -L. ../zlib-1.2.13/libz.so.1.2.13
ZLIB ?= -L. ../zlib-1.3/libz.so.1.3
ifdef NO_LAPACK
BLASFLAGS=
Expand Down
106 changes: 0 additions & 106 deletions 1.9/Makefile.old

This file was deleted.

104 changes: 0 additions & 104 deletions 1.9/Makefile.std

This file was deleted.

4 changes: 2 additions & 2 deletions 1.9/build_mac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ifeq ($(SYS), MAC)
CXXFLAGS += $(MACFLAGS)
BLASFLAGS ?= -framework Accelerate
LDFLAGS ?= -ldl
ZLIB_AMD ?= -L. ../../zlib-1.2.13/libz-amd64.a
ZLIB_ARM ?= -L. ../../zlib-1.2.13/libz-arm64.a
ZLIB_AMD ?= -L. ../../zlib-1.3/libz-amd64.a
ZLIB_ARM ?= -L. ../../zlib-1.3/libz-arm64.a
endif
CCSRC = plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_perm.c plink_rserve.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c Rconnection.cc hfile.c bgzf.c
Expand Down
2 changes: 1 addition & 1 deletion 1.9/dose2plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#endif
#endif

#include "../zlib-1.2.13/zlib.h"
#include "../zlib-1.3/zlib.h"

#ifdef __APPLE__
#include <sys/sysctl.h>
Expand Down
4 changes: 2 additions & 2 deletions 1.9/pigz.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
#ifdef DYNAMIC_ZLIB
#include <zlib.h>
#else
#include "../zlib-1.2.13/zlib.h"
#include "../zlib-1.3/zlib.h"
#endif

#include "pigz.h"
Expand Down Expand Up @@ -526,7 +526,7 @@ int32_t flex_pzwrite_close_null(Pigz_state* ps_ptr, char* writep) {
#ifdef DYNAMIC_ZLIB
#include <zlib.h>
#else
#include "../zlib-1.2.13/zlib.h" /* deflateInit2(), deflateReset(), deflate(), */
#include "../zlib-1.3/zlib.h" /* deflateInit2(), deflateReset(), deflate(), */
/* deflateEnd(), deflateSetDictionary(), crc32(),
inflateBackInit(), inflateBack(), inflateBackEnd(),
Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY,
Expand Down
4 changes: 2 additions & 2 deletions 1.9/plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ static const char ver_str[] =
#else
" 32-bit"
#endif
" (13 Feb 2023)";
" (6 Sep 2023)";
static const char ver_str2[] =
// include leading space if day < 10, so character length stays the same
""
" "
#ifdef STABLE_BUILD
" " // (don't want this when version number has two trailing digits)
#else
Expand Down
15 changes: 6 additions & 9 deletions 1.9/plink_calc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5442,7 +5442,6 @@ int32_t rel_cutoff_batch(uint32_t load_grm_bin, char* grmname, char* outname, ch
uint32_t uii;
uint32_t row;
uint32_t col;
uint32_t new_row;
uint32_t pct;
uintptr_t sample_idx;
int32_t* rel_ct_arr;
Expand Down Expand Up @@ -5862,7 +5861,6 @@ int32_t rel_cutoff_batch(uint32_t load_grm_bin, char* grmname, char* outname, ch
pct = 1;
row = 0;
col = 0;
new_row = 1;
progress = 0;
hundredth = 1 + ((((uint64_t)sample_ct) * (sample_ct - 1)) / 200);
memcpy(outname_end, ".grm.N.bin", 11);
Expand Down Expand Up @@ -5923,7 +5921,6 @@ int32_t rel_cutoff_batch(uint32_t load_grm_bin, char* grmname, char* outname, ch
}
}
}
new_row++;
}
row++;
progress += row;
Expand Down Expand Up @@ -6700,7 +6697,7 @@ int32_t calc_rel(pthread_t* threads, uint32_t parallel_idx, uint32_t parallel_to
}
strcpy(outname_end, ".rel.bin");
if (parallel_tot > 1) {
sprintf(&(outname_end[8]), ".%u", parallel_idx + 1);
snprintf(&(outname_end[8]), MAX_POST_EXT - 8, ".%u", parallel_idx + 1);
}
if (fopen_checked(outname, FOPEN_WB, &outfile)) {
goto calc_rel_ret_OPEN_FAIL;
Expand Down Expand Up @@ -6793,7 +6790,7 @@ int32_t calc_rel(pthread_t* threads, uint32_t parallel_idx, uint32_t parallel_to
// make this .rel.bin4?
strcpy(outname_end, ".rel.bin");
if (parallel_tot > 1) {
sprintf(&(outname_end[8]), ".%u", parallel_idx + 1);
snprintf(&(outname_end[8]), MAX_POST_EXT - 8, ".%u", parallel_idx + 1);
}
if (fopen_checked(outname, FOPEN_WB, &outfile)) {
goto calc_rel_ret_OPEN_FAIL;
Expand Down Expand Up @@ -6857,7 +6854,7 @@ int32_t calc_rel(pthread_t* threads, uint32_t parallel_idx, uint32_t parallel_to
} else {
strcpy(outname_end, ".grm");
if (parallel_tot > 1) {
sprintf(&(outname_end[4]), ".%u", parallel_idx + 1);
snprintf(&(outname_end[4]), MAX_POST_EXT - 4, ".%u", parallel_idx + 1);
}
retval = write_uncompressed(outname, overflow_buf, 0, calc_rel_grm_emitn);
if (retval) {
Expand All @@ -6874,7 +6871,7 @@ int32_t calc_rel(pthread_t* threads, uint32_t parallel_idx, uint32_t parallel_to
} else {
strcpy(outname_end, ".rel");
if (parallel_tot > 1) {
sprintf(&(outname_end[4]), ".%u", parallel_idx + 1);
snprintf(&(outname_end[4]), MAX_POST_EXT - 4, ".%u", parallel_idx + 1);
}
}
if (rel_shape == REL_CALC_TRI) {
Expand Down Expand Up @@ -6938,7 +6935,7 @@ int32_t calc_rel(pthread_t* threads, uint32_t parallel_idx, uint32_t parallel_to
if (retval) {
goto calc_rel_ret_1;
}
sprintf(wptr, " , and IDs written to %s .\n", outname);
snprintf(wptr, LOGBUFLEN - (wptr - g_logbuf), " , and IDs written to %s .\n", outname);
} else {
snprintf(g_logbuf, LOGBUFLEN, "Relationship matrix component written to %s .\n", outname);
}
Expand Down Expand Up @@ -8066,7 +8063,7 @@ int32_t calc_distance(pthread_t* threads, uint32_t parallel_idx, uint32_t parall
if (retval) {
goto calc_distance_ret_1;
}
sprintf(wptr, " , and IDs to %s .\n", outname);
snprintf(wptr, LOGBUFLEN - (wptr - g_logbuf), " , and IDs to %s .\n", outname);
} else {
snprintf(g_logbuf, LOGBUFLEN, "Distances (proportions) written to %s .\n", outname);
}
Expand Down
2 changes: 1 addition & 1 deletion 1.9/plink_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
#error "zlib version 1.2.4 or later required."
#endif
#else
#include "../zlib-1.2.13/zlib.h"
#include "../zlib-1.3/zlib.h"
#endif
#include "SFMT.h"

Expand Down
Loading

0 comments on commit 5e9f5cb

Please sign in to comment.