[GRASS5] Problem with r.fill.dir

Roger S. Miller rgrmill at rt66.com
Fri May 11 11:57:08 EDT 2001



On Fri, 11 May 2001, Justin Hickey wrote:

> Hi Roger
>
> When compiling the r.fill.dir program on an SGI with MIPSPro compilers I
> get the following error:
>
> "main.c", line 52: error(1005): could not open source file "error.h"
>   #include <error.h>
>
> Since the comment for this include statement is associated with lseek,
> can you change lseek to fseek? There are other reasons for using fseek
> as well. First, fseek is a standard library function and lseek is not.
> Second, according to Kernighan and Ritchie's "The C Programming
> Language", lseek can have slower access. Thus, I would suggest changing
> lseek to fseek if possible. Then the error.h file may not be needed.


Justin,

Thanks for the pointer.  The direct solution here is to remove the line
that includes error.h.  I thought I did that before the copy went to CVS,
but I guess I didn't.  <error.h> was originally included to check on a
condition that never occured, so I removed the check.  <error.h> isn't
needed in the current version.

Markus, would you be so kind as to remove the reference to error.h?  For
some reason my DNS seems unable to find you this morning.  My mail
directly to you bounced immediately.

The code is written to use open, read, write, and lseek, (all POSIX) and I
don't think I can switch lseek to fseek (ANSI) without changing all the
other references to their ANSI counterparts.  If there are ongoing
problems, then I'll do it, but then the same change will be needed in a
lot of the rest of the GRASS code.


Roger Miller
Lee Wilson and Associates


---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list