delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/24/16:05:21

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
Message-ID: <80575AFA5F0DD31197CE00805F650D7602CD80@wilber.adroit.com>
From: "Robinow, David" <drobinow AT dayton DOT adroit DOT com>
To: "'mvukovic AT my-Deja DOT com'" <mvukovic AT my-Deja DOT com>,
cygwin forum
<cygwin AT sources DOT redhat DOT com>
Cc: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Subject: RE: G++/times causes access violation on cygwin, not linux
Date: Thu, 24 Aug 2000 15:55:14 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

------_=_NextPart_001_01C00E05.384D2760
Content-Type: text/plain;
	charset="iso-8859-1"

 Try
 struct tms * pArg = new struct tms;

pArg has to point to someting!

-----Original Message-----
From: Mirko Vukovic [mailto:mvukovic AT my-Deja DOT com]
Sent: Thursday, August 24, 2000 3:38 PM
To: cygwin forum
Cc: Earnie Boyd
Subject: Re: G++/times causes access violation on cygwin, not linux


I downloaded the latest cygwin (instal.exe worked no problem) and got same
message under 2.92.2.  To repeat, it compiled and ran without a problem
under linux and egcs 2.91.66.

(I include the code below again for reference)

Mirko

# include <sys/times.h>
# include <iostream.h>
int main()
{
  clock_t ElapsedSystemTime;
  struct tms * pArg;
  ElapsedSystemTime=times(pArg);
  cout << ElapsedSystemTime <<"\n";
  cout << pArg->tms_utime<<"\n";
  cout << pArg->tms_stime<<"\n";
  cout << pArg->tms_cutime<<"\n";
  cout << pArg->tms_cstime<<"\n";
  return 0;
}
--

On Thu, 24 Aug 2000 09:15:12   Earnie Boyd wrote:
>--- Mirko Vukovic <mvukovic AT my-Deja DOT com> wrote:
>> The code that follows in the included message compiles cleanly under both
>> cygwin (egcs 2.91.57) and linux (egcs 2.91.66), but runs only under
linux.  
>> 
>> Passing a proper variable to times() instead of NULL (pointer to a "tms"
>> structure), does not improve things.
>> 
>> I still bet it is not a bug, but what is the problem then?
>> 
>
>Your compiler is too old.  You need `gcc --version' == "2.95.2" to make it
>work.  Oh, you still need the pointer to a tms structure in time().
>
>Cheers,
>
>
>=====
>---
>   Earnie Boyd: <mailto:earnie_boyd AT yahoo DOT com>
>            __Cygwin: POSIX on Windows__
>Cygwin Newbies: <http://gw32.freeyellow.com/>
>           __Minimalist GNU for Windows__
>  Mingw32 List: <http://www.egroups.com/group/mingw32/>
>    Mingw Home: <http://www.mingw.org/>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Mail - Free email you can access from anywhere!
>http://mail.yahoo.com/
>


--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

------_=_NextPart_001_01C00E05.384D2760--

- Raw text -


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