[GRASS-dev] r.terraflow Windows patch

Can someone test the attached patch on Windows (MSys)?

It eliminates various Unix-isms, specfically, it provides workarounds
for the following functions::

getpagesize
getrlimit
getrusage
gettimeofday
mkstemp
random
sbrk
unlink

It also fixes a call to putenv(), but that needs to be fixed on Unix
as well. putenv() isn't guaranteed to copy the string; in fact, POSIX
says that it shouldn't be copied. This means that passing an automatic
variable is incorrect.

According to the Linux manpage, glibc 2.1.2 and later conforms to
POSIX, while earlier versions copy the string (as does the BSD
version).

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

r.terraflow-windows.patch (4.9 KB)

On Sun, February 24, 2008 10:35, Glynn Clements wrote:

Can someone test the attached patch on Windows (MSys)?

I now get:

main.cc: In function `void record_args(int, char**)':
main.cc:327: error: `ctime_r' undeclared (first use this function)

Looking at mingw's time.h, I can confirm that there is no declaration for
ctime_r.

Moritz

Moritz Lennert wrote:

> Can someone test the attached patch on Windows (MSys)?

I now get:

main.cc: In function `void record_args(int, char**)':
main.cc:327: error: `ctime_r' undeclared (first use this function)

The attached patch should fix that issue.

If there are any remaining errors, please use "make -k", so that you
get all of them.

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

r.terraflow-windows.2.patch (409 Bytes)

On Sun, February 24, 2008 18:06, Glynn Clements wrote:

Moritz Lennert wrote:

> Can someone test the attached patch on Windows (MSys)?

I now get:

main.cc: In function `void record_args(int, char**)':
main.cc:327: error: `ctime_r' undeclared (first use this function)

The attached patch should fix that issue.

If there are any remaining errors, please use "make -k", so that you
get all of them.

Log attached.

Moritz

(attachments)

r.terraflow.make.log.gz (790 Bytes)

Moritz Lennert wrote:

>> > Can someone test the attached patch on Windows (MSys)?
>>
>> I now get:
>>
>> main.cc: In function `void record_args(int, char**)':
>> main.cc:327: error: `ctime_r' undeclared (first use this function)
>
> The attached patch should fix that issue.
>
> If there are any remaining errors, please use "make -k", so that you
> get all of them.

Log attached.

The attached patch supersedes both previous patches, and should be
applied to the stock SVN source (either revert the previous patches
with "patch -R ...", or use "svn revert").

--
Glynn Clements <glynn@gclements.plus.com>

(attachments)

r.terraflow-windows.3.patch (6.93 KB)

Compiles fine on MinGW/MSYS with an SVN checkout from an hour
ago. Can start the module and get help text. Don't know how to
use it so can't really test any further.

Best,

Benjamin

Glynn Clements wrote:

Moritz Lennert wrote:

Can someone test the attached patch on Windows (MSys)?

I now get:

main.cc: In function `void record_args(int, char**)':
main.cc:327: error: `ctime_r' undeclared (first use this function)

The attached patch should fix that issue.

If there are any remaining errors, please use "make -k", so that you
get all of them.

Log attached.

The attached patch supersedes both previous patches, and should be
applied to the stock SVN source (either revert the previous patches
with "patch -R ...", or use "svn revert").

------------------------------------------------------------------------

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Benjamin Ducke
Senior Applications Support and Development Officer

Oxford Archaeological Unit Limited
Janus House
Osney Mead
OX2 0ES
Oxford, U.K.

Tel.: ++44 (0)1865 263 800
benjamin.ducke@oxfordarch.co.uk

Benjamin Ducke wrote:

Compiles fine on MinGW/MSYS with an SVN checkout from an hour
ago. Can start the module and get help text. Don't know how to
use it so can't really test any further.

Committed.

--
Glynn Clements <glynn@gclements.plus.com>