VirtualBox

Ignore:
Timestamp:
Jun 9, 2022 9:09:44 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151769
Message:

libs/zlib: Upgrade to 1.2.12, bugref:8515

Location:
trunk/src/libs/zlib-1.2.12
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/zlib-1.2.12

    • Property svn:mergeinfo
      •  

        old new  
        2020/branches/dsen/gui3/src/libs/zlib-1.2.11:79645-79692
        2121/trunk/src/src/libs/zlib-1.2.11:92342
         22/vendor/zlib/1.2.12:151751
         23/vendor/zlib/current:150724-151750
  • trunk/src/libs/zlib-1.2.12/contrib/minizip/minizip.c

    r76163 r95239  
    7272
    7373#ifdef _WIN32
    74 uLong filetime(f, tmzip, dt)
    75     char *f;                /* name of file to get info on */
     74static int filetime(f, tmzip, dt)
     75    const char *f;          /* name of file to get info on */
    7676    tm_zip *tmzip;             /* return value: access, modific. and creation times */
    7777    uLong *dt;             /* dostime */
     
    9595}
    9696#else
    97 #ifdef unix || __APPLE__
    98 uLong filetime(f, tmzip, dt)
    99     char *f;               /* name of file to get info on */
     97#if defined(unix) || defined(__APPLE__)
     98static int filetime(f, tmzip, dt)
     99    const char *f;         /* name of file to get info on */
    100100    tm_zip *tmzip;         /* return value: access, modific. and creation times */
    101101    uLong *dt;             /* dostime */
    102102{
     103  (void)dt;
    103104  int ret=0;
    104105  struct stat s;        /* results of stat() */
     
    109110  {
    110111    char name[MAXFILENAME+1];
    111     int len = strlen(f);
     112    size_t len = strlen(f);
    112113    if (len > MAXFILENAME)
    113114      len = MAXFILENAME;
     
    139140#else
    140141uLong filetime(f, tmzip, dt)
    141     char *f;                /* name of file to get info on */
     142    const char *f;          /* name of file to get info on */
    142143    tm_zip *tmzip;             /* return value: access, modific. and creation times */
    143144    uLong *dt;             /* dostime */
     
    151152
    152153
    153 int check_exist_file(filename)
     154static int check_exist_file(filename)
    154155    const char* filename;
    155156{
     
    164165}
    165166
    166 void do_banner()
     167static void do_banner()
    167168{
    168169    printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n");
     
    170171}
    171172
    172 void do_help()
     173static void do_help()
    173174{
    174175    printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \
     
    183184/* calculate the CRC32 of a file,
    184185   because to encrypt a file, we need known the CRC32 of the file before */
    185 int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
     186static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
    186187{
    187188   unsigned long calculate_crc=0;
     
    200201        {
    201202            err = ZIP_OK;
    202             size_read = (int)fread(buf,1,size_buf,fin);
     203            size_read = fread(buf,1,size_buf,fin);
    203204            if (size_read < size_buf)
    204205                if (feof(fin)==0)
     
    209210
    210211            if (size_read>0)
    211                 calculate_crc = crc32(calculate_crc,buf,size_read);
     212                calculate_crc = crc32_z(calculate_crc,buf,size_read);
    212213            total_read += size_read;
    213214
     
    222223}
    223224
    224 int isLargeFile(const char* filename)
     225static int isLargeFile(const char* filename)
    225226{
    226227  int largeFile = 0;
     
    230231  if(pFile != NULL)
    231232  {
    232     int n = FSEEKO_FUNC(pFile, 0, SEEK_END);
    233     pos = FTELLO_FUNC(pFile);
     233    FSEEKO_FUNC(pFile, 0, SEEK_END);
     234    pos = (ZPOS64_T)FTELLO_FUNC(pFile);
    234235
    235236                printf("File : %s is %lld bytes\n", filename, pos);
     
    256257    int zipok;
    257258    int err=0;
    258     int size_buf=0;
     259    size_t size_buf=0;
    259260    void* buf=NULL;
    260261    const char* password=NULL;
     
    397398            {
    398399                FILE * fin;
    399                 int size_read;
     400                size_t size_read;
    400401                const char* filenameinzip = argv[i];
    401402                const char *savefilenameinzip;
     
    473474                    {
    474475                        err = ZIP_OK;
    475                         size_read = (int)fread(buf,1,size_buf,fin);
     476                        size_read = fread(buf,1,size_buf,fin);
    476477                        if (size_read < size_buf)
    477478                            if (feof(fin)==0)
     
    483484                        if (size_read>0)
    484485                        {
    485                             err = zipWriteInFileInZip (zf,buf,size_read);
     486                            err = zipWriteInFileInZip (zf,buf,(unsigned)size_read);
    486487                            if (err<0)
    487488                            {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette