Commit aed49d43 authored by Alexandre Julliard's avatar Alexandre Julliard

libwine: New naming scheme for 16-bit builtin dlls.

Stop using symlinks for 16-bit dlls to make sure they don't get loaded by mistake when looking for a 32-bit dll.
parent 97747453
......@@ -2,6 +2,19 @@ Makedll.rules
Makefile
Makeimplib.rules
Maketest.rules
avifile.dll16
comm.drv16
commdlg.dll16
compobj.dll16
ctl3d.dll16
ctl3dv2.dll16
ddeml.dll16
dispdib.dll16
display.drv16
gdi.exe16
imm.dll16
keyboard.drv16
krnl386.exe16
libcomdlg32.def
libgdi32.def
libkernel32.def
......@@ -9,7 +22,42 @@ liblz32.def
libmsacm32.def
libmsvfw32.def
libuser32.def
libw32skrnl.def
libwinnls32.def
libwnaspi32.def
libws2_32.def
lzexpand.dll16
mmsystem.dll16
mouse.drv16
msacm.dll16
msvideo.dll16
ole2.dll16
ole2conv.dll16
ole2disp.dll16
ole2nls.dll16
ole2prox.dll16
ole2thk.dll16
olecli.dll16
olesvr.dll16
rasapi16.dll16
setupx.dll16
shell.dll16
sound.drv16
storage.dll16
stress.dll16
system.drv16
toolhelp.dll16
twain.dll16
typelib.dll16
user.exe16
ver.dll16
w32sys.dll16
win32s16.dll16
win87em.dll16
winaspi.dll16
windebug.dll16
wineps16.drv16
wing.dll16
winnls.dll16
winsock.dll16
wintab.dll16
wprocs.dll16
......@@ -99,9 +99,9 @@ doc-sgml: $(C_SRCS)
# Rules for installation
EXE_SPECS16 = $(SPEC_SRCS16:.exe.spec=.exe)
DRV_SPECS16 = $(EXE_SPECS16:.drv.spec=.drv)
ALL_SPECS16 = $(DRV_SPECS16:.spec=.dll)
EXE_SPECS16 = $(SPEC_SRCS16:.exe.spec=.exe16)
DRV_SPECS16 = $(EXE_SPECS16:.drv.spec=.drv16)
ALL_SPECS16 = $(DRV_SPECS16:.spec=.dll16)
WIN16_INSTALL = $(ALL_SPECS16:%=_install_/%)
......@@ -109,7 +109,7 @@ WIN16_INSTALL = $(ALL_SPECS16:%=_install_/%)
.PHONY: $(ALL_SPECS16:%=_install_/%) $(IMPORTLIB:%=_install_/%) $(IMPLIB_OBJS:%=_install_static_implib_/%)
$(ALL_SPECS16:%=_install_/%): install_lib
cd $(DESTDIR)$(dlldir) && $(RM) `basename $@`$(DLLEXT) && $(LN_S) $(MODULE)$(DLLEXT) `basename $@`$(DLLEXT)
echo "$(MODULE)" > $(DESTDIR)$(dlldir)/`basename $@`
install_lib: $(MODULE)$(DLLEXT)
$(MKINSTALLDIRS) $(DESTDIR)$(dlldir)
......@@ -132,7 +132,7 @@ install install-lib:: install_lib @WIN16_INSTALL@
install install-dev:: $(IMPORTLIB:%=_install_/%) $(IMPLIB_OBJS:%=_install_static_implib_/%)
uninstall::
-cd $(DESTDIR)$(dlldir) && $(RM) $(MODULE)$(DLLEXT) $(IMPORTLIB) $(STATICIMPLIB) $(ALL_SPECS16:%=%$(DLLEXT))
-cd $(DESTDIR)$(dlldir) && $(RM) $(MODULE)$(DLLEXT) $(IMPORTLIB) $(STATICIMPLIB) $(ALL_SPECS16)
# Misc. rules
......
......@@ -170,7 +170,7 @@ foreach my $mod (sort keys %directories)
next unless defined $altnames{$mod};
foreach my $i (sort @{$altnames{$mod}})
{
$targets16{sprintf("%s.so",$i)} = 1;
$targets16{$i . "16"} = $mod;
}
}
foreach my $mod (sort keys %staticlib_dirs) { $targets{$mod} = 1; }
......@@ -230,10 +230,10 @@ foreach my $mod (sort keys %directories)
foreach my $i (sort @{$altnames{$mod}})
{
if ($count++ == 3) { printf NEWMAKE "\\\n "; $count = 1; }
printf NEWMAKE "%s.so ", $i;
printf NEWMAKE "%s16 ", $i;
}
printf NEWMAKE ": %s.so\n", $mod;
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s.so \$@\n\n", $mod;
printf NEWMAKE "\techo \"%s\" >\$\@\n\n", $mod;
}
}
foreach my $mod (sort keys %staticlib_dirs)
......
......@@ -518,6 +518,25 @@ int wine_dll_get_owner( const char *name, char *buffer, int size, int *exists )
struct dll_path_context context;
*exists = 0;
for (path = first_dll_path( name, "16", &context ); path; path = next_dll_path( &context ))
{
int fd = open( path, O_RDONLY );
if (fd != -1)
{
int res = read( fd, buffer, size - 1 );
while (res > 0 && (buffer[res-1] == '\n' || buffer[res-1] == '\r')) res--;
buffer[res] = 0;
close( fd );
*exists = 1;
ret = 0;
break;
}
}
free_dll_path( &context );
if (ret != -1) return ret;
/* try old method too for backwards compatibility; will be removed later on */
for (path = first_dll_path( name, ".so", &context ); path; path = next_dll_path( &context ))
{
int res = readlink( path, buffer, size );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment