]> granicus.if.org Git - zziplib/commitdiff
introduce zzip/__errno.h to help with missing EBADMSG
authorGuido Draheim <guidod@gmx.de>
Mon, 12 Jun 2017 01:04:16 +0000 (03:04 +0200)
committerGuido Draheim <guidod@gmx.de>
Mon, 12 Jun 2017 01:04:16 +0000 (03:04 +0200)
ChangeLog
zzip/Makefile.am
zzip/Makefile.in
zzip/__errno.h [new file with mode: 0644]
zzip/fseeko.c
zzip/memdisk.c
zzip/mmapped.c

index 47129a3046b369719597abf8d7e695fbb9e6bcbc..8397850d1591e6f8bea107eabd72d6b3cbf34501 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 
 2017-06-11  guidod  <guidod@gmx.de>
+    * fix portability issues by introducing <zzip/__errno.h>
     * fix portability issues by introducing <zzip/__mkdir.h>
     * fix portability issues by introducing <zzip/__string.h> for strndup
     * reuse portability header <zzip/__fnmatch.h> in bins/*.c
index b3c99125a840b88b8e42d3df48771c964600d305..5f333fbea618f7898d0256676348a24c53b78494 100644 (file)
@@ -8,7 +8,7 @@ zzipdir = ${includedir}/zzip
 zzip_HEADERS = $(libzzip_la_headers) \
                $(libzzipmmapped_la_headers) \
                $(libzzipfseeko_la_headers)
-noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h
+noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h __errno.h
 #
 VERSION_INFO=@VERSION_INFO@
 RELEASE_INFO=@RELEASE_INFO@
index 3d76e350746a83f4dafef69804df5968ba7eaf0b..8a835ab1bc774806d59ad95236eb716c8f9388b9 100644 (file)
@@ -397,7 +397,7 @@ zzip_HEADERS = $(libzzip_la_headers) \
                $(libzzipmmapped_la_headers) \
                $(libzzipfseeko_la_headers)
 
-noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h
+noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h __errno.h
 #
 libzzip_la_SOURCES = \
        zip.c \
diff --git a/zzip/__errno.h b/zzip/__errno.h
new file mode 100644 (file)
index 0000000..d66ac3f
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __ZZIP_INTERNAL_ERRNO_H
+#define __ZZIP_INTERNAL_ERRNO_H
+
+#include <errno.h>
+
+/* Mingw cross compile fix */
+#ifndef EBADMSG
+#define EBADMSG 74
+#endif
+
+#endif
index d3eb42ddce665ea93fb2a9be3af8865da729950b..9627ecb6b2b7fdfcf0eb22d0fb407b07f2a690ea 100644 (file)
@@ -35,6 +35,7 @@
 #include <zzip/fetch.h>
 #include <zzip/__mmap.h>
 #include <zzip/__fnmatch.h>
+#include <zzip/__errno.h>
 
 #include <stdlib.h>
 #include <sys/stat.h>
index 67e6570c7fb7a0bd98237a24ea47c46233586060..88d11c99cb67492ded9479c02cef815c17889955 100644 (file)
@@ -33,6 +33,7 @@
 #include <zzip/mmapped.h>
 #include <zzip/memdisk.h>
 #include <zzip/__fnmatch.h>
+#include <zzip/__errno.h>
 
 #define ___ {
 #define ____ }
index 69070dfccefa999aade07fe5b275b69271d212be..325c41a1ac27486d2ad75f67bfc8834c6d6e186e 100644 (file)
@@ -32,8 +32,9 @@
 #include <zzip/fetch.h>
 #include <zzip/__debug.h>
 #include <zzip/__mmap.h>
-#include <zzip/__fnmatch.h>
 #include <zzip/__string.h>
+#include <zzip/__fnmatch.h>
+#include <zzip/__errno.h>
 
 #include <stdlib.h>
 #include <sys/stat.h>