1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* Path charset agnostic wrappers for prlink.h. */
9 #ifndef mozilla_SharedLibrary_h
10 #define mozilla_SharedLibrary_h
12 #ifdef MOZILLA_INTERNAL_API
15 # include "mozilla/Char16.h"
20 // Load the specified library.
22 // @param aPath path to the library
23 // @param aFlags takes PR_LD_* flags (see prlink.h)
27 LoadLibraryWithFlags(char16ptr_t aPath
, PRUint32 aFlags
= 0)
29 LoadLibraryWithFlags(const char* aPath
, PRUint32 aFlags
= 0)
34 libSpec
.type
= PR_LibSpec_PathnameU
;
35 libSpec
.value
.pathname_u
= aPath
;
37 libSpec
.type
= PR_LibSpec_Pathname
;
38 libSpec
.value
.pathname
= aPath
;
40 return PR_LoadLibraryWithFlags(libSpec
, aFlags
);
43 } /* namespace mozilla */
45 #endif /* MOZILLA_INTERNAL_API */
47 #endif /* mozilla_SharedLibrary_h */