Re: [sane-devel] [PATCH] undef linux before defining STRINGIFY

2015-06-09 Thread Olaf Meeuwissen

Olaf Meeuwissen writes:

> Niels Ole Salscheider writes:
>
>> Am 2015-06-09 14:21, schrieb m. allan noah:
>>> We need more info here. Where do you see this expansion problem?
>>> 
>>> allan
>>
>> The problem is that LIBDIR is passed as a define from the build system.
>> Then, STRINGIFY(LIBDIR) is used in backend/dll.c to get a string of the 
>> search path for the backends.
>> This seems to be fine but it can become a problem since "linux" is 
>> definded to "1" by default.
>>
>> This causes an issue on e. g. Exherbo, my linux distribution. Exherbo 
>> installs all packages to /usr/target-triplet/{bin,lib,include,...} so 
>> that you can have packages for different architectures on the same root. 
>> On my system, sane would be installed to /usr/x86_64-pc-linux-gnu/..., 
>> so that LIBDIR would be defined to be /usr/x86_64-pc-linux-gnu/lib.
>> But now, STRINGIFY(LIBDIR) turns this into /usr/x86_64-pc-1-gnu/lib 
>> (since it also expands linux) - and as a result, sane cannot find any 
>> backends.
>
> Rather than willy-nilly undefine `linux` (unconditionally at that) in
> include/sane/sanei.h without really knowing what else might break ;-),
> I would remove the `STRINGIFY()` calls from backend/dll.c.  The build
> system passes LIBDIR as a properly quoted string already with a
>
>  -DLIBDIR="$(libdir)/sane"
>
> in AM_CPPFLAGS in backend/Makefile.am.

Scrap that.  I shouldn't reply before the second cup of coffee.  :-(

The double quotes in Makefile.am are eaten by the shell.  You would also
need to change the above to

  -DLIBDIR="\"$(libdir)/sane\""

in backend/Makefile.am and run autoreconf to update the rest of the
build system to make my suggestion work.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [PATCH] undef linux before defining STRINGIFY

2015-06-09 Thread Olaf Meeuwissen

Niels Ole Salscheider writes:

> Am 2015-06-09 14:21, schrieb m. allan noah:
>> We need more info here. Where do you see this expansion problem?
>> 
>> allan
>
> The problem is that LIBDIR is passed as a define from the build system.
> Then, STRINGIFY(LIBDIR) is used in backend/dll.c to get a string of the 
> search path for the backends.
> This seems to be fine but it can become a problem since "linux" is 
> definded to "1" by default.
>
> This causes an issue on e. g. Exherbo, my linux distribution. Exherbo 
> installs all packages to /usr/target-triplet/{bin,lib,include,...} so 
> that you can have packages for different architectures on the same root. 
> On my system, sane would be installed to /usr/x86_64-pc-linux-gnu/..., 
> so that LIBDIR would be defined to be /usr/x86_64-pc-linux-gnu/lib.
> But now, STRINGIFY(LIBDIR) turns this into /usr/x86_64-pc-1-gnu/lib 
> (since it also expands linux) - and as a result, sane cannot find any 
> backends.

Rather than willy-nilly undefine `linux` (unconditionally at that) in
include/sane/sanei.h without really knowing what else might break ;-),
I would remove the `STRINGIFY()` calls from backend/dll.c.  The build
system passes LIBDIR as a properly quoted string already with a

 -DLIBDIR="$(libdir)/sane"

in AM_CPPFLAGS in backend/Makefile.am.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [PATCH] undef linux before defining STRINGIFY

2015-06-09 Thread Niels Ole Salscheider

Am 2015-06-09 14:21, schrieb m. allan noah:

We need more info here. Where do you see this expansion problem?

allan


The problem is that LIBDIR is passed as a define from the build system.
Then, STRINGIFY(LIBDIR) is used in backend/dll.c to get a string of the 
search path for the backends.
This seems to be fine but it can become a problem since "linux" is 
definded to "1" by default.


This causes an issue on e. g. Exherbo, my linux distribution. Exherbo 
installs all packages to /usr/target-triplet/{bin,lib,include,...} so 
that you can have packages for different architectures on the same root. 
On my system, sane would be installed to /usr/x86_64-pc-linux-gnu/..., 
so that LIBDIR would be defined to be /usr/x86_64-pc-linux-gnu/lib.
But now, STRINGIFY(LIBDIR) turns this into /usr/x86_64-pc-1-gnu/lib 
(since it also expands linux) - and as a result, sane cannot find any 
backends.


Ole


On Sun, Jun 7, 2015 at 4:14 PM, Niels Ole Salscheider
 wrote:

Otherwise, "linux" will be expanded to "1" when it is stringified.

This is a problem for e. g. LIBDIR, which might contain a target 
triplet.
On my system, /usr/x86_64-pc-linux-gnu-gcc would expand to 
x86_64-pc-1-gnu-gcc.

---
 include/sane/sanei.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/sane/sanei.h b/include/sane/sanei.h
index ece1beb..90ec028 100644
--- a/include/sane/sanei.h
+++ b/include/sane/sanei.h
@@ -140,6 +140,9 @@
 /** @hideinitializer */
 #define NELEMS(a)  ((int)(sizeof (a) / sizeof (a[0])))

+/* undef linux so that it can be stringified. It would expand to 1 
otherwise. */

+#undef linux
+
 /** @hideinitializer */
 #define STRINGIFY1(x)  #x
 /** @hideinitializer */
--
2.4.2


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [PATCH] undef linux before defining STRINGIFY

2015-06-09 Thread m. allan noah
We need more info here. Where do you see this expansion problem?

allan

On Sun, Jun 7, 2015 at 4:14 PM, Niels Ole Salscheider
 wrote:
> Otherwise, "linux" will be expanded to "1" when it is stringified.
>
> This is a problem for e. g. LIBDIR, which might contain a target triplet.
> On my system, /usr/x86_64-pc-linux-gnu-gcc would expand to 
> x86_64-pc-1-gnu-gcc.
> ---
>  include/sane/sanei.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/include/sane/sanei.h b/include/sane/sanei.h
> index ece1beb..90ec028 100644
> --- a/include/sane/sanei.h
> +++ b/include/sane/sanei.h
> @@ -140,6 +140,9 @@
>  /** @hideinitializer */
>  #define NELEMS(a)  ((int)(sizeof (a) / sizeof (a[0])))
>
> +/* undef linux so that it can be stringified. It would expand to 1 
> otherwise. */
> +#undef linux
> +
>  /** @hideinitializer */
>  #define STRINGIFY1(x)  #x
>  /** @hideinitializer */
> --
> 2.4.2
>
>
> --
> sane-devel mailing list: sane-devel@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>  to sane-devel-requ...@lists.alioth.debian.org



-- 
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] [PATCH] undef linux before defining STRINGIFY

2015-06-09 Thread Niels Ole Salscheider
Otherwise, "linux" will be expanded to "1" when it is stringified.

This is a problem for e. g. LIBDIR, which might contain a target triplet.
On my system, /usr/x86_64-pc-linux-gnu-gcc would expand to x86_64-pc-1-gnu-gcc.
---
 include/sane/sanei.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/sane/sanei.h b/include/sane/sanei.h
index ece1beb..90ec028 100644
--- a/include/sane/sanei.h
+++ b/include/sane/sanei.h
@@ -140,6 +140,9 @@
 /** @hideinitializer */
 #define NELEMS(a)  ((int)(sizeof (a) / sizeof (a[0])))
 
+/* undef linux so that it can be stringified. It would expand to 1 otherwise. 
*/
+#undef linux
+
 /** @hideinitializer */
 #define STRINGIFY1(x)  #x
 /** @hideinitializer */
-- 
2.4.2


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Scanner Button Daemon [scanbd]: release 1.4.3

2015-06-09 Thread Wilhelm
Hi all,

I like to announce the new version 1.4.3 of scanbd, the scanner button
daemon.

This release fixes an important bug using more than one scanner a the
same time.

Feel free to get it via

http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.4.3.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.4.3

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]

-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org