[sane-devel] OS/2 version of Sane

Franz Bakan Franz Bakan" <fbakan@gmx.net
Sun, 25 Nov 2001 22:49:24 +0100 (CET)


On Sat, 24 Nov 2001 23:29:34 +0100, abel deuring wrote:

>> 1. sharp.c refuses to compile because of the last changes in CVS:
>> 
>> sharp.c: In function `do_cancel':
>> sharp.c:2262: storage size of `ds' isn't known
>> sharp.c:2264: warning: implicit declaration of function `shmctl'
>> 
>>  I think that's because I compile without HAVE_SYS_SHM_H defined
>>  in sharp and nec backends) and so sys/shm.h is not included...
>> 
>>  (There is a sys/shm.h available for OS/2. I just renamed it some
>>  time ago to avoid fork() so it can't be found by configure)

>Oops. Did you use the CVS version of sharp.c or the one from the 1.0.6
>tarball?

1.0.6 tarball is OK, the problem was in CVS version.
>
>The CVS version contains an idiotic leftover from a test:
>
>#ifdef HAVE_SYS_SHM_H
>#define USE_FORK
>#endif
>#define USE_FORK
>
>The last line is obviously nonsense...
>
>If the error occurs for the version from Sane 1.0.6, we'll need a better
>way to make sure that USE_FORK is not defined for OS/2. 

For OS/2 it would be better if USE_FORK could be turned off independent
from having HAVE_SYS_SHM_H defined or not.

soemthing like
 #ifdef HAVE_SYS_SHM_H 'and not defined' HAVE_OS2_H
>#define USE_FORK
...

Sorry I don't know the right syntax.

Franz