delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/06/22:39:41

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 6 Jan 2001 22:39:12 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Cc: rickhg12hs AT yahoo DOT com, victor AT shoup DOT net, sho AT zurich DOT ibm DOT com
Subject: Re: NTL Version 5.0c & Cygwin tools
Message-ID: <20010106223912.B14912@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, rickhg12hs AT yahoo DOT com, victor AT shoup DOT net,
sho AT zurich DOT ibm DOT com
References: <20010106232203 DOT 5113 DOT qmail AT web1101 DOT mail DOT yahoo DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <20010106232203.5113.qmail@web1101.mail.yahoo.com>; from rickhg12hs@yahoo.com on Sat, Jan 06, 2001 at 03:22:03PM -0800

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 AT W8L05 ~/g++/NTL
>$ g++ --version
>2.95.2-6
>
>rick AT W8L05 ~/g++/NTL
>$ g++ -o TimeTest TimeTest.C
>
>rick AT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019