"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/Windows/System.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

System.cpp  (p7zip_15.14.1_src_all):System.cpp  (p7zip_16.02_src_all)
skipping to change at line 124 skipping to change at line 124
{ {
size += total; size += total;
} }
/* new style /proc/meminfo ... */ /* new style /proc/meminfo ... */
if (sscanf(buffer, "MemTotal: %lu", &tota l)) if (sscanf(buffer, "MemTotal: %lu", &tota l))
size = ((UInt64)total)*1024; size = ((UInt64)total)*1024;
} }
fclose( f ); fclose( f );
} }
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__) #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__OpenBSD__)
#ifdef HW_MEMSIZE #ifdef HW_MEMSIZE
uint64_t val = 0; // support 2Gb+ RAM uint64_t val = 0; // support 2Gb+ RAM
int mib[2] = { CTL_HW, HW_MEMSIZE }; int mib[2] = { CTL_HW, HW_MEMSIZE };
#elif defined(HW_PHYSMEM64)
uint64_t val = 0; // support 2Gb+ RAM
int mib[2] = { CTL_HW, HW_PHYSMEM64 };
#else // HW_MEMSIZE #else // HW_MEMSIZE
unsigned int val = 0; // For old system unsigned int val = 0; // For old system
int mib[2] = { CTL_HW, HW_PHYSMEM }; int mib[2] = { CTL_HW, HW_PHYSMEM };
#endif // HW_MEMSIZE #endif // HW_MEMSIZE
size_t size_sys = sizeof(val); size_t size_sys = sizeof(val);
sysctl(mib, 2, &val, &size_sys, NULL, 0); sysctl(mib, 2, &val, &size_sys, NULL, 0);
if (val) size = val; if (val) size = val;
#elif defined(__CYGWIN__) #elif defined(__CYGWIN__)
unsigned long pagesize=sysconf(_SC_PAGESIZE); // returns 65536 => OK unsigned long pagesize=sysconf(_SC_PAGESIZE); // returns 65536 => OK
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS