Compare commits
7 Commits
212c85863a
...
7bfc2289fd
Author | SHA1 | Date |
---|---|---|
Ariadne Conill | 7bfc2289fd | |
Ariadne Conill | 1e179963d4 | |
Harmen Stoppels | f7bebba664 | |
Harmen Stoppels | 434cb2935e | |
Harmen Stoppels | 40638f2472 | |
h30032433 | b08733f45d | |
huyubiao | 6d1f160e89 |
|
@ -135,7 +135,8 @@ test_scripts= tests/meson.build \
|
|||
tests/sysroot.sh \
|
||||
tests/version.sh
|
||||
|
||||
check_SCRIPTS= $(test_scripts:.sh=)
|
||||
test_sh = $(filter-out tests/meson.build, $(test_scripts))
|
||||
check_SCRIPTS = $(test_sh:.sh=)
|
||||
|
||||
SUFFIXES= .sh
|
||||
|
||||
|
|
|
@ -1325,7 +1325,7 @@ cleanup3:
|
|||
/* check if there is a limit to the number of packages allowed to be included, if so and we have hit
|
||||
* the limit, stop adding packages to the queue.
|
||||
*/
|
||||
if (maximum_package_count > 0 && pkgq.length > maximum_package_count)
|
||||
if (maximum_package_count > 0 && pkgq.length >= maximum_package_count)
|
||||
break;
|
||||
|
||||
while (isspace((unsigned char)package[0]))
|
||||
|
|
|
@ -22,7 +22,8 @@ AX_CHECK_COMPILE_FLAG([-std=gnu99], [CFLAGS="$CFLAGS -std=gnu99"], [
|
|||
AX_CHECK_COMPILE_FLAG([-std=c99], [CFLAGS="$CFLAGS -std=c99"])
|
||||
])
|
||||
AC_CONFIG_HEADERS([libpkgconf/config.h])
|
||||
AC_CHECK_FUNCS([strlcpy strlcat strndup reallocarray])
|
||||
AC_CHECK_DECLS([strlcpy, strlcat, strndup], [], [], [[#include <string.h>]])
|
||||
AC_CHECK_DECLS([reallocarray])
|
||||
AC_CHECK_HEADERS([sys/stat.h])
|
||||
AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
|
|
@ -89,11 +89,6 @@ pkgconf_argv_split(const char *src, int *argc, char ***argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* If we are outside a quoted string/char, an escaped space is usually used to
|
||||
preserve spaces in file names. */
|
||||
if (!(*src_iter == '$' || *src_iter == '`' || *src_iter == '"' || *src_iter == '\\' || *src_iter == ' '))
|
||||
*dst_iter++ = '\\';
|
||||
|
||||
*dst_iter++ = *src_iter;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <libpkgconf/bsdstubs.h>
|
||||
#include <libpkgconf/config.h>
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#if !HAVE_DECL_STRLCPY
|
||||
/*
|
||||
* Copy src to string dst of size siz. At most siz-1 characters
|
||||
* will be copied. Always NUL terminates (unless siz == 0).
|
||||
|
@ -58,7 +58,7 @@ strlcpy(char *dst, const char *src, size_t siz)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#if !HAVE_DECL_STRLCAT
|
||||
/*
|
||||
* Appends src to string dst of size siz (unlike strncat, siz is the
|
||||
* full size of dst, not space left). At most siz-1 characters
|
||||
|
@ -107,7 +107,7 @@ strlcat(char *dst, const char *src, size_t siz)
|
|||
* from the use of this software.
|
||||
*/
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
#if !HAVE_DECL_STRNDUP
|
||||
/*
|
||||
* Creates a memory buffer and copies at most 'len' characters to it.
|
||||
* If 'len' is less than the length of the source string, truncation occured.
|
||||
|
@ -139,7 +139,7 @@ pkgconf_strndup(const char *src, size_t len)
|
|||
return strndup(src, len);
|
||||
}
|
||||
|
||||
#ifndef HAVE_REALLOCARRAY
|
||||
#if !HAVE_DECL_REALLOCARRAY
|
||||
void *
|
||||
reallocarray(void *ptr, size_t m, size_t n)
|
||||
{
|
||||
|
|
|
@ -12,6 +12,18 @@
|
|||
/* Define to 1 if you have the `reallocarray' function. */
|
||||
#mesondefine HAVE_REALLOCARRAY
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#mesondefine HAVE_DECL_STRLCAT
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#mesondefine HAVE_DECL_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the `strndup' function. */
|
||||
#mesondefine HAVE_DECL_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the `reallocarray' function. */
|
||||
#mesondefine HAVE_DECL_REALLOCARRAY
|
||||
|
||||
/* Name of package */
|
||||
#mesondefine PACKAGE
|
||||
|
||||
|
|
|
@ -30,8 +30,12 @@ check_functions = [
|
|||
]
|
||||
|
||||
foreach f : check_functions
|
||||
name = f[0].to_upper().underscorify()
|
||||
if cc.has_function(f[0], prefix : '#define _BSD_SOURCE\n#include <@0@>'.format(f[1])) and cc.has_header_symbol(f[1], f[0], prefix : '#define _BSD_SOURCE')
|
||||
cdata.set('HAVE_@0@'.format(f[0].to_upper().underscorify()), 1)
|
||||
cdata.set('HAVE_@0@'.format(name), 1)
|
||||
cdata.set('HAVE_DECL_@0@'.format(name), 1)
|
||||
else
|
||||
cdata.set('HAVE_DECL_@0@'.format(name), 0)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@ Name: quotes
|
|||
Description: A testing pkg-config file
|
||||
Version: 1.2.3
|
||||
Libs: -L${libdir} -lfoo
|
||||
Cflags: -DQUOTED=\"bla\"
|
||||
Cflags: -DQUOTED=\"bla\" -DA=\"escaped\ string\'\ \literal\" -DB="\1\$" -DC='bla'
|
||||
|
|
|
@ -142,7 +142,7 @@ quoted_body()
|
|||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-o inline:"-DQUOTED=\\\"bla\\\"\n" \
|
||||
-o inline:"-DQUOTED=\\\"bla\\\" -DA=\\\"escaped\\ string\\\'\\ literal\\\" -DB=\\\\\\1\$ -DC=bla\n" \
|
||||
pkgconf --cflags quotes
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@ tests_init \
|
|||
explicit_sysroot \
|
||||
empty_tuple \
|
||||
solver_requires_private_debounce \
|
||||
billion_laughs
|
||||
billion_laughs \
|
||||
maximum_package_depth_off_by_one
|
||||
|
||||
# sysroot_munge \
|
||||
|
||||
|
@ -273,3 +274,9 @@ billion_laughs_body()
|
|||
atf_check -o inline:"warning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --validate billion-laughs
|
||||
}
|
||||
|
||||
maximum_package_depth_off_by_one_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion foo bar baz
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue