setup/dirs: don't include (find-dll-dir) in (get-lib-search-dirs)

I don't see a reason to include `(find-dll-dir)` in the result of
`(get-lib-search-dirs)`. It's practically always redundant, and
including it causes problems for sandboxes --- since `(find-dll-dir)`
must inspect the Racket executable on Windows and Mac OS X, and that
access is normally not allowed by a sandbox.
This commit is contained in:
Matthew Flatt 2014-11-02 07:34:07 -07:00
parent 822541e0a0
commit 795d26a673
2 changed files with 21 additions and 16 deletions

View File

@ -1161,6 +1161,26 @@ function for installing a single @filepath{.plt} file.
Returns a path to a user-specific @filepath{lib} directory; the directory
indicated by the returned path may or may not exist.}
@defproc[(get-lib-search-dirs) (listof path?)]{
Returns a list of paths to search for foreign libraries. Unless it is
configured otherwise, the result includes any non-@racket[#f] result of
@racket[(find-lib-dir)] and
and @racket[(find-user-lib-dir)]---but the latter is included only if the
value of the @racket[use-user-specific-search-paths] parameter
is @racket[#t].
@history[#:changed "6.1.1.4" @elem{Dropped @racket[(find-dll-dir)]
from the set of paths to
explicitly include in the
default.}]}
@defproc[(find-dll-dir) (or/c path? #f)]{
Returns a path to the directory that contains DLLs for use with the
current executable (e.g., @filepath{libracket.dll} on Windows).
The result is @racket[#f] if no such directory is available, or if no
specific directory is available (i.e., other than the platform's normal
search path).}
@defproc[(find-share-dir) (or/c path? #f)]{ Returns a path to the
installation's @filepath{share} directory, which contains installed
packages and other platform-independent files. The result is
@ -1170,21 +1190,6 @@ function for installing a single @filepath{.plt} file.
Returns a path to a user-specific @filepath{share} directory; the directory
indicated by the returned path may or may not exist.}
@defproc[(find-dll-dir) (or/c path? #f)]{
Returns a path to the directory that contains DLLs for use with the
current executable (e.g., @filepath{libmzsch.dll} on Windows).
The result is @racket[#f] if no such directory is available, or if no
specific directory is available (i.e., other than the platform's normal
search path).}
@defproc[(get-lib-search-dirs) (listof path?)]{
Returns a list of paths to search for foreign libraries. Unless it is
configured otherwise, the result includes any non-@racket[#f] result of
@racket[(find-lib-dir)], @racket[(find-dll-dir)],
and @racket[(find-user-lib-dir)]---but the last is included only if the
value of the @racket[use-user-specific-search-paths] parameter
is @racket[#t].}
@defproc[(find-include-dir) (or/c path? #f)]{
Returns a path to the installation's @filepath{include} directory, which
contains @filepath{.h} files for building Racket extensions and embedding

View File

@ -234,7 +234,7 @@
find-lib-dir
find-user-lib-dir
config:lib-search-dirs
get-lib-search-dirs find-dll-dir
get-lib-search-dirs
"lib")
;; ----------------------------------------