Age | Commit message (Collapse) | Author | Files | Lines |
|
This can cause issues if the declaration is not exactly the same, and
declaring it when the system already does is bogus no matter what.
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
We do not carry translations for this module, and it makes it pull
libintl for programs that might not use it otherwise.
|
|
The latter requires the local getopt implementation, so we need to
include it even if the system provides a getopt implementation.
|
|
Warned-by: gcc on AIX
|
|
Make all of them consistently follow the pattern --with-lib<name>.
Rename the m4 macros, preprocessor defines, and automake _LIBS flags.
|
|
|
|
The <selinux/flask.h> header is deprecated, and warns to use
string_to_security_class() instead of macro values.
|
|
We cannot compute the size of the array with sizeof when the only thing
we have is an extern declaration. Try to use NSIG, and fallback to 32
items in case it is not defined.
Prompted-by: Igor Pashev <pashev.igor@gmail.com>
|
|
This fixes a build failure on at least FreeBSD, and possibly other
BSD systems, where the md5.h header provided by libmd maps the md5
functions to namespaced ones, and then there is a mismatch between
the always included functions from libcompat and from libmd.
|
|
Cherry picked from commit 4e872b317ef6d69d3daab1058ddfa7a8940a06a6.
For declarations the autoconf test always defines the preprocessor
symbol to either 0 or 1, contrary to other tests where it's either
undefined or 1.
Closes: #777044
Based-on-patch-by: Alex Potapenko <opotapenko@gmail.com>
|
|
|
|
These are deprecated symbols, and some systems which do have strerror()
do not have these variables, most notably GNU/Hurd. So do not try to test
the current implementation there as it will fail.
Closes: #758199
|
|
If we are not using libselinux, then we cannot build the selinux
compatibility code as it requires the library. Also fixes build failures
on non-Linux systems, where the library is not available.
Closes: #757637
|
|
This is now a fallback implementation in case libselinux is too old.
|
|
Warned-by: coverity
|
|
We duplicate these macros here too so that we can quiesce some warnings
when building the compatibility code.
|
|
These are really compatibility macros for systems w/o the required
compiler support.
We need to duplicate the logic for LIBCOMPAT_GCC_VERSION, but for now
we will keep that and DPKG_GCC_VERSION to avoid having to make compat.h
a public header.
|
|
This will allow us to guarantee the compatibility implementations at
least build, and can eventually be tested.
|
|
This makes it possible to embed libcompat inside libdpkg, so that the
static library that we ship is self contained with the required
compatibility code, specifically the MD5 functions.
This also prepares the build system for when we start building a
shared library, although it disables it by default.
Closes: #746122
|
|
This will guarantee the macro constant is always defined, which allows
us to remove an equivalent code branch, which in normal conditions is
dead code.
As a side effect this unconfuses static code analyzers like cppcheck or
coverity.
|
|
|
|
Remove now unused strnlen.h header.
|
|
|
|
|
|
This might cause a segfault in case all entries have been filtered and
list has not been allocated. This should only possibly affect systems
where the fallback code is being used.
|
|
The md5 code is imported from the BSDs, and should not generally be
touched, only updated from there. Also on several platforms the code
should use the system available interfaces instead.
|
|
The other spelling errors come from external projects (doxygen and
pkg-config), which are being dealt upstream.
Warned-by: codespell
|
|
This avoids warnings on systems that do not like a completely empty
object file, or an empty output after the preprocessor has run.
|
|
This symbol was only standardized in POSIX.1-2008, which is too recent.
Although it has been available on at least FreeBSD and Linux systems
before that, but dpkg supports other systems which might not have it.
|
|
Using this function is unsafe, because there's no way to know if the
input contained a negative number. Remove the compat definition now
that we do not use this function any longer.
|
|
Found by Lintian.
|
|
Avoid race conditions from childs after fork(2).
Closes: #655411
Reported-by: Daniel Ruoso <daniel@ruoso.com>
|
|
|
|
The code is already selected (or not) to be included by the Makefile
machinery, there's no need to disabled it too in the actual code, and
not doing so will allow to test it later on.
|
|
|
|
On some systems like MacOS X, gettext's libintl.h redefines setlocale()
to a replacement function from libintl, which will make the build fail
if we end up including the header but not linking to libintl.
This could happen when using --disable-nls to build C++ code and having
the libintl.h header present with the setlocale() replacement function,
but that header is only supposed to be included if building C++ code on
a glibc system.
Restore the logic before commit 8f8e9d9af75672ae051c2d3c11dd797b666b87b8,
but explicitly check that we are not building on a uclibc system.
|
|
The version taken is the one before the switch to GPLv3+. With a slight
code revert to not have to include exitfail.c and exitfail.h.
This fixes --disable-nls on systems where obstack support is missing, by
using the local "gettext.h" which honours ENABLE_NLS, instead of just
directly using <libintl.h>.
This also fixes code warnings due to obsolete K&R style prototypes, and
removes the need for bcopy checks.
|
|
This makes the build fail on systems where vsnprintf() is missing or
not compliant enough, and thus the fallback is being used.
Closes: #612203
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
When the package is configured with NLS disabled (--disable-nls),
the build will fail due to undefined references to LC_MESSAGES, the
gettext.h header file does not correctly handle the gettext context
related function declarations on disabled NLS support, which is known
to be used by downstreams. This adds all missing macros corresponding
to their NLS enabled counterparts.
|
|
Remove trailing spaces. Remove blank lines not separating different code
blocks. Remove blank lines at the end of the file.
|
|
|
|
|
|
|
|
Provide compatibility code whenever the system does not.
|
|
When creating symlinks on extraction, dpkg needs to set its owner, if
we fallback to use chown in place of lchown we might get to a situation
where the dereferenced symlink does not yet exist, which would cause an
unwanted error.
On some older and buggy systems, chown does not actually dereference
symlinks, so it could be safely used although it would need to be
detected at runtime, as the kernel could be switched under our feet,
but given that lchown is already specified by UNIX98, there's not much
sense in not assuming it's present and working at this point in time.
|
|
This changes its license from LGPL2+ to GPL2+.
|
|
Instead of duplicating the code with chown calls when lchown is not
available, just map it with a macros.
|
|
Let the realloc in the loop take care of it once it's needed, this way
we get rid of an additional point of failure.
|
|
|
|
Add a missing “of the License” after “version 2”. Move “but” and “GNU”
at the end of line to the next line. This matches more closely the
paragraph found in the license text for the GPL version 2.
|