aboutsummaryrefslogtreecommitdiff
path: root/src/common/tuklib_physmem.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-02-03tuklib_physmem: Silence warning from -Wcast-function-type on MinGW-w64.Jia Tan1-0/+18
tuklib_physmem depends on GetProcAddress() for both MSVC and MinGW-w64 to retrieve a function address. The proper way to do this is to cast the return value to the type of function pointer retrieved. Unfortunately, this causes a cast-function-type warning, so the best solution is to simply ignore the warning.
2022-09-28tuklib_physmem: Fix Unicode builds on Windows.Lasse Collin1-1/+1
Thanks to ArSaCiA Game.
2015-11-08tuklib_physmem: Hopefully silence a warning on Windows.Lasse Collin1-1/+2
2015-03-29Fix the detection of installed RAM on QNX.Lasse Collin1-1/+13
The earlier version compiled but didn't actually work since sysconf(_SC_PHYS_PAGES) always fails (or so I was told). Thanks to Ole André Vadla Ravnås for the patch and testing.
2014-10-09Add support for AmigaOS/AROS to tuklib_physmem().Lasse Collin1-0/+7
Thanks to Fredrik Wikstrom.
2010-05-10Updates to tuklib_physmem and tuklib_cpucores.Lasse Collin1-1/+32
Don't use #error to generate compile error, because some compilers actually don't take it as an error. This fixes tuklib_physmem on IRIX. Fix incorrect error check for sysconf() return values. Add AIX, HP-UX, and Tru64 specific code to detect the amount RAM. Add HP-UX specific code to detect the number of CPU cores. Thanks a lot to Peter O'Gorman for initial patches, testing, and debugging these fixes.
2010-01-12Add IRIX-specific code to tuklib_physmem and tuklib_cpucores.Lasse Collin1-0/+19
This is untested but it will get tested soon and, if needed, fixed before 5.0.0. Thanks to Stuart Shelton.
2009-09-19Various changes.Lasse Collin1-28/+30
Separate a few reusable components from XZ Utils specific code. The reusable code is now in "tuklib" modules. A few more could be separated still, e.g. bswap.h. Fix some bugs in lzmainfo. Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol for help. Add OpenVMS support into physmem. Add a few #ifdefs to ease building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the original patch.
2009-09-05Add OS/2-specific code to physmem.h.Lasse Collin1-11/+21
Also move DJGPP-specific code near the code meant for other DOS-like systems.
2009-09-05Use sysctl() != -1 instead of !sysctl() to check ifLasse Collin1-1/+1
the function call succeeded. NetBSD 4.0 returns positive values on success, but NetBSD Current and FreeBSD return zero. OpenBSD's man page doesn't tell what sysctl() returns on success. All these BSDs return -1 on error. Thanks to Robert Elz and Thomas Klausner.
2009-08-29Fix sysctl() usage.Lasse Collin1-1/+1
This fixes build on *BSDs and Darwin. Thanks to Jukka Salmi for the patches. Richard Koch reported the problem too.
2009-06-27Make physmem() work on Cygwin 1.5 and older.Lasse Collin1-37/+40
2009-06-24Support HW_PHYSMEM64Lasse Collin1-11/+19
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-4/+3
Some minor documentation cleanups were made at the same time.
2009-02-15Make physmem.h work on old Windows versions.Lasse Collin1-4/+27
Thanks to Hongbo Ni for the original patch.
2009-02-14Cleanups to the code that detects the amount of RAM andLasse Collin1-8/+13
the number of CPU cores. Added support for using sysinfo() on Linux systems whose libc lacks appropriate sysconf() support (at least dietlibc). The Autoconf macros were split into separate files, and CPU core count detection was moved from hardware.c to cpucores.h. The core count isn't used for anything real for now, so a problematic part in process.c was commented out.
2009-02-13Improve support for DOS-like systems.Lasse Collin1-0/+12
Here DOS-like means DOS, Windows, and OS/2.
2009-02-08Fix aliasing issue in physmem.h.Lasse Collin1-9/+10
2009-02-05Various code cleanups the the xz command line tool.Lasse Collin1-0/+13
It now builds with MinGW.
2008-11-19Oh well, big messy commit again. Some highlights:Lasse Collin1-0/+4
- Updated to the latest, probably final file format version. - Command line tool reworked to not use threads anymore. Threading will probably go into liblzma anyway. - Memory usage limit is now about 30 % for uncompression and about 90 % for compression. - Progress indicator with --verbose - Simplified --help and full --long-help - Upgraded to the last LGPLv2.1+ getopt_long from gnulib. - Some bug fixes
2008-01-08More pre-C99 inttypes.h compatibility fixes. Now the codeLasse Collin1-11/+0
should work even if the system has no inttypes.h.