VirtualBox

Changeset 98737 in vbox


Ignore:
Timestamp:
Feb 25, 2023 8:51:38 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156042
Message:

lobs/liblzma-5.4.1: Windows build fixes, bugref:10254

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r98732 r98737  
    50395039 SDK_VBoxLibLzma_INCS            ?= $(SDK_VBoxLibLzma_DEFAULT_INCS)
    50405040 SDK_VBoxLibLzma_LIBS            ?= $(PATH_STAGE_LIB)/VBox-liblzma$(VBOX_SUFF_LIB)
     5041
     5042 SDK_VBoxLibLzma-x86             := liblzma/x86 compressor/decompressor for dll linking.
     5043 SDK_VBoxLibLzma-x86_EXTENDS     := VBoxLibLzma
     5044 SDK_VBoxLibLzma_LIBS-x86        ?= $(PATH_STAGE_LIB)/VBox-liblzma-x86$(VBOX_SUFF_LIB)
    50415045
    50425046 SDK_VBoxLibLzmaStatic           := liblzma for static linking
  • trunk/src/libs/liblzma-5.4.1/common/common.c

    r98730 r98737  
    4848                ptr = allocator->alloc(allocator->opaque, 1, size);
    4949        else
     50#ifndef VBOX
    5051                ptr = malloc(size);
     52#else
     53                ptr = RTMemAlloc(size);
     54#endif
    5155
    5256        return ptr;
     
    6872                        memzero(ptr, size);
    6973        } else {
     74#ifndef VBOX
    7075                ptr = calloc(1, size);
     76#else
     77                ptr = RTMemAllocZ(size);
     78#endif
     79
    7180        }
    7281
     
    8190                allocator->free(allocator->opaque, ptr);
    8291        else
     92#ifndef VBOX
    8393                free(ptr);
     94#else
     95                RTMemFree(ptr);
     96#endif
    8497
    8598        return;
  • trunk/src/libs/liblzma-5.4.1/common/stream_decoder_mt.c

    r98730 r98737  
    13631363                // towards more favorable conditions (less memory in use,
    13641364                // more in cache).
     1365#ifndef VBOX
    13651366                uint64_t mem_in_use;
    13661367                uint64_t mem_cached;
     1368#else
     1369                uint64_t mem_in_use = 0; /* Shut up msc who can't grok the mythread_sync construct below. */
     1370                uint64_t mem_cached = 0;
     1371#endif
    13671372                struct worker_thread *thr = NULL; // Init to silence warning.
    13681373
  • trunk/src/libs/liblzma-5.4.1/common/stream_encoder_mt.c

    r98730 r98737  
    650650
    651651                if (block_error) {
     652#ifndef VBOX
    652653                        lzma_ret ret;
     654#else
     655                        lzma_ret ret = LZMA_OK; /* Shut up msc who can't grok the mythread_sync construct below. */
     656#endif
    653657
    654658                        mythread_sync(coder->mutex) {
  • trunk/src/libs/liblzma-5.4.1/vbox/sysdefs.h

    r98730 r98737  
    6060#define TUKLIB_GNUC_REQ(major, minor) RT_GNUC_PREREQ(major, minor)
    6161#define assert(expr) Assert(expr)
    62 
    63 
    64 #define malloc(size) RTMemAlloc(size)
    65 #define calloc(nmemb, size) RTMemAllocZ(nmemb * size)
    66 
    67 
    68 DECL_FORCE_INLINE(void) free(void *ptr)
    69 {
    70         RTMemFree(ptr);
    71 }
    7262
    7363#if 0
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