mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Fixing 73436 -- hiding platform specific calls in xp files, not part of the build, r=peterl
This commit is contained in:
parent
ded89f6ae2
commit
c8b65d16de
@ -76,15 +76,15 @@ NPError NPP_New(NPMIMEType pluginType,
|
||||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
NP_GETENTRYPOINTS real_NP_GetEntryPoints = (NP_GETENTRYPOINTS)GetProcAddress(hLib, "NP_GetEntryPoints");
|
||||
NP_GETENTRYPOINTS real_NP_GetEntryPoints = (NP_GETENTRYPOINTS)XP_GetSymbol(hLib, "NP_GetEntryPoints");
|
||||
if(!real_NP_GetEntryPoints)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
NP_INITIALIZE real_NP_Initialize = (NP_INITIALIZE)GetProcAddress(hLib, "NP_Initialize");
|
||||
NP_INITIALIZE real_NP_Initialize = (NP_INITIALIZE)XP_GetSymbol(hLib, "NP_Initialize");
|
||||
if(!real_NP_Initialize)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
NP_SHUTDOWN real_NP_Shutdown = (NP_SHUTDOWN)GetProcAddress(hLib, "NP_Shutdown");
|
||||
NP_SHUTDOWN real_NP_Shutdown = (NP_SHUTDOWN)XP_GetSymbol(hLib, "NP_Shutdown");
|
||||
if(!real_NP_Shutdown)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include "xp.h"
|
||||
|
||||
// file utils
|
||||
|
||||
BOOL XP_IsFile(char * szFileName)
|
||||
{
|
||||
#ifdef XP_WIN
|
||||
@ -100,3 +102,12 @@ void XP_FlushFileBuffers(XP_HFILE hFile)
|
||||
fflush(hFile);
|
||||
#endif
|
||||
}
|
||||
|
||||
// misc utils
|
||||
|
||||
void * XP_GetSymbol(XP_HLIB hLib, char * szProcName)
|
||||
{
|
||||
#ifdef XP_WIN
|
||||
return (void *)GetProcAddress(hLib, szProcName);
|
||||
#endif
|
||||
}
|
@ -137,4 +137,8 @@ void XP_DeleteFile(char * szFileName);
|
||||
DWORD XP_WriteFile(XP_HFILE hFile, void * pBuf, int iSize);
|
||||
void XP_FlushFileBuffers(XP_HFILE hFile);
|
||||
|
||||
|
||||
// misc
|
||||
void * XP_GetSymbol(XP_HLIB hLib, char * szProcName);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user