summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/zip/zconf.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-02-25 13:20:54 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-02-25 13:20:54 +0000
commit1a7dc2ed567b99a7193e526ad80d50d1e01c59cd (patch)
tree15ebf48d2b61b2dff79e8021109e71b46041f109 /plugins/FTPFileYM/src/zip/zconf.h
parent6c123a632af944aca0f7df7d46421cb1751ac4c5 (diff)
zlib now linked dinamicaly
git-svn-id: http://svn.miranda-ng.org/main/trunk@3766 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src/zip/zconf.h')
-rw-r--r--plugins/FTPFileYM/src/zip/zconf.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/plugins/FTPFileYM/src/zip/zconf.h b/plugins/FTPFileYM/src/zip/zconf.h
index 58880245c1..02ce56c431 100644
--- a/plugins/FTPFileYM/src/zip/zconf.h
+++ b/plugins/FTPFileYM/src/zip/zconf.h
@@ -315,10 +315,6 @@
# endif
#endif
-#ifdef HAVE_VISIBILITY_PRAGMA
-# define ZEXTERN __attribute__((visibility ("default"))) extern
-#endif
-
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
@@ -364,8 +360,21 @@ typedef uLong FAR uLongf;
# define Z_HAVE_UNISTD_H
#endif
-#ifdef Z_HAVE_UNISTD_H
+#ifdef STDC
# include <sys/types.h> /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
# include <unixio.h> /* for off_t */
@@ -375,19 +384,22 @@ typedef uLong FAR uLongf;
# endif
#endif
-#ifdef _LARGEFILE64_SOURCE
-# include <sys/types.h>
-#endif
-
#ifndef SEEK_SET
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
+
#ifndef z_off_t
# define z_off_t long
#endif
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+# define z_off64_t off64_t
+#else
+# define z_off64_t z_off_t
+#endif
+
#if defined(__OS400__)
# define NO_vsnprintf
#endif