Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/zmod fix dup definitions...
details: https://anonhg.NetBSD.org/src/rev/e1201d5237d1
branches: trunk
changeset: 345979:e1201d5237d1
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 18 21:41:08 2016 +0000
description:
fix dup definitions in module.
diffstat:
external/cddl/osnet/dist/uts/common/zmod/deflate.c | 2 +-
external/cddl/osnet/dist/uts/common/zmod/zconf.h | 7 +++++++
external/cddl/osnet/dist/uts/common/zmod/zlib.h | 2 +-
external/cddl/osnet/dist/uts/common/zmod/zutil.c | 2 +-
external/cddl/osnet/dist/uts/common/zmod/zutil.h | 4 +++-
5 files changed, 13 insertions(+), 4 deletions(-)
diffs (73 lines):
diff -r 0b7d2185b450 -r e1201d5237d1 external/cddl/osnet/dist/uts/common/zmod/deflate.c
--- a/external/cddl/osnet/dist/uts/common/zmod/deflate.c Sat Jun 18 20:27:55 2016 +0000
+++ b/external/cddl/osnet/dist/uts/common/zmod/deflate.c Sat Jun 18 21:41:08 2016 +0000
@@ -303,7 +303,7 @@
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
s->pending_buf == Z_NULL) {
s->status = FINISH_STATE;
- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ strm->msg = zError(Z_MEM_ERROR);
(void) deflateEnd (strm);
return Z_MEM_ERROR;
}
diff -r 0b7d2185b450 -r e1201d5237d1 external/cddl/osnet/dist/uts/common/zmod/zconf.h
--- a/external/cddl/osnet/dist/uts/common/zmod/zconf.h Sat Jun 18 20:27:55 2016 +0000
+++ b/external/cddl/osnet/dist/uts/common/zmod/zconf.h Sat Jun 18 21:41:08 2016 +0000
@@ -94,6 +94,13 @@
#define crc32 z_crc32
#define get_crc_table z_get_crc_table
#define zError z_zError
+#define _tr_flush_block z__tr_flush_block
+#define _length_code z__length_code
+#define inflate_fast z_inflate_fast
+#define _tr_stored_block z__tr_stored_block
+#define _dist_code z__dist_code
+#define _tr_init z__tr_init
+#define _tr_align z__tr_align
#define MAX_MEM_LEVEL 9
#define MAX_WBITS 15
diff -r 0b7d2185b450 -r e1201d5237d1 external/cddl/osnet/dist/uts/common/zmod/zlib.h
--- a/external/cddl/osnet/dist/uts/common/zmod/zlib.h Sat Jun 18 20:27:55 2016 +0000
+++ b/external/cddl/osnet/dist/uts/common/zmod/zlib.h Sat Jun 18 21:41:08 2016 +0000
@@ -90,7 +90,7 @@
uInt avail_out; /* remaining free space at next_out */
uLong total_out; /* total nb of bytes output so far */
- char *msg; /* last error message, NULL if no error */
+ const char *msg; /* last error message, NULL if no error */
struct internal_state FAR *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */
diff -r 0b7d2185b450 -r e1201d5237d1 external/cddl/osnet/dist/uts/common/zmod/zutil.c
--- a/external/cddl/osnet/dist/uts/common/zmod/zutil.c Sat Jun 18 20:27:55 2016 +0000
+++ b/external/cddl/osnet/dist/uts/common/zmod/zutil.c Sat Jun 18 21:41:08 2016 +0000
@@ -16,7 +16,7 @@
struct internal_state {int dummy;}; /* for buggy compilers */
#endif
-const char * const z_errmsg[10] = {
+static const char * const z_errmsg[10] = {
"need dictionary", /* Z_NEED_DICT 2 */
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
diff -r 0b7d2185b450 -r e1201d5237d1 external/cddl/osnet/dist/uts/common/zmod/zutil.h
--- a/external/cddl/osnet/dist/uts/common/zmod/zutil.h Sat Jun 18 20:27:55 2016 +0000
+++ b/external/cddl/osnet/dist/uts/common/zmod/zutil.h Sat Jun 18 21:41:08 2016 +0000
@@ -55,13 +55,15 @@
typedef ush FAR ushf;
typedef unsigned long ulg;
+#if 0
extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */
+#endif
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
+ return (strm->msg = zError(err), (err))
/* To be used only when the state is known to be valid */
/* common constants */
Home |
Main Index |
Thread Index |
Old Index