#! /bin/sh
-# From configure.ac Revision: 1.4 .
+# From configure.ac Revision: 1.5 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
echo "${ECHO_T}no" >&6
fi
-ax_enable_builddir_auxdir="$ac_aux_dir" ; test ".$ax_enable_builddir_auxdir" = "." && ax_enable_builddir_auxdir="."
+ax_enable_builddir_auxdir="$ac_aux_dir"
ax_enable_builddir_auxdir=`echo "$ax_enable_builddir_auxdir" | $ax_enable_builddir_sed -e "s|$ac_top_srcdir|.|"`
+test ".$ax_enable_builddir_auxdir" = "." && ax_enable_builddir_auxdir="$ac_aux_dir"
+test ".$ax_enable_builddir_auxdir" = "." && ax_enable_builddir_auxdir="."
ac_config_commands="$ac_config_commands buildir"
# --------------------------------------------
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4372 "configure"' > conftest.$ac_ext
+ echo '#line 4374 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
# Provide some information about the compiler.
-echo "$as_me:6193:" \
+echo "$as_me:6195:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7291: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7293: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7295: \$? = $ac_status" >&5
+ echo "$as_me:7297: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7553: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7555: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7557: \$? = $ac_status" >&5
+ echo "$as_me:7559: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7615: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7617: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7619: \$? = $ac_status" >&5
+ echo "$as_me:7621: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9855 "configure"
+#line 9857 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9953 "configure"
+#line 9955 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12201: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12203: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12205: \$? = $ac_status" >&5
+ echo "$as_me:12207: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12263: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12265: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12267: \$? = $ac_status" >&5
+ echo "$as_me:12269: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13632 "configure"
+#line 13634 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13730 "configure"
+#line 13732 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14615: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14617: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14619: \$? = $ac_status" >&5
+ echo "$as_me:14621: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14677: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14679: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14681: \$? = $ac_status" >&5
+ echo "$as_me:14683: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16799: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16801: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16803: \$? = $ac_status" >&5
+ echo "$as_me:16805: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17061: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17063: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17065: \$? = $ac_status" >&5
+ echo "$as_me:17067: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17123: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17125: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17127: \$? = $ac_status" >&5
+ echo "$as_me:17129: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 19363 "configure"
+#line 19365 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 19461 "configure"
+#line 19463 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
int
zzip_file_close(ZZIP_FILE * fp)
{
+ auto int self;
ZZIP_DIR * dir = fp->dir;
if (fp->method)
inflateEnd(&fp->d_stream); /* inflateEnd() can be called many times */
+ if (dir->cache.locked == NULL)
+ dir->cache.locked = &self;
+
if (fp->buf32k)
{
- if (dir->cache.buf32k == NULL) dir->cache.buf32k = fp->buf32k;
+ if (dir->cache.locked == &self &&
+ dir->cache.buf32k == NULL) dir->cache.buf32k = fp->buf32k;
else free(fp->buf32k);
}
/* ease to notice possible dangling reference errors */
memset(fp, 0, sizeof(*fp));
- if (dir->cache.fp == NULL) dir->cache.fp = fp;
+ if (dir->cache.locked == &self &&
+ dir->cache.fp == NULL) dir->cache.fp = fp;
else free(fp);
+
+ if (dir->cache.locked == &self)
+ dir->cache.locked = NULL;
if (! dir->refcount) return zzip_dir_close(dir); else return 0;
}
ZZIP_FILE *
zzip_file_open(ZZIP_DIR * dir, zzip_char_t* name, int o_mode)
{
+ auto int self;
zzip_error_t err = 0;
struct zzip_file * fp = 0;
struct zzip_dir_hdr * hdr = dir->hdr0;
{ err = ZZIP_UNSUPP_COMPR; goto error; }
}
- if (dir->cache.fp)
+ if (dir->cache.locked == NULL)
+ dir->cache.locked = &self;
+
+ if (dir->cache.locked == &self &&
+ dir->cache.fp)
{
fp = dir->cache.fp; dir->cache.fp = NULL;
/* memset(zfp, 0, sizeof *fp); cleared in zzip_file_close() */
fp->io = dir->io;
dir->refcount++;
- if (dir->cache.buf32k)
+ if (dir->cache.locked == &self &&
+ dir->cache.buf32k)
{ fp->buf32k = dir->cache.buf32k; dir->cache.buf32k = NULL; }
else
{
{ err = ZZIP_OUTOFMEM; goto error; }
}
+ if (dir->cache.locked == &self)
+ dir->cache.locked = NULL;
/*
* In order to support simultaneous open files in one zip archive
* we'll fix the fd offset when opening new file/changing which