summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-08 22:25:13 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-08 22:25:13 +0000
commitc598146e4aece78c7e018a9af9206a02505c7fc8 (patch)
treed2c94344ae8fc0e140ea80486395548d44d06cca /loader
parentf46c44efe91991bd723739ca1e6ed3299372077c (diff)
downloadmpv-c598146e4aece78c7e018a9af9206a02505c7fc8.tar.bz2
mpv-c598146e4aece78c7e018a9af9206a02505c7fc8.tar.xz
Allow declaring special undefined functions that will return NULL
instead of a pointer to a stub. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22493 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r--loader/win32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/loader/win32.c b/loader/win32.c
index 547eb64494..e9038553d3 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -4859,6 +4859,9 @@ struct libs
#define FF(X,Y) \
{#X, Y, (void*)exp##X},
+#define UNDEFF(X, Y) \
+ {#X, Y, (void*)-1},
+
struct exports exp_kernel32[]=
{
FF(GetVolumeInformationA,-1)
@@ -5015,6 +5018,10 @@ struct exports exp_kernel32[]=
{"LoadLibraryExA", -1, (void*)&LoadLibraryExA},
FF(SetThreadIdealProcessor,-1)
FF(SetProcessAffinityMask, -1)
+ UNDEFF(FlsAlloc, -1)
+ UNDEFF(FlsGetValue, -1)
+ UNDEFF(FlsSetValue, -1)
+ UNDEFF(FlsFree, -1)
};
struct exports exp_msvcrt[]={
@@ -5426,6 +5433,8 @@ void* LookupExternalByName(const char* library, const char* name)
{
if(strcmp(name, libraries[i].exps[j].name))
continue;
+ if((unsigned int)(libraries[i].exps[j].func) == -1)
+ return NULL; //undefined func
// printf("Hit: 0x%08X\n", libraries[i].exps[j].func);
return libraries[i].exps[j].func;
}