Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Functions | Variables
prlink.h File Reference
#include "prtypes.h"

Go to the source code of this file.

Classes

struct  PRStaticLinkTable
struct  PRLibSpec
union  PRLibSpec.value
struct  PRLibSpec.value.mac_named_fragment
struct  PRLibSpec.value.mac_indexed_fragment

Defines

#define PR_LD_LAZY   0x1 /* equivalent to RTLD_LAZY on Unix */
#define PR_LD_NOW   0x2 /* equivalent to RTLD_NOW on Unix */
#define PR_LD_GLOBAL   0x4 /* equivalent to RTLD_GLOBAL on Unix */
#define PR_LD_LOCAL   0x8 /* equivalent to RTLD_LOCAL on Unix */

Typedefs

typedef
typedefPR_BEGIN_EXTERN_C
struct 
PRLibrary
typedef struct PRStaticLinkTable PRStaticLinkTable
typedef enum PRLibSpecType PRLibSpecType
typedef struct PRLibSpec PRLibSpec
typedef void(* PRFuncPtr )()

Enumerations

enum  PRLibSpecType { PR_LibSpec_Pathname, PR_LibSpec_MacNamedFragment, PR_LibSpec_MacIndexedFragment, PR_LibSpec_PathnameU }

Functions

 NSPR_API (PRStatus) PR_SetLibraryPath(const char *path)
 NSPR_API (char *) PR_GetLibraryPath(void)
 NSPR_API (void) PR_FreeLibraryName(char *mem)
 Prototypes for machine dependent function implementations.
 NSPR_API (PRLibrary *) PR_LoadLibrary(const char *name)
 PR_LoadLibraryWithFlags (PRLibSpec libSpec, PRIntn flags)
 NSPR_API (void *) PR_FindSymbol(PRLibrary *lib
 NSPR_API (PRFuncPtr) PR_FindFunctionSymbol(PRLibrary *lib

Variables

const char * lib
const char * name
const PRStaticLinkTabletable
PRFuncPtr addr

Class Documentation

struct PRLibSpec

Definition at line 135 of file prlink.h.

Class Members
PRLibSpecType type
union PRLibSpec value
union PRLibSpec.value

Definition at line 137 of file prlink.h.

Class Members
value mac_indexed_fragment
value mac_named_fragment
const char * pathname
const PRUnichar * pathname_u
struct PRLibSpec.value.mac_named_fragment

Definition at line 142 of file prlink.h.

Class Members
struct FSSpec * fsspec
const char * name
struct PRLibSpec.value.mac_indexed_fragment

Definition at line 148 of file prlink.h.

Class Members
struct FSSpec * fsspec
PRUint32 index

Define Documentation

#define PR_LD_GLOBAL   0x4 /* equivalent to RTLD_GLOBAL on Unix */

Definition at line 166 of file prlink.h.

#define PR_LD_LAZY   0x1 /* equivalent to RTLD_LAZY on Unix */

Definition at line 164 of file prlink.h.

#define PR_LD_LOCAL   0x8 /* equivalent to RTLD_LOCAL on Unix */

Definition at line 167 of file prlink.h.

#define PR_LD_NOW   0x2 /* equivalent to RTLD_NOW on Unix */

Definition at line 165 of file prlink.h.


Typedef Documentation

typedef void(* PRFuncPtr)()

Definition at line 209 of file prlink.h.

typedef typedefPR_BEGIN_EXTERN_C struct PRLibrary

Definition at line 48 of file prlink.h.

typedef struct PRLibSpec PRLibSpec

Enumeration Type Documentation

Enumerator:
PR_LibSpec_Pathname 
PR_LibSpec_MacNamedFragment 
PR_LibSpec_MacIndexedFragment 
PR_LibSpec_PathnameU 

Definition at line 126 of file prlink.h.

                           {
    PR_LibSpec_Pathname,
    PR_LibSpec_MacNamedFragment,   /* obsolete (for Mac OS Classic) */
    PR_LibSpec_MacIndexedFragment, /* obsolete (for Mac OS Classic) */
    PR_LibSpec_PathnameU           /* supported only on Win32 */ 
} PRLibSpecType;

Function Documentation

NSPR_API ( PRStatus  ) const
NSPR_API ( char *  )
NSPR_API ( void  )

Prototypes for machine dependent function implementations.

(Too bad NSPR's MD system blows so much that we have to reiterate every stinking thing we implement here in our MD header file.)

NSPR_API ( PRLibrary ) const
NSPR_API ( void )
PR_LoadLibraryWithFlags ( PRLibSpec  libSpec,
PRIntn  flags 
)

Definition at line 573 of file prlink.c.

{
    if (flags == 0) {
        flags = _PR_DEFAULT_LD_FLAGS;
    }
    switch (libSpec.type) {
        case PR_LibSpec_Pathname:
            return pr_LoadLibraryByPathname(libSpec.value.pathname, flags);
#ifdef WIN32
        case PR_LibSpec_PathnameU:
            /*
             * cast to |char *| and set PR_LD_PATHW flag so that
             * it can be cast back to PRUnichar* in the callee.
             */
            return pr_LoadLibraryByPathname((const char*) 
                                            libSpec.value.pathname_u, 
                                            flags | PR_LD_PATHW);
#endif
        default:
            PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
            return NULL;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 256 of file prlink.h.

Definition at line 85 of file prlink.h.

const char* name

Definition at line 199 of file prlink.h.

Definition at line 248 of file prlink.h.