Commit Graph

95 Commits (b6a56c8728ca5098edb5d2bb1022a4690ce340db)

Author SHA1 Message Date
William Pitcock 4589274c43 libpkgconf: start to remove PKGCONF_BUFSIZE allocations from the stack. (closes #149)
Patch by Karen Arutyunov.
2017-10-16 12:56:19 -05:00
William Pitcock 420c62e10c libpkgconf: pkg: refactor parser harness to allow providing warnings, provide warning for improper fragment list 2017-09-19 21:58:54 -05:00
William Pitcock e9fd43caa7 libpkgconf: clean up header includes (closes #137) 2017-09-17 23:38:25 -05:00
William Pitcock f808300a01 libpkgconf: pkg: some elements of virtual packages should be freed as they have heap-allocated portions (closes #132) 2017-09-13 14:56:10 -05:00
William Pitcock 9b55fc3c23 libpkgconf: cache: refactor the way package objects are marked as cached to avoid memory leaks (#133) 2017-09-13 14:41:19 -05:00
William Pitcock b7839f6bb7 libpkgconf: pkg: pkgconf_pkg_scan_dir: remove unnecessary static declaration of filebuf 2017-09-08 20:06:52 -05:00
William Pitcock 2681c29edd libpkgconf: pkg: determine_prefix: use caller-provided buffer for reentrancy 2017-09-08 20:04:49 -05:00
William Pitcock adae70445a libpkgconf: pkg: get_default_pkgconfig_path: use caller-supplied buffer for reentrancy 2017-09-08 20:01:34 -05:00
William Pitcock 615bab3df9 libpkgconf: pkg: pkgconf_pkg_report_graph_error(): move already_sent_notice to pkgconf_client_t 2017-09-08 19:48:31 -05:00
William Pitcock b0ef708efc libpkgconf: pkg: pkg_get_parent_dir(): use caller-supplied buffer instead of a static buffer to make reentrant 2017-09-08 19:23:04 -05:00
William Pitcock 47ce9765a8 libpkgconf: define SIZE_FMT_SPECIFIER on POSIX and Windows platforms and use it in place of %zu
The MSVCRT runtime as used on Windows does not support %zu, but instead recommends %Iu.  As we want
to remain portable to other runtimes, even on Windows, we do not use %Iu, but instead expand it logically
to either %lu or %llu depending on if it's _WIN32 or _WIN64 headers.

On POSIX, we assume C99 support is available and always use %zu, as pkgconf has never supported anything
earlier than C99 officially.

Closes #125.
2017-09-08 18:46:48 -05:00
William Pitcock 864b14e5b9 Merge branch 'cmakeify' of github.com:dankegel/pkgconf 2017-06-16 21:06:01 -05:00
William Pitcock 03f7841065 libpkgconf: pkg: windows can use either \ or / as directory separators
ref #118
2017-06-16 15:27:23 -05:00
William Pitcock d45e850130 Revert "pkg: use pkgconf_pkg_t.realname instead of pkgconf_pkg_t.id for injecting the default provides entry"
This reverts commit 0c22b4d8a1.
2017-06-16 13:03:51 -05:00
William Pitcock 0c22b4d8a1 pkg: use pkgconf_pkg_t.realname instead of pkgconf_pkg_t.id for injecting the default provides entry
This issue was noticed while porting pkgconf to Windows.

ref #118
2017-06-16 11:49:54 -05:00
Dan Kegel 794aa5016a Tidy up a bit. 2017-06-05 20:54:57 -07:00
Dan Kegel 4d7b4d7c8e Minimal tweaks to compile with Visual C 2015 2017-06-04 19:19:55 -07:00
William Pitcock d280060ed7 libpkgconf: pkg: add additional validation rules in post-parse phase 2017-05-19 23:37:57 -05:00
William Pitcock 0262b8251d libpkgconf: pkgconf_pkg_find(): correctly handle failure from pkgconf_pkg_new_from_file() 2017-05-19 23:33:49 -05:00
William Pitcock cf3c50ca78 libpkgconf: pkg: pkgconf_try_specific_path() and pkgconf_pkg_new_from_file() require a mutable client to release resources when encountering invalid packages 2017-05-19 23:21:58 -05:00
William Pitcock acac1f8ed3 libpkgconf: pkg: show iteration depth when traversing 2017-03-24 00:59:53 -05:00
William Pitcock 81011ba522 main: implement --short-errors (#115) 2017-02-27 09:54:02 -06:00
William Pitcock 794443a92a dependency: break API to add tracepoints to dependency list building 2017-02-25 16:04:55 -06:00
William Pitcock e0c9569f14 fragment: add tracepoints 2017-02-25 15:53:50 -06:00
William Pitcock b0c36cd128 libpkgconf: pkg: add some trace points 2017-02-04 20:35:49 -06:00
William Pitcock 820ad83edd libpkgconf: pkg: add variable whitespace warnings back, using pkgconf_warn(). 2017-02-04 19:05:28 -06:00
William Pitcock 1aa1a43321 Revert "libpkgconf: pkg: warn when encountering trailing whitespace"
This reverts commit 2fa4fd09d0.
2017-01-26 13:38:57 -06:00
William Pitcock 2fa4fd09d0 libpkgconf: pkg: warn when encountering trailing whitespace 2017-01-26 13:32:07 -06:00
William Pitcock ef1503b769 libpkgconf: strip trailing whitespace 2017-01-26 13:10:52 -06:00
William Pitcock e87595b3d1 libpkgconf: use a better check instead of stat() for pkg-config file iteration, avoiding a TOCTOU race condition identified by coverity 2017-01-23 12:42:13 -06:00
William Pitcock 0927ecf1c6 Revert "Actually fix the regression introduced in 7b39c38"
This reverts commit 5e5c418837.
2017-01-22 23:29:59 -06:00
William Pitcock 0c01a81299 libpkgconf: split virtual/static package state (this is API/ABI safe, static packages are always treated as virtual when it comes to mutation) 2017-01-22 23:26:01 -06:00
William Pitcock 9ece7cd487 libpkgconf: move sys/stat.h inclusion out of stdinc.h to the only other consumer of sys/stat.h 2017-01-22 23:09:38 -06:00
William Pitcock e5f3dac6e7 libpkgconf: pkg: handle error value from stat(2). 2017-01-22 23:07:39 -06:00
Igor Gnatenko 5db87c9685 remove dead assignments (#109)
* remove dead assignments

None of them are used.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>

* The address of an object "&pkgconf_pkg_provides_vermatch_rules[pkgdep->compare]" is never null

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>

* Overrunning array pkgconf_pkg_comparator_names at element index 7

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-22 11:31:34 -08:00
Baptiste Daroussin 5e5c418837 Actually fix the regression introduced in 7b39c38 2017-01-22 11:26:43 +01:00
Baptiste Daroussin 17be554a21 Revert "Fix regression introduced in 7b39c38"
This reverts commit 7d89f659ff.
2017-01-22 11:23:24 +01:00
Baptiste Daroussin 7d89f659ff Fix regression introduced in 7b39c38
now pkgconf --variable=pc_path pkg-config works
2017-01-22 10:44:09 +01:00
William Pitcock 7237b811e7 add support for making paths relocatable (closes #103) 2017-01-20 00:58:48 -06:00
William Pitcock 13cf74c7a3 libpkgconf: kill flags from top-level fragment API (ref #105) 2017-01-19 18:23:25 -06:00
William Pitcock 7b39c38408 libpkgconf: pkg: clean up use of flags variable (ref #105) 2017-01-19 18:17:29 -06:00
William Pitcock 127fd037d4 libpkgconf: pkg: uncouple resolver flags from pkgconf_pkg_dir_list_build(). (ref #105) 2017-01-19 17:35:57 -06:00
William Pitcock b428eeaacf libpkgconf: remove legacy check to ensure pkgconf_pkg_dir_list_build() is only called once.
this is not necessary anymore because:

- we do path entry deduplication
- it is possible that we want to prime the dir list with some user-specified paths prior to building it
2017-01-18 11:29:24 -06:00
William Pitcock 2305031573 libpkgconf: path: make the duplicate filtering opt-in. some path lists should not be deduped (compiler path lists, for example) 2016-12-30 11:13:04 -06:00
William Pitcock 61c750fde3 libpkgconf: pkg: cleanup and document pkg module 2016-12-15 23:36:59 -06:00
William Pitcock 32c8c73d8b libpkgconf: pkg: pkgconf_pkg_find_in_registry_key() should actually be private 2016-12-15 22:57:15 -06:00
William Pitcock 568e5bfd1b libpkgconf: client: move pkgconf_error() and pkgconf_default_error_handler() here 2016-12-15 22:33:01 -06:00
William Pitcock 82fa8b21cf libpkgconf: separate config.h from the actual API headers 2016-12-13 12:14:08 -06:00
Graham Ollis fa87608978 pass client and user data to error handler (#100) 2016-12-13 12:03:59 -06:00
William Pitcock 8213d91038 libpkgconf: migrate to using the pkgconf_ namespaced strlcat/strlcpy symbols 2016-12-10 16:19:40 -06:00