Subject: Re: NTL Version 5.0c & Cygwin tools
From: Christopher Faylor <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked], [email-masked]
Date: Sat, 6 Jan 2001 22:39:12 -0500

I don't know what NTL 5.0c might be but if you are running the program
on Windows 9x, then getrusage will not work because the API that
Cygwin uses to retrieve this information is only supported on NT.

cgf

P.S.  Geoffrey Noer has not been involved in the Cygwin project for some
time and is no longer with Red Hat.

On Sat, Jan 06, 2001 at 03:22:03PM -0800, Richard Graham wrote:
>Victor, (& Cygwin'ers)
>
>I wanted to let you know that there is "hiccup" when
>building NTL version 5.0c using the Cygwin tools on
>my Win98 Dell Laptop.  The only problem I know of is
>during the build, the finished library seems to work
>fine.
>
>During makefile's "setup2", "MakeGetTime" creates GetTime.c by
>checking for the successful compile/link of "TestGetTime".
>Under cygwin, "GetTime1.c" which makes calls to sys/resource's
>"getrusage" compiles and runs.  Unfortunately, all the values
>returned are always "0".  I don't know if that is the intended
>behavior, or if perhaps it's just a cygwin empty stub.
>
>However, since "TestGetTime" is created, "GetTime1.c" is copied
>to "GetTime.c".  Later, during "setup4" - the Wizard, the first
>timing test is essentially an infinite loop since you check
>for a minimum elapsed time.
>
>Good News! ...
>
>"GetTime4.c" does seem to work under cygwin so all I had to do
>was to manually perform "setup2" by "cp GetTime4.c GetTime.c".
>The Wizard then can do its stuff and then ntl.a can be built
>and tested.
>
>I have Cc'ed some Cygnus folks to see if they can comment.  I'm
>not sure if you want to actually test "TestGetTime" in "setup2"
>to see if the returned values are reasonable and usable.
>
>Thanks again for making your NTL public!
>
>Richard Graham
>
>P.S.  I didn't receive notification of 5.0c availability.  Would
>      you make sure I'm on the list?  Thanks!
>__________________________________________________________________
>
>Example showing problem with Cygwin ...
>
>$ cat TimeTest.C
>
>#include <iostream>
>#include <sys/resource.h>
>
>int main()
>{
>  struct rusage used;
>
>  while (true) {
>    getrusage(RUSAGE_SELF, &used);
>    cout << "used.ru_utime.tv_sec:= " << used.ru_utime.tv_sec << '\n';
>    cout << "used.ru_stime.tv_sec:= " << used.ru_stime.tv_sec << '\n';
>    cout << "used.ru_utime.tv_usec:= " << used.ru_utime.tv_usec <<
>'\n';
>    cout << "used.ru_stime.tv_usec:= " << used.ru_stime.tv_usec <<
>'\n';
>  }
>
>}
>
>
>rick@W8L05 ~/g++/NTL
>$ g++ --version
>2.95.2-6
>
>rick@W8L05 ~/g++/NTL
>$ g++ -o TimeTest TimeTest.C
>
>rick@W8L05 ~/g++/NTL
>$ ./TimeTest
>used.ru_utime.tv_sec:= 0
>used.ru_stime.tv_sec:= 0
>used.ru_utime.tv_usec:= 0
>used.ru_stime.tv_usec:= 0
>used.ru_utime.tv_sec:= 0
>used.ru_stime.tv_sec:= 0
>used.ru_utime.tv_usec:= 0
>... [forever]
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Photos - Share your holiday photos online!
>http://photos.yahoo.com/
>
>--
>Want to unsubscribe from this list?
>Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple