[sane-devel] dll.c OS/2 specific patch

Franz Bakan fbakan@gmx.net
Thu, 22 Apr 2004 22:56:01 +0200 (MEST)


Hi,

thanks Henning for responding!

> On Wed, Apr 21, 2004 at 06:12:04PM +0200, Franz Bakan wrote:
> > to make dynamic loading of backend-dlls work on OS/2
> > there is a patch needed. Could someone please commit?
> 
> So currently there is no dynamic loading on OS/2? Only a shared big
> dll backend with all backends preloaded or even a statically linked
> frontend?

Yes, currently no dynamic loading, only a shared big libsane.dll
with all backends preloaded, but I found a way how I get it working.

> > Drawback on OS/2 is that the backend.dll names have a length
> > limitation. IIRC they have to be 8.3
> > Doses someone has a suggestion for a workaround?
> 
> You could try to write some Makefile/shell script code that only gets
> active on OS/2 and shortens the filename of the libs (e.g. by removing
> "sane-" from "libsane-" or if that works on OS/2 even removing the
> "lib". That will probably break shared linking of those libs.

Yes this is of course possible but it works only for backends
with max 8 character length.
The question is what to do with the rest (in an automatic way)

> Are there links on OS/2? Could you use a link with a short name
> pointing to the longer name lib?

No, there are no links.

> > *** dll.c	Mon Jan  5 23:25:16 2004
> > --- g:dll.c	Wed Apr 21 01:49:36 2004
> > ***************
> > *** 308,313 ****
> > --- 308,317 ----
> >   #   undef PREFIX
> >   #   define PREFIX "cygsane-"
> >   #   define POSTFIX "-%u.dll"
> > + #elif defined (HAVE_OS2_H)
> > + #   undef PREFIX
> > + #   define PREFIX ""
> > + #   define POSTFIX ".dll"
> >   # else
> >   #   define POSTFIX ".so.%u"
> >   # endif
> 
> If that's all I don't mind applying it as it doesn't cause problems on
> other platforms and on OS/2 I guess oyu know what you are doing :-)

Yes that's all, thanks for comitting.

Ciao,
Franz

-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info