Tag
Hash :
4be39c59
Author :
Date :
2021-03-19T16:59:02
Remove usage of cygwin_conv_path() under cygwin/msys This converted Unix paths to Windows paths, but all cygwin tools work with Unix paths so this shouldn't be needed. There is one use case if you use a cygwin pkgconf with a non-cygwin toolchain, but pkgconf works reasonable well natively now so this shouldn't be needed anymore and more likely leads to problems and confusion. Both cygwin and msys have patched this out already: * https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/pkgconf.git;a=blob;f=pkgconf.cygport;h=e5d003f3f3dfc9e374b916974018022ad8d68852;hb=HEAD#l55 * https://github.com/msys2/MSYS2-packages/blob/a4bce0c2943109e7d06c8660d91b89065eb09bea/pkgconf/PKGBUILD#L26
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
libpkgconf `path` module
========================
The `path` module provides functions for manipulating lists of paths in a cross-platform manner. Notably,
it is used by the `pkgconf client` to parse the ``PKG_CONFIG_PATH``, ``PKG_CONFIG_LIBDIR`` and related environment
variables.
.. c:function:: void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist)
Adds a path node to a path list. If the path is already in the list, do nothing.
:param char* text: The path text to add as a path node.
:param pkgconf_list_t* dirlist: The path list to add the path node to.
:param bool filter: Whether to perform duplicate filtering.
:return: nothing
.. c:function:: size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist)
Splits a given text input and inserts paths into a path list.
:param char* text: The path text to split and add as path nodes.
:param pkgconf_list_t* dirlist: The path list to have the path nodes added to.
:param bool filter: Whether to perform duplicate filtering.
:return: number of path nodes added to the path list
:rtype: size_t
.. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist)
Adds the paths specified in an environment variable to a path list. If the environment variable is not set,
an optional default set of paths is added.
:param char* environ: The environment variable to look up.
:param char* fallback: The fallback paths to use if the environment variable is not set.
:param pkgconf_list_t* dirlist: The path list to add the path nodes to.
:param bool filter: Whether to perform duplicate filtering.
:return: number of path nodes added to the path list
:rtype: size_t
.. c:function:: bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist)
Checks whether a path has a matching prefix in a path list.
:param char* path: The path to check against a path list.
:param pkgconf_list_t* dirlist: The path list to check the path against.
:return: true if the path list has a matching prefix, otherwise false
:rtype: bool
.. c:function:: void pkgconf_path_free(pkgconf_list_t *dirlist)
Releases any path nodes attached to the given path list.
:param pkgconf_list_t* dirlist: The path list to clean up.
:return: nothing
.. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen)
Relocates a path, possibly calling normpath() on it.
:param char* buf: The path to relocate.
:param size_t buflen: The buffer length the path is contained in.
:return: true on success, false on error
:rtype: bool