Re: Sane on NeXT/OpenStep - a plea for help

Gordon Matzigkeit (gord@m-tech.ab.ca)
14 Jun 1997 22:20:38 -0600

Hi!

>>>>> Neville Wilford writes:

NW> It looks to my untutored eye as though something important might
NW> be missing from OpenStep's SCSI support, but how would I know.

Actually, this appears to be unrelated to your SCSI support.
`sanei_save_values.c' is a simple, portable file. I am suprised that
you have problems compiling it under OpenStep, but hey, nothing is
*really* suprising when it comes to porting software. ;)

cc -c -DHAVE_CONFIG_H -I. -I. -I../include -I../include
-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d
-DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=0 -DV_MINOR=5 -g -O2
-D_GNU_SOURCE sanei_save_values.c
sanei_save_values.c: In function `sanei_save_values':
sanei_save_values.c:64: `read' undeclared (first use this function)
sanei_save_values.c:64: (Each undeclared identifier is reported only once
sanei_save_values.c:64: for each function it appears in.)
sanei_save_values.c:65: `write' undeclared (first use this function)

I believe the C compiler gave correct error messages. Somehow, your
`read' and `write' functions have not been declared. Normally, these
functions are declared by the `unistd.h' header file.

OpenStep uses a variant of GCC, the GNU C compiler, so you should be
able to find the list of include paths.

cd into the sanei subdirectory of the SANE distribution, then run the
`cc' command above, except add the `-v' option.

i.e.

cc -v -c -DHAVE_CONFIG_H -I. -I. -I../include -I../include \
-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d \
-DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=0 -DV_MINOR=5 -g -O2 \
-D_GNU_SOURCE sanei_save_values.c

Record the output. At some point, there should be the following:

#include "..." search starts here:
#include <...> search starts here:
.
.
../include
../include
/usr/include
End of search list.

The `/usr/include' entry may be different. In any case, the `#include
<...> search' list will print a list of all the header file
directories. Ignore the relative paths `.' and `../include', since
they are part of the SANE distribution, and you don't need to worry
about them.

What you are interested in is finding the declarations of the `read'
and `write' system functions in your system header files. That work
is up to you, but here is a suggestion of how to go about it:

grep read /usr/include/*.h

or, better:

find /usr/include -type f | xargs grep read

or, even better:

find /usr/include -follow -type f | xargs grep read

Use the directories from your own search list, rather than
`/usr/include'. Record the output, and send it to the mailing list.
That will give both you and us some hint of how to proceed.

Good luck,

-- 
  Gord Matzigkeit   | Proudly running pieces of the GNU operating system.
 gord@m-tech.ab.ca  |  Jacques Cousteau loved programming in assembler.

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com