kopia lustrzana https://gitlab.com/sane-project/website
292 wiersze
10 KiB
HTML
292 wiersze
10 KiB
HTML
<!-- received="Wed Apr 23 22:45:31 1997 MST" -->
|
|
<!-- sent="23 Apr 1997 23:39:49 -0600" -->
|
|
<!-- name="Gordon Matzigkeit" -->
|
|
<!-- email="gord@m-tech.ab.ca" -->
|
|
<!-- subject="sane-0.55: PINT/NetBSD fixes" -->
|
|
<!-- id="199704240255.TAA28930@web.azstarnet.com" -->
|
|
<!-- inreplyto="" -->
|
|
<title>sane-devel: sane-0.55: PINT/NetBSD fixes</title>
|
|
<h1>sane-0.55: PINT/NetBSD fixes</h1>
|
|
<b>Gordon Matzigkeit</b> (<a href="mailto:gord@m-tech.ab.ca"><i>gord@m-tech.ab.ca</i></a>)<br>
|
|
<i>23 Apr 1997 23:39:49 -0600</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#85">[ date ]</a><a href="index.html#85">[ thread ]</a><a href="subject.html#85">[ subject ]</a><a href="author.html#85">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0086.html">Matthias Lautner: "sane-0.55:can't allocate image buffer"</a>
|
|
<li> <b>Previous message:</b> <a href="0084.html">David Mosberger: "Re: xscan performance"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
--Multipart_Wed_Apr_23_23:39:49_1997-1<br>
|
|
Content-Type: text/plain; charset=US-ASCII<br>
|
|
<p>
|
|
Hi, all!<br>
|
|
<p>
|
|
Great job on 0.55, David... the graphical interface is looking slicker<br>
|
|
already.<br>
|
|
<p>
|
|
I forgot to mention (since I was too busy with PINT) that the dll<br>
|
|
backend was a little broken. Due to skew between configure.in and<br>
|
|
dll.c, it was possible to build a sane that neither preloaded backends<br>
|
|
nor had dynamic loading available. The attached patch fixes this<br>
|
|
problem.<br>
|
|
<p>
|
|
It also adds dlopen support for NetBSD. Please review this code... I<br>
|
|
think it is quite clean, but I don't know if it will break any other<br>
|
|
platforms in practice.<br>
|
|
<p>
|
|
I made a trivial fix to the build environment, so that it fails more<br>
|
|
nicely when install directories don't exist. The proper thing to do<br>
|
|
is a mkinstalldirs-type program, but I don't have time for that today.<br>
|
|
<p>
|
|
The last bit of this patch is trivial... the PINT backend was not<br>
|
|
updated to use the new sane include subdir when it was changed.<br>
|
|
<p>
|
|
With all these minor tweaks (and the latest libtool to fix a silly bug<br>
|
|
I made on NetBSD), SANE now works *beautifully* with PINT on my<br>
|
|
system.<br>
|
|
<p>
|
|
Kudos to all, especially for designing a system that was so trivial to<br>
|
|
adapt to my environment.<br>
|
|
<p>
|
|
<pre>
|
|
--
|
|
Gord Matzigkeit | Proudly running pieces of the GNU operating system.
|
|
gord@m-tech.ab.ca | Jacques Cousteau loved programming in assembler.
|
|
<p>
|
|
<p>
|
|
--Multipart_Wed_Apr_23_23:39:49_1997-1
|
|
Content-Type: application/octet-stream; type=patch
|
|
Content-Disposition: attachment; filename="sane-0.55.diff"
|
|
Content-Transfer-Encoding: 7bit
|
|
<p>
|
|
--- ChangeLog.orig Wed Apr 23 23:03:45 1997
|
|
+++ ChangeLog Wed Apr 23 23:24:40 1997
|
|
@@ -1,3 +1,26 @@
|
|
+Wed Apr 23 23:03:47 1997 Gordon Matzigkeit <<a href="mailto:gord@gnu.ai.mit.edu">gord@gnu.ai.mit.edu</a>>
|
|
+
|
|
+ * backend/Makefile.in, frontend/Makefile.in: Specify full
|
|
+ filenames, rather than just the directory name for INSTALL
|
|
+ destinations. This Automakeism helps debugging when the target
|
|
+ directory doesn't exist.
|
|
+
|
|
+ * include/sane/config.h.in (HAVE_SYS_SCANIO_H): Define, for PINT's
|
|
+ sake.
|
|
+
|
|
+ * backend/pint.c: Prefix sane includes with <sane/...>.
|
|
+
|
|
+ * backend/dll.c (RTLD_NOW): Paramaterize, so that RTLD_LAZY is
|
|
+ used if RTLD_NOW is not defined.
|
|
+ (load): Try looking up the symbol with a leading underscore, if we
|
|
+ can't find it the first time.
|
|
+
|
|
+ Make dynamic loading conditional on HAVE_DLOPEN rather than the
|
|
+ library and header file.
|
|
+
|
|
+ * configure.in (enable_dynamic): Disable dynamic loading if the
|
|
+ system doesn't have dlopen.
|
|
+
|
|
Tue Apr 22 00:17:41 1997 David Mosberger-Tang <<a href="mailto:davidm@azstarnet.com">davidm@azstarnet.com</a>>
|
|
|
|
* frontend/xscanimage.c (browse_filename_callback): Initialize
|
|
@@ -230,8 +253,8 @@
|
|
installed.
|
|
|
|
Sat Apr 19 18:15:03 1997 Michael K. Johnson <<a href="mailto:johnsonm@redhat.com">johnsonm@redhat.com</a>>
|
|
-
|
|
- * */*.[ch]: Prefix sane-includese with <sane/...>.
|
|
+
|
|
+ * */*.[ch]: Prefix sane-includes with <sane/...>.
|
|
include/sane*: Move to include/sane subdirectory.
|
|
|
|
Sat Apr 19 08:25:36 1997 David Mosberger-Tang <<a href="mailto:davidm@azstarnet.com">davidm@azstarnet.com</a>>
|
|
--- backend/Makefile.in.orig Tue Apr 22 23:13:09 1997
|
|
+++ backend/Makefile.in Tue Apr 22 23:56:21 1997
|
|
@@ -73,8 +73,9 @@
|
|
install:
|
|
@list="$(LIBS)"; for be in $$list; do \
|
|
echo installing $${be} in $(libdir)...; \
|
|
- $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${be} $(libdir); \
|
|
+ $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${be} $(libdir)/$${be}; \
|
|
done
|
|
+ $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) libsane.la $(libdir)/libsane.la
|
|
ln -f -s libsane-dll.so $(libdir)/libsane.so.$(V_MAJOR)
|
|
ln -f -s libsane-dll.a $(libdir)/libsane.a
|
|
-mkdir $(configdir)
|
|
@@ -84,7 +85,7 @@
|
|
echo NOT overwriting $${cfg} in $(configdir)...; \
|
|
else \
|
|
echo installing $${cfg} in $(configdir)...; \
|
|
- $(INSTALL_DATA) $${cfg} $(configdir); \
|
|
+ $(INSTALL_DATA) $${cfg} $(configdir)/$${cfg}; \
|
|
fi; \
|
|
done
|
|
|
|
@@ -128,6 +129,7 @@
|
|
libsane-hp.la: ../sanei/sanei_scsi.lo
|
|
libsane-mustek.la: ../sanei/sanei_constrain_value.lo
|
|
libsane-mustek.la: ../sanei/sanei_scsi.lo
|
|
+libsane-pint.la: ../sanei/sanei_constrain_value.lo
|
|
libsane-net.la: ../sanei/sanei_codec_bin.lo
|
|
libsane-net.la: ../sanei/sanei_net.lo
|
|
libsane-net.la: ../sanei/sanei_wire.lo
|
|
--- backend/dll.c.orig Tue Apr 22 22:47:14 1997
|
|
+++ backend/dll.c Wed Apr 23 23:17:48 1997
|
|
@@ -24,7 +24,7 @@
|
|
|
|
#include <lalloca.h> /* MUST come first for AIX! */
|
|
|
|
-#if defined(HAVE_DLFCN_H) && defined(HAVE_LIBDL)
|
|
+#ifdef HAVE_DLOPEN
|
|
# define DYNAMIC
|
|
#else
|
|
# undef DYNAMIC
|
|
@@ -36,8 +36,11 @@
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
-#ifdef DYNAMIC
|
|
+#if defined(DYNAMIC) && defined(HAVE_DLFCN_H)
|
|
# include <dlfcn.h>
|
|
+# ifndef RTLD_NOW
|
|
+# define RTLD_NOW RTLD_LAZY
|
|
+# endif
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
@@ -220,11 +223,19 @@
|
|
{
|
|
void *(*op) ();
|
|
|
|
- sprintf (funcname, "sane_%s_%s", be->name, op_name[i]);
|
|
+ sprintf (funcname, "_sane_%s_%s", be->name, op_name[i]);
|
|
|
|
- op = (void *(*)()) dlsym (be->handle, funcname);
|
|
+ /* First try looking up the symbol without a leading underscore. */
|
|
+ op = (void *(*)()) dlsym (be->handle, funcname + 1);
|
|
if (op)
|
|
be->op[i] = op;
|
|
+ else
|
|
+ {
|
|
+ /* Try again, with an underscore prepended. */
|
|
+ op = (void *(*)()) dlsym (be->handle, funcname);
|
|
+ if (op)
|
|
+ be->op[i] = op;
|
|
+ }
|
|
}
|
|
|
|
return SANE_STATUS_GOOD;
|
|
--- backend/pint.c.orig Tue Apr 22 22:47:37 1997
|
|
+++ backend/pint.c Tue Apr 22 23:09:01 1997
|
|
@@ -20,22 +20,22 @@
|
|
This file implements a SANE backend for the PINT (PINT Is Not TWAIN)
|
|
scanner device driver, commonly found in NetBSD. */
|
|
|
|
-#include <config.h>
|
|
+#include <sane/config.h>
|
|
|
|
#include <limits.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
extern int errno;
|
|
|
|
-#include <sane.h>
|
|
-#include <saneopts.h>
|
|
+#include <sane/sane.h>
|
|
+#include <sane/saneopts.h>
|
|
|
|
#include "pint.h"
|
|
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
-#include <sanei_backend.h>
|
|
+#include <sane/sanei_backend.h>
|
|
|
|
#define PATH_PINT_CONFIG STRINGIFY(PATH_SANE_CONFIG_DIR) "/pint.conf"
|
|
|
|
--- configure.in.orig Wed Apr 23 00:02:43 1997
|
|
+++ configure.in Wed Apr 23 00:09:08 1997
|
|
@@ -110,8 +110,10 @@
|
|
-DPATH_SANE_DATA_DIR=\$(datadir) \
|
|
-DV_MAJOR=${V_MAJOR} -DV_MINOR=${V_MINOR}"
|
|
if test "${enable_dynamic}" != "no"; then
|
|
- AC_CHECK_HEADERS(dlfcn.h,HAVE_DLFCN_H="yes")
|
|
- AC_CHECK_LIB(dl,dlopen)
|
|
+ AC_CHECK_HEADERS(dlfcn.h,
|
|
+ [AC_CHECK_LIB(dl,dlopen)
|
|
+ AC_CHECK_FUNCS(dlopen, , enable_dynamic=no)],
|
|
+ [enable_dynamic=no])
|
|
fi
|
|
if test "${enable_ld_fix}" = "no"; then
|
|
echo "disabling Mustek line-distance bug workaround"
|
|
@@ -138,7 +140,7 @@
|
|
if test "${enable_shared}" = "no"; then
|
|
enable_preload=yes
|
|
fi
|
|
-if test "${HAVE_DLFCN_H}" != "yes" -o "${enable_preload}" = "yes"; then
|
|
+if test "${enable_dynamic}" = no || test "${enable_preload}" = "yes"; then
|
|
echo "preloading backends into DLL"
|
|
DLL_PRELOAD="\$(PRELOADABLE_BACKENDS)"
|
|
else
|
|
--- frontend/Makefile.in.orig Tue Apr 22 23:58:38 1997
|
|
+++ frontend/Makefile.in Tue Apr 22 23:59:01 1997
|
|
@@ -64,12 +64,12 @@
|
|
mkdir $(sbindir); \
|
|
fi
|
|
@for program in $(BINPROGS); do \
|
|
- $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} $(bindir); \
|
|
+ $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} $(bindir)/$${program}; \
|
|
done
|
|
@for program in $(SBINPROGS); do \
|
|
- $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} $(sbindir); \
|
|
+ $(LIBTOOL) $(MINST) $(INSTALL_PROGRAM) $${program} $(sbindir)/$${program}; \
|
|
done
|
|
- $(INSTALL_DATA) sane-style.rc $(datadir)
|
|
+ $(INSTALL_DATA) sane-style.rc $(datadir)/sane-style.rc
|
|
|
|
test: test.o $(LIBSANE) $(LIBLIB)
|
|
@$(LIBTOOL) $(MLINK) $(LINK) test.o $(LIBSANE) $(LIBLIB) $(LIBS)
|
|
--- include/sane/config.h.in.orig Tue Apr 22 23:10:30 1997
|
|
+++ include/sane/config.h.in Wed Apr 23 00:10:50 1997
|
|
@@ -187,6 +187,9 @@
|
|
/* Define if you have the <sys/scsiio.h> header file. */
|
|
#undef HAVE_SYS_SCSIIO_H
|
|
|
|
+/* Define if you have the <sys/scanio.h> header file. */
|
|
+#undef HAVE_SYS_SCANIO_H
|
|
+
|
|
/* Define if you have the <unistd.h> header file. */
|
|
#undef HAVE_UNISTD_H
|
|
|
|
@@ -205,8 +208,8 @@
|
|
/* Define if you have the <dlfcn.h> header file. */
|
|
#undef HAVE_DLFCN_H
|
|
|
|
-/* Define if you have the dl library (-lm); defines dlopen() etc. */
|
|
-#undef HAVE_LIBDL
|
|
+/* Define if you have the dlopen function. */
|
|
+#undef HAVE_DLOPEN
|
|
|
|
/* Define if you have the GIMP header files and library. */
|
|
#undef HAVE_LIBGIMP_GIMP_H
|
|
<p>
|
|
--Multipart_Wed_Apr_23_23:39:49_1997-1--
|
|
<p>
|
|
<pre>
|
|
--
|
|
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
|
|
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
|
|
</pre>
|
|
<!-- body="end" -->
|
|
<p>
|
|
<ul>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0086.html">Matthias Lautner: "sane-0.55:can't allocate image buffer"</a>
|
|
<li> <b>Previous message:</b> <a href="0084.html">David Mosberger: "Re: xscan performance"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|