Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
libretro-gme
Commits
c9afdb29
Commit
c9afdb29
authored
Oct 09, 2021
by
Libretro-Admin
Browse files
Simplify minizip
parent
043039ef
Pipeline
#58295
passed with stages
in 1 minute and 6 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
deps/zlib-1.2.8/adler32.c
View file @
c9afdb29
...
...
@@ -7,10 +7,6 @@
#include "zutil.h"
#define local static
local
uLong
adler32_combine_
OF
((
uLong
adler1
,
uLong
adler2
,
z_off64_t
len2
));
#define BASE 65521
/* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
...
...
deps/zlib-1.2.8/contrib/minizip/ioapi.c
View file @
c9afdb29
...
...
@@ -14,24 +14,6 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#if defined(__APPLE__) || defined(IOAPI_NO_64)
#if defined(_MSC_VER) && _MSC_VER <= 1310
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftell(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
#else
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftello(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
#endif
#else
#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
#define FTELLO_FUNC(stream) ftello64(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
#endif
#include "ioapi.h"
voidpf
call_zopen64
(
const
zlib_filefunc64_32_def
*
pfilefunc
,
const
void
*
filename
,
int
mode
)
...
...
@@ -130,7 +112,7 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename,
mode_fopen
=
"wb"
;
if
((
filename
!=
NULL
)
&&
(
mode_fopen
!=
NULL
))
file
=
FOPEN_FUNC
((
const
char
*
)
filename
,
mode_fopen
);
file
=
fopen
((
const
char
*
)
filename
,
mode_fopen
);
return
file
;
}
...
...
@@ -159,9 +141,7 @@ static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
static
ZPOS64_T
ZCALLBACK
ftell64_file_func
(
voidpf
opaque
,
voidpf
stream
)
{
ZPOS64_T
ret
;
ret
=
FTELLO_FUNC
((
FILE
*
)
stream
);
return
ret
;
return
ftell
((
FILE
*
)
stream
);
}
static
long
ZCALLBACK
fseek_file_func
(
voidpf
opaque
,
voidpf
stream
,
uLong
offset
,
int
origin
)
...
...
@@ -206,7 +186,7 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
}
ret
=
0
;
if
(
FSEEKO_FUNC
((
FILE
*
)
stream
,
offset
,
fseek_origin
)
!=
0
)
if
(
fseek
((
FILE
*
)
stream
,
offset
,
fseek_origin
)
!=
0
)
ret
=
-
1
;
return
ret
;
...
...
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