Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
70cc1a08
Commit
70cc1a08
authored
Dec 28, 2005
by
stewart@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build fixes for azio on systems without zutil.h
parent
cac298e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
storage/archive/azio.c
storage/archive/azio.c
+6
-5
storage/archive/azlib.h
storage/archive/azlib.h
+0
-1
No files found.
storage/archive/azio.c
View file @
70cc1a08
...
...
@@ -12,6 +12,7 @@
/* @(#) $Id$ */
#include <stdio.h>
#include <string.h>
#include "azlib.h"
...
...
@@ -51,8 +52,8 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
s
->
stream
.
zalloc
=
(
alloc_func
)
0
;
s
->
stream
.
zfree
=
(
free_func
)
0
;
s
->
stream
.
opaque
=
(
voidpf
)
0
;
zmemzero
(
s
->
inbuf
,
Z_BUFSIZE
);
zmemzero
(
s
->
outbuf
,
Z_BUFSIZE
);
memset
(
s
->
inbuf
,
0
,
Z_BUFSIZE
);
memset
(
s
->
outbuf
,
0
,
Z_BUFSIZE
);
s
->
stream
.
next_in
=
s
->
inbuf
;
s
->
stream
.
next_out
=
s
->
outbuf
;
s
->
stream
.
avail_in
=
s
->
stream
.
avail_out
=
0
;
...
...
@@ -73,7 +74,7 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
err
=
Z_STREAM_ERROR
;
#else
err
=
deflateInit2
(
&
(
s
->
stream
),
level
,
Z_DEFLATED
,
-
MAX_WBITS
,
DEF_MEM_LEVEL
,
strategy
);
Z_DEFLATED
,
-
MAX_WBITS
,
8
,
strategy
);
/* windowBits is passed < 0 to suppress zlib header */
s
->
stream
.
next_out
=
s
->
outbuf
;
...
...
@@ -114,7 +115,7 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
/* Write a very simple .gz header:
*/
snprintf
(
buffer
,
10
,
"%c%c%c%c%c%c%c%c%c%c"
,
gz_magic
[
0
],
gz_magic
[
1
],
Z_DEFLATED
,
0
/*flags*/
,
0
,
0
,
0
,
0
/*time*/
,
0
/*xflags*/
,
OS_CODE
);
Z_DEFLATED
,
0
/*flags*/
,
0
,
0
,
0
,
0
/*time*/
,
0
/*xflags*/
,
0x03
);
s
->
start
=
10L
;
my_write
(
s
->
file
,
buffer
,
s
->
start
,
MYF
(
0
));
/* We use 10L instead of ftell(s->file) to because ftell causes an
...
...
@@ -317,7 +318,7 @@ int ZEXPORT azread ( azio_stream *s, voidp buf, unsigned len)
uInt
n
=
s
->
stream
.
avail_in
;
if
(
n
>
s
->
stream
.
avail_out
)
n
=
s
->
stream
.
avail_out
;
if
(
n
>
0
)
{
z
memcpy
(
s
->
stream
.
next_out
,
s
->
stream
.
next_in
,
n
);
memcpy
(
s
->
stream
.
next_out
,
s
->
stream
.
next_in
,
n
);
next_out
+=
n
;
s
->
stream
.
next_out
=
(
Bytef
*
)
next_out
;
s
->
stream
.
next_in
+=
n
;
...
...
storage/archive/azlib.h
View file @
70cc1a08
...
...
@@ -31,7 +31,6 @@
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
*/
#include <zutil.h>
#include <zlib.h>
#include "../../mysys/mysys_priv.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment