Skip to content

Commit b5859eb

Browse files
authored
Merge pull request #383 from PatriceJiang/v3-update-unzip-extern-macro
fix export unzip symbols
2 parents edaecd1 + d53a579 commit b5859eb

File tree

2 files changed

+70
-70
lines changed

2 files changed

+70
-70
lines changed

unzip/unzip.cpp

+35-35
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static unzFile unzOpenInternal(const void *path, zlib_filefunc64_32_def *pzlib_f
500500
return (unzFile)s;
501501
}
502502

503-
extern unzFile ZEXPORT unzOpen2(const char *path, zlib_filefunc_def *pzlib_filefunc32_def)
503+
ZEXTERN unzFile ZEXPORT unzOpen2(const char *path, zlib_filefunc_def *pzlib_filefunc32_def)
504504
{
505505
if (pzlib_filefunc32_def != NULL)
506506
{
@@ -511,7 +511,7 @@ extern unzFile ZEXPORT unzOpen2(const char *path, zlib_filefunc_def *pzlib_filef
511511
return unzOpenInternal(path, NULL);
512512
}
513513

514-
extern unzFile ZEXPORT unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def)
514+
ZEXTERN unzFile ZEXPORT unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def)
515515
{
516516
if (pzlib_filefunc_def != NULL)
517517
{
@@ -524,17 +524,17 @@ extern unzFile ZEXPORT unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_
524524
return unzOpenInternal(path, NULL);
525525
}
526526

527-
extern unzFile ZEXPORT unzOpen(const char *path)
527+
ZEXTERN unzFile ZEXPORT unzOpen(const char *path)
528528
{
529529
return unzOpenInternal(path, NULL);
530530
}
531531

532-
extern unzFile ZEXPORT unzOpen64(const void *path)
532+
ZEXTERN unzFile ZEXPORT unzOpen64(const void *path)
533533
{
534534
return unzOpenInternal(path, NULL);
535535
}
536536

537-
extern int ZEXPORT unzClose(unzFile file)
537+
ZEXTERN int ZEXPORT unzClose(unzFile file)
538538
{
539539
unz64_internal *s;
540540
if (file == NULL)
@@ -598,7 +598,7 @@ static int unzGoToNextDisk(unzFile file)
598598
return UNZ_OK;
599599
}
600600

601-
extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32)
601+
ZEXTERN int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32)
602602
{
603603
unz64_internal *s = NULL;
604604
if (file == NULL)
@@ -611,7 +611,7 @@ extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info3
611611
return UNZ_OK;
612612
}
613613

614-
extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_info)
614+
ZEXTERN int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_info)
615615
{
616616
unz64_internal *s = NULL;
617617
if (file == NULL)
@@ -621,7 +621,7 @@ extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_i
621621
return UNZ_OK;
622622
}
623623

624-
extern int ZEXPORT unzGetGlobalComment(unzFile file, char *comment, uint16_t comment_size)
624+
ZEXTERN int ZEXPORT unzGetGlobalComment(unzFile file, char *comment, uint16_t comment_size)
625625
{
626626
unz64_internal *s = NULL;
627627
uint16_t bytes_to_read = comment_size;
@@ -897,7 +897,7 @@ static int unzGetCurrentFileInfoInternal(unzFile file, unz_file_info64 *pfile_in
897897
return err;
898898
}
899899

900-
extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, unz_file_info *pfile_info, char *filename,
900+
ZEXTERN int ZEXPORT unzGetCurrentFileInfo(unzFile file, unz_file_info *pfile_info, char *filename,
901901
uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size)
902902
{
903903
unz_file_info64 file_info64;
@@ -929,7 +929,7 @@ extern int ZEXPORT unzGetCurrentFileInfo(unzFile file, unz_file_info *pfile_info
929929
return err;
930930
}
931931

932-
extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file, unz_file_info64 * pfile_info, char *filename,
932+
ZEXTERN int ZEXPORT unzGetCurrentFileInfo64(unzFile file, unz_file_info64 * pfile_info, char *filename,
933933
uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size)
934934
{
935935
return unzGetCurrentFileInfoInternal(file, pfile_info, NULL, filename, filename_size,
@@ -1034,7 +1034,7 @@ static int unzCheckCurrentFileCoherencyHeader(unz64_internal *s, uint32_t *psize
10341034
Open for reading data the current file in the zipfile.
10351035
If there is no error and the file is opened, the return value is UNZ_OK.
10361036
*/
1037-
extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, int raw, const char *password)
1037+
ZEXTERN int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, int raw, const char *password)
10381038
{
10391039
unz64_internal *s = NULL;
10401040
file_in_zip64_read_info_s *pfile_in_zip_read_info = NULL;
@@ -1267,17 +1267,17 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int *method, int *level, in
12671267
return UNZ_OK;
12681268
}
12691269

1270-
extern int ZEXPORT unzOpenCurrentFile(unzFile file)
1270+
ZEXTERN int ZEXPORT unzOpenCurrentFile(unzFile file)
12711271
{
12721272
return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
12731273
}
12741274

1275-
extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char *password)
1275+
ZEXTERN int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char *password)
12761276
{
12771277
return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
12781278
}
12791279

1280-
extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int *method, int *level, int raw)
1280+
ZEXTERN int ZEXPORT unzOpenCurrentFile2(unzFile file, int *method, int *level, int raw)
12811281
{
12821282
return unzOpenCurrentFile3(file, method, level, raw, NULL);
12831283
}
@@ -1289,7 +1289,7 @@ extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int *method, int *level, in
12891289
return the number of byte copied if some bytes are copied
12901290
return 0 if the end of file was reached
12911291
return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */
1292-
extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, uint32_t len)
1292+
ZEXTERN int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, uint32_t len)
12931293
{
12941294
unz64_internal *s = NULL;
12951295
uint32_t read = 0;
@@ -1564,7 +1564,7 @@ extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, uint32_t len)
15641564
return err;
15651565
}
15661566

1567-
extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, uint32_t len)
1567+
ZEXTERN int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, uint32_t len)
15681568
{
15691569
unz64_internal *s = NULL;
15701570
uint64_t size_to_read = 0;
@@ -1600,7 +1600,7 @@ extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, uint32_t len)
16001600
return (int)read_now;
16011601
}
16021602

1603-
extern int ZEXPORT unzCloseCurrentFile(unzFile file)
1603+
ZEXTERN int ZEXPORT unzCloseCurrentFile(unzFile file)
16041604
{
16051605
unz64_internal *s = NULL;
16061606
file_in_zip64_read_info_s *pfile_in_zip_read_info = NULL;
@@ -1665,7 +1665,7 @@ extern int ZEXPORT unzCloseCurrentFile(unzFile file)
16651665
return err;
16661666
}
16671667

1668-
extern int ZEXPORT unzGoToFirstFile2(unzFile file, unz_file_info64 *pfile_info, char *filename,
1668+
ZEXTERN int ZEXPORT unzGoToFirstFile2(unzFile file, unz_file_info64 *pfile_info, char *filename,
16691669
uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size)
16701670
{
16711671
unz64_internal *s = NULL;
@@ -1691,12 +1691,12 @@ extern int ZEXPORT unzGoToFirstFile2(unzFile file, unz_file_info64 *pfile_info,
16911691
return err;
16921692
}
16931693

1694-
extern int ZEXPORT unzGoToFirstFile(unzFile file)
1694+
ZEXTERN int ZEXPORT unzGoToFirstFile(unzFile file)
16951695
{
16961696
return unzGoToFirstFile2(file, NULL, NULL, 0, NULL, 0, NULL, 0);
16971697
}
16981698

1699-
extern int ZEXPORT unzGoToNextFile2(unzFile file, unz_file_info64 *pfile_info, char *filename,
1699+
ZEXTERN int ZEXPORT unzGoToNextFile2(unzFile file, unz_file_info64 *pfile_info, char *filename,
17001700
uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size)
17011701
{
17021702
unz64_internal *s = NULL;
@@ -1728,12 +1728,12 @@ extern int ZEXPORT unzGoToNextFile2(unzFile file, unz_file_info64 *pfile_info, c
17281728
return err;
17291729
}
17301730

1731-
extern int ZEXPORT unzGoToNextFile(unzFile file)
1731+
ZEXTERN int ZEXPORT unzGoToNextFile(unzFile file)
17321732
{
17331733
return unzGoToNextFile2(file, NULL, NULL, 0, NULL, 0, NULL, 0);
17341734
}
17351735

1736-
extern int ZEXPORT unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func)
1736+
ZEXTERN int ZEXPORT unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func)
17371737
{
17381738
unz64_internal *s = NULL;
17391739
unz_file_info64 cur_file_info_saved;
@@ -1778,7 +1778,7 @@ extern int ZEXPORT unzLocateFile(unzFile file, const char *filename, unzFileName
17781778
return err;
17791779
}
17801780

1781-
extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos *file_pos)
1781+
ZEXTERN int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos *file_pos)
17821782
{
17831783
unz64_file_pos file_pos64;
17841784
int err = unzGetFilePos64(file, &file_pos64);
@@ -1790,7 +1790,7 @@ extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos *file_pos)
17901790
return err;
17911791
}
17921792

1793-
extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos *file_pos)
1793+
ZEXTERN int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos *file_pos)
17941794
{
17951795
unz64_file_pos file_pos64;
17961796
if (file_pos == NULL)
@@ -1800,7 +1800,7 @@ extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos *file_pos)
18001800
return unzGoToFilePos64(file, &file_pos64);
18011801
}
18021802

1803-
extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
1803+
ZEXTERN int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
18041804
{
18051805
unz64_internal *s = NULL;
18061806

@@ -1815,7 +1815,7 @@ extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
18151815
return UNZ_OK;
18161816
}
18171817

1818-
extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos)
1818+
ZEXTERN int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos)
18191819
{
18201820
unz64_internal *s = NULL;
18211821
int err = UNZ_OK;
@@ -1835,7 +1835,7 @@ extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos
18351835
return err;
18361836
}
18371837

1838-
extern int32_t ZEXPORT unzGetOffset(unzFile file)
1838+
ZEXTERN int32_t ZEXPORT unzGetOffset(unzFile file)
18391839
{
18401840
uint64_t offset64 = 0;
18411841

@@ -1845,7 +1845,7 @@ extern int32_t ZEXPORT unzGetOffset(unzFile file)
18451845
return (int32_t)offset64;
18461846
}
18471847

1848-
extern int64_t ZEXPORT unzGetOffset64(unzFile file)
1848+
ZEXTERN int64_t ZEXPORT unzGetOffset64(unzFile file)
18491849
{
18501850
unz64_internal *s = NULL;
18511851

@@ -1862,12 +1862,12 @@ extern int64_t ZEXPORT unzGetOffset64(unzFile file)
18621862
return s->pos_in_central_dir;
18631863
}
18641864

1865-
extern int ZEXPORT unzSetOffset(unzFile file, uint32_t pos)
1865+
ZEXTERN int ZEXPORT unzSetOffset(unzFile file, uint32_t pos)
18661866
{
18671867
return unzSetOffset64(file, pos);
18681868
}
18691869

1870-
extern int ZEXPORT unzSetOffset64(unzFile file, uint64_t pos)
1870+
ZEXTERN int ZEXPORT unzSetOffset64(unzFile file, uint64_t pos)
18711871
{
18721872
unz64_internal *s = NULL;
18731873
int err = UNZ_OK;
@@ -1884,7 +1884,7 @@ extern int ZEXPORT unzSetOffset64(unzFile file, uint64_t pos)
18841884
return err;
18851885
}
18861886

1887-
extern int32_t ZEXPORT unzTell(unzFile file)
1887+
ZEXTERN int32_t ZEXPORT unzTell(unzFile file)
18881888
{
18891889
unz64_internal *s = NULL;
18901890
if (file == NULL)
@@ -1895,7 +1895,7 @@ extern int32_t ZEXPORT unzTell(unzFile file)
18951895
return (int32_t)s->pfile_in_zip_read->stream.total_out;
18961896
}
18971897

1898-
extern int64_t ZEXPORT unzTell64(unzFile file)
1898+
ZEXTERN int64_t ZEXPORT unzTell64(unzFile file)
18991899
{
19001900
unz64_internal *s = NULL;
19011901
if (file == NULL)
@@ -1906,12 +1906,12 @@ extern int64_t ZEXPORT unzTell64(unzFile file)
19061906
return s->pfile_in_zip_read->total_out_64;
19071907
}
19081908

1909-
extern int ZEXPORT unzSeek(unzFile file, uint32_t offset, int origin)
1909+
ZEXTERN int ZEXPORT unzSeek(unzFile file, uint32_t offset, int origin)
19101910
{
19111911
return unzSeek64(file, offset, origin);
19121912
}
19131913

1914-
extern int ZEXPORT unzSeek64(unzFile file, uint64_t offset, int origin)
1914+
ZEXTERN int ZEXPORT unzSeek64(unzFile file, uint64_t offset, int origin)
19151915
{
19161916
unz64_internal *s = NULL;
19171917
uint64_t stream_pos_begin = 0;
@@ -1974,7 +1974,7 @@ extern int ZEXPORT unzSeek64(unzFile file, uint64_t offset, int origin)
19741974
return UNZ_OK;
19751975
}
19761976

1977-
extern int ZEXPORT unzEndOfFile(unzFile file)
1977+
ZEXTERN int ZEXPORT unzEndOfFile(unzFile file)
19781978
{
19791979
unz64_internal *s = NULL;
19801980
if (file == NULL)

0 commit comments

Comments
 (0)