bind9/lib/ns/win32
Michał Kępień 3883acc5c2 Add ns_plugin_expandpath()
Implement a helper function which, given an input string:

  - copies it verbatim if it contains at least one path separator,
  - prepends the named plugin installation directory to it otherwise.

This function will allow configuration parsing code to conveniently
determine the full path to a plugin module given either a path or a
filename.

While other, simpler ways exist for making sure filenames passed to
dlopen() cause the latter to look for shared objects in a specific
directory, they are very platform-specific.  Using full paths is thus
likely the most portable and reliable solution.

Also added unit tests for ns_plugin_expandpath() to ensure it behaves
as expected for absolute paths, relative paths, and filenames, for
various target buffer sizes.

(Note: plugins share a directory with named on Windows; there is no
default plugin path. Therefore the source path is copied to the
destination path with no modification.)

(cherry picked from commit d181c28c60)
2019-03-05 16:52:49 -08:00
..
DLLMain.c address win32 build issues 2018-05-22 16:32:21 -07:00
libns.def Add ns_plugin_expandpath() 2019-03-05 16:52:49 -08:00
libns.vcxproj.filters fix win32 build 2018-12-07 10:12:00 -08:00
libns.vcxproj.in fix win32 build 2018-12-07 10:12:00 -08:00
libns.vcxproj.user [master] add libns and remove liblwres 2017-09-08 13:47:34 -07:00
version.c address win32 build issues 2018-05-22 16:32:21 -07:00