aboutsummaryrefslogtreecommitdiff
path: root/src/common/sysdefs.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-02-14Add SPDX license identifier into 0BSD source code files.Lasse Collin1-0/+2
2024-02-14Change most public domain parts to 0BSD.Lasse Collin1-3/+0
Translations and doc/xz-file-format.txt and doc/lzma-file-format.txt were not touched. COPYING.0BSD was added.
2023-09-24sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO.Lasse Collin1-1/+9
2023-09-22MSVC: #define inline and restrict only when needed.Lasse Collin1-5/+8
This also drops the check for _WIN32 as that shouldn't be needed.
2023-01-10sysdefs.h: Don't include strings.h anymore.Lasse Collin1-6/+0
On some platforms src/xz/suffix.c may need <strings.h> for strcasecmp() but suffix.c includes the header when it needs it. Unless there is an old system that otherwise supports enough C99 to build XZ Utils but doesn't have C89/C90-compatible <string.h>, there should be no need to include <strings.h> in sysdefs.h.
2023-01-10sysdefs.h: Fix a comment.Lasse Collin1-1/+1
2023-01-10sysdefs.h: Don't include memory.h anymore even if it were available.Lasse Collin1-6/+2
It quite probably was never needed, that is, any system where memory.h was required likely couldn't compile XZ Utils for other reasons anyway. XZ Utils 5.2.6 and later source packages were generated using Autoconf 2.71 which no longer defines HAVE_MEMORY_H. So the code being removed is no longer used anyway.
2020-02-22Use defined(__GNUC__) before __GNUC__ in preprocessor lines.Lasse Collin1-1/+2
This should silence the equivalent of -Wundef in compilers that don't define __GNUC__.
2020-02-16sysdefs.h: Omit the conditionals around string.h and limits.h.Lasse Collin1-6/+2
string.h is used unconditionally elsewhere in the project and configure has always stopped if limits.h is missing, so these headers must have been always available even on the weirdest systems.
2014-01-12Windows: Add MSVC defines for inline and restrict keywords.Lasse Collin1-0/+10
2011-08-09Workaround unusual SIZE_MAX on SCO OpenServer.Lasse Collin1-3/+6
2011-01-18Add alloc_size and malloc attributes to a few functions.Lasse Collin1-0/+6
Thanks to Cristian Rodríguez for the original patch.
2010-12-12Add missing PRIx32 and PRIx64 compatibility definitions.Lasse Collin1-0/+9
This fixes portability to systems that lack C99 inttypes.h. Thanks to Juan Manuel Guerrero.
2010-10-23Windows: Use MinGW's stdio functions.Lasse Collin1-0/+5
The non-standard ones from msvcrt.dll appear to work most of the time with XZ Utils, but there are some corner cases where things may go very wrong. So it's good to use the better replacements provided by MinGW(-w64) runtime.
2010-05-26Rename MIN() and MAX() to my_min() and my_max().Lasse Collin1-7/+5
This should avoid some minor portability issues.
2010-05-26Better #error message.Lasse Collin1-2/+2
2009-11-26Typo fix to sysdefs.h.Lasse Collin1-1/+1
Thanks to Jonathan Nieder.
2009-09-27Work around a bug in Interix header files.Lasse Collin1-0/+6
Thanks to Markus Duft for the patch.
2009-09-19Various changes.Lasse Collin1-4/+0
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-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-10/+3
Some minor documentation cleanups were made at the same time.
2009-02-13Improve support for DOS-like systems.Lasse Collin1-0/+4
Here DOS-like means DOS, Windows, and OS/2.
2009-01-31Add LZMA_API to liblzma API headers. It's useful at leastLasse Collin1-2/+0
on Windows. sysdefs.h no longer #includes lzma.h, so lzma.h has to be #included separately where needed.
2008-11-19Oh well, big messy commit again. Some highlights:Lasse Collin1-11/+1
- 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-08-28Sort of garbage collection commit. :-| Many things are stillLasse Collin1-4/+38
broken. API has changed a lot and it will still change a little more here and there. The command line tool doesn't have all the required changes to reflect the API changes, so it's easy to get "internal error" or trigger assertions.
2008-05-11Remove support for pre-C89 libc versions that lack memcpy,Lasse Collin1-13/+2
memmove, and memset.
2008-01-16Added ARRAY_SIZE(array) macro.Lasse Collin1-0/+4
2008-01-06Introduced compatibility with systems that have pre-C99Lasse Collin1-1/+58
or no inttypes.h. This is useful when the compiler has good enough support for C99, but libc headers don't. Changed liblzma API so that sys/types.h and inttypes.h have to be #included before #including lzma.h. On systems that don't have C99 inttypes.h, it's the problem of the applications to provide the required types and macros before #including lzma.h. If lzma.h defined the missing types and macros, it could conflict with third-party applications whose configure has detected that the types are missing and defined them in config.h already. An alternative would have been introducing lzma_uint32 and similar types, but that would just be an extra pain on modern systems.
2007-12-09Imported to git.Lasse Collin1-0/+100