sane-project-website/old-archive/1997-05/0092.html

192 wiersze
9.5 KiB
HTML

<!-- received="Sun Jun 15 10:47:54 1997 MST" -->
<!-- sent="Sun, 15 Jun 97 15:36:33 +0100" -->
<!-- name="Neville Wilford" -->
<!-- email="jnw@phaedrus.demon.co.uk" -->
<!-- subject="Re: Sane on NeXT/OpenStep - a plea for help" -->
<!-- id="199706151436.PAA02894@phaedrus.demon.co.uk" -->
<!-- inreplyto="86wwnwzecp.fsf@localhost.profitpress.com" -->
<title>sane-devel: Re: Sane on NeXT/OpenStep - a plea for help</title>
<h1>Re: Sane on NeXT/OpenStep - a plea for help</h1>
<b>Neville Wilford</b> (<a href="mailto:jnw@phaedrus.demon.co.uk"><i>jnw@phaedrus.demon.co.uk</i></a>)<br>
<i>Sun, 15 Jun 97 15:36:33 +0100</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#92">[ date ]</a><a href="index.html#92">[ thread ]</a><a href="subject.html#92">[ subject ]</a><a href="author.html#92">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0093.html">David Mosberger-Tang: "Re: ScanJet 5p working with SANE"</a>
<li> <b>Previous message:</b> <a href="0091.html">David Mosberger-Tang: "gtk libraries on Linux"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0096.html">Gordon Matzigkeit: "Re: Sane on NeXT/OpenStep - a plea for help"</a>
<li> <b>Reply:</b> <a href="0096.html">Gordon Matzigkeit: "Re: Sane on NeXT/OpenStep - a plea for help"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Hello again,<br>
<p>
Thanks to Gordon Matzigkeit for a very helpful and patient message.<br>
He wrote:<br>
<p>
<i>&gt; Actually, this appears to be unrelated to your SCSI support.</i><br>
<i>&gt; `sanei_save_values.c' is a simple, portable file. I am suprised</i><br>
<i>&gt; that you have problems compiling it under OpenStep, but hey,</i><br>
<i>&gt; nothing is *really* suprising when it comes to porting software.</i><br>
<i>&gt;</i><br>
<i>&gt;</i><br>
<i>&gt; I believe the C compiler gave correct error messages. Somehow, your</i><br>
<i>&gt; `read' and `write' functions have not been declared. Normally,</i><br>
<i>&gt; these functions are declared by the `unistd.h' header file.</i><br>
<p>
phaedrus:30# find / -name unistd.h -print<br>
/NextDeveloper/Headers/bsd/unistd.h<br>
<p>
I'm hoping this might count as a significant clue.<br>
<p>
<i>&gt;</i><br>
<i>&gt; OpenStep uses a variant of GCC, the GNU C compiler, so you should</i><br>
<i>&gt; be able to find the list of include paths.</i><br>
<i>&gt;</i><br>
<i>&gt; cd into the sanei subdirectory of the SANE distribution, then run</i><br>
<i>&gt; the `cc' command above, except add the `-v' option.</i><br>
<i>&gt;</i><br>
<i>&gt; Record the output. At some point, there should be the following:</i><br>
<i>&gt;</i><br>
<i>&gt; #include "..." search starts here:</i><br>
<i>&gt; #include &lt;...&gt; search starts here:</i><br>
<i>&gt; .</i><br>
<p>
Here goes,<br>
<p>
phaedrus:6# cd sanei<br>
phaedrus:7# cc -v -c -DHAVE_CONFIG_H -I. -I. -I../include -I../include \<br>
-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d \<br>
-DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=0 -DV_MINOR=5 -g -O2 \<br>
-D_GNU_SOURCE sanei_save_values.c<br>
Reading specs from /lib/i386/specs<br>
NeXT Computer, Inc. version cc-475, gcc version 2.5.8<br>
/lib/i386/cpp-precomp -smart -lang-c -v -I. -I. -I../include <br>
-I../include -arch i386 -undef -D__GNUC__=2 -D__GNU__ -Di386 -DNeXT <br>
-Dunix -D__i386__ -D__NeXT__ -D__unix__ -D__MACH__ <br>
-D__LITTLE_ENDIAN__ -D__ARCHITECTURE__=\"i386\" -D__i386 -D__NeXT <br>
-D__unix -D__OPTIMIZE__ -g -dynamic -D__STDC__ -D_NEXT_SOURCE <br>
-DNX_COMPILER_RELEASE_3_0=300 -DNX_COMPILER_RELEASE_3_1=310 <br>
-DNX_COMPILER_RELEASE_3_2=320 -DNX_COMPILER_RELEASE_3_3=330 <br>
-DNX_CURRENT_COMPILER_RELEASE=400 -DNS_TARGET_MINOR=0 <br>
-DNS_TARGET_MAJOR=4 -DNS_TARGET=40 -D__GNUC_MINOR__=5 -D__NEXT_CPP__ <br>
-D__DYNAMIC__ -DHAVE_CONFIG_H <br>
-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d <br>
-DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=0 -DV_MINOR=5 <br>
-D_GNU_SOURCE sanei_save_values.c /usr/tmp/cc002351.i<br>
NeXT DevKit-based CPP 4.0<br>
/lib/i386/cc1obj /usr/tmp/cc002351.i -arch i386 -quiet -dumpbase <br>
sanei_save_values.c -dynamic -g -O2 -version -fPIC -o <br>
/usr/tmp/cc002351.s<br>
GNU Objective-C version 2.5.8 (80386, BSD syntax) compiled by GNU C <br>
version 2.5.8.<br>
sanei_save_values.c: In function `sanei_save_values':<br>
sanei_save_values.c:64: `read' undeclared (first use this function)<br>
sanei_save_values.c:64: (Each undeclared identifier is reported only once<br>
sanei_save_values.c:64: for each function it appears in.)<br>
sanei_save_values.c:65: `write' undeclared (first use this function)<br>
<p>
Is "-I../include -I../include -arch i386 -undef " something to do <br>
with the problem? There doesn't seem to be an include search list in <br>
the format we were expecting.<br>
Neither is there any mention of /NextDeveloper/Headers/bsd<br>
<i>&gt;</i><br>
<i>&gt; What you are interested in is finding the declarations of the</i><br>
<i>&gt; `read' and `write' system functions in your system header files.</i><br>
<i>&gt; That work is up to you, but here is a suggestion of how to go about</i><br>
<i>&gt; it:</i><br>
<i>&gt;</i><br>
phaedrus:31# grep read /usr/include/*.h<br>
No match.<br>
<p>
phaedrus:32# find /usr/include -type f | xargs grep read<br>
phaedrus:33#<br>
<p>
phaedrus:33# find /usr/include -follow -type f | xargs grep read<br>
find: bad option &lt; -follow &gt;<br>
<p>
<i>&gt; Use the directories from your own search list, rather than</i><br>
<i>&gt; `/usr/include'. Record the output, and send it to the mailing list.</i><br>
<i>&gt; That will give both you and us some hint of how to proceed.</i><br>
<i>&gt;</i><br>
phaedrus:34# grep read /NextDeveloper/Headers/bsd/*.h<br>
/NextDeveloper/Headers/bsd/ci.h:extern char cinext[]; /* <br>
use this instead of reading file */<br>
/NextDeveloper/Headers/bsd/exportent.h:#define RO_OPT "ro" <br>
/* export read-only */<br>
/NextDeveloper/Headers/bsd/exportent.h:#define RW_OPT "rw" <br>
/* export read-mostly */<br>
/NextDeveloper/Headers/bsd/fstab.h:#define FSTAB_RW "rw" <br>
/* read/write device */<br>
/NextDeveloper/Headers/bsd/fstab.h:#define FSTAB_RQ "rq" <br>
/* read/write with quotas */<br>
/NextDeveloper/Headers/bsd/fstab.h:#define FSTAB_RO "ro" <br>
/* read-only device */<br>
/NextDeveloper/Headers/bsd/libc.h:extern int read(int, void *, <br>
int), write(int, const void *, int);<br>
/NextDeveloper/Headers/bsd/libc.h:extern int readv(int, struct <br>
iovec *, int), writev(int, struct iovec *, int);<br>
/NextDeveloper/Headers/bsd/libc.h:extern int readlink(const char <br>
*, char *, int);<br>
/NextDeveloper/Headers/bsd/mntent.h:#define MNTOPT_RO "ro" <br>
/* read only */<br>
/NextDeveloper/Headers/bsd/mntent.h:#define MNTOPT_RW "rw" <br>
/* read/write */<br>
/NextDeveloper/Headers/bsd/mtab.h: char m_type[4]; <br>
/* read-only, quotas */<br>
/NextDeveloper/Headers/bsd/ndbm.h: long dbm_blkno; <br>
/* current page to read/write */<br>
/NextDeveloper/Headers/bsd/ndbm.h:#define _DBM_RDONLY 0x1 /* <br>
data base open read-only */<br>
/NextDeveloper/Headers/bsd/pcc.h: * needed to use the <br>
intermediate code files generated and read by<br>
/NextDeveloper/Headers/bsd/syscall.h:#define SYS_read 3<br>
/NextDeveloper/Headers/bsd/syscall.h:#define SYS_readlink 58<br>
/NextDeveloper/Headers/bsd/syscall.h: /* <br>
67 is old: vread */<br>
/NextDeveloper/Headers/bsd/syscall.h:#define SYS_readv 120<br>
/NextDeveloper/Headers/bsd/sysexits.h:** already return. The <br>
meaning of the codes is approximately<br>
/NextDeveloper/Headers/bsd/sysexits.h:** exist or was <br>
not readable. This could also include<br>
/NextDeveloper/Headers/bsd/tar.h: #define TUREAD <br>
00400 /* read by owner */<br>
/NextDeveloper/Headers/bsd/tar.h: #define TGREAD <br>
00040 /* read by group */<br>
/NextDeveloper/Headers/bsd/tar.h: #define TOREAD <br>
00004 /* read by other */<br>
/NextDeveloper/Headers/bsd/unistd.h: extern ssize_t <br>
read(int fildes, void *buf, size_t nbyte);<br>
/NextDeveloper/Headers/bsd/unistd.h: extern ssize_t read();<br>
<p>
Thanks again, but I don't think I'm doing very well here. Sorry to <br>
be such a complete dimwit.<br>
Is it possible that putting /NextDeveloper/Headers/bsd somewhere in <br>
the include path might be helpful?<br>
<p>
Once again many thanks,<br>
Neville<br>
<pre>
--
Internet: <a href="mailto:jnw@phaedrus.demon.co.uk">jnw@phaedrus.demon.co.uk</a> CompuServe: 100042,3501
<a href="mailto:j.n.wilford@ncl.ac.uk">j.n.wilford@ncl.ac.uk</a> PGP 2.x public key available
<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="0093.html">David Mosberger-Tang: "Re: ScanJet 5p working with SANE"</a>
<li> <b>Previous message:</b> <a href="0091.html">David Mosberger-Tang: "gtk libraries on Linux"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0096.html">Gordon Matzigkeit: "Re: Sane on NeXT/OpenStep - a plea for help"</a>
<li> <b>Reply:</b> <a href="0096.html">Gordon Matzigkeit: "Re: Sane on NeXT/OpenStep - a plea for help"</a>
<!-- reply="end" -->
</ul>