| delorie.com/archives/browse.cgi | search |
| 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: | <39A57E7F.8983C162@ision.net> |
| Date: | Thu, 24 Aug 2000 21:58:55 +0200 |
| From: | Benjamin Riefenstahl <Benjamin DOT Riefenstahl AT ision DOT net> |
| Organization: | ISION Internet AG |
| X-Mailer: | Mozilla 4.05 [en] (Win16; I) |
| MIME-Version: | 1.0 |
| To: | cygwin forum <cygwin AT sources DOT redhat DOT com> |
| Subject: | Re: G++/times causes access violation on cygwin, not linux |
| References: | <AIIPIJOPOLJFMCAA AT my-deja DOT com> |
Hi Mirko,
Mirko Vukovic wrote:
> clock_t ElapsedSystemTime;
> struct tms * pArg;
> ElapsedSystemTime=times(pArg);
You're not allocating memory for the struct tms anywhere. As it stands
you are passing an uninitialized garbage pointer to times(). I didn't
look up times() in the manual, but this should probably say
struct tms arg;
ElapsedSystemTime=times(&arg);
Note that I declared "arg" as a value of type struct tms, not as a
pointer. It's also possible that you need to initialize that value,
consult the documentation of times() for that issue.
so long, benny
--
ISION Internet AG
Benjamin Riefenstahl
mailto:benjamin DOT riefenstahl AT ision DOT net
Ruhrstrasse 61
D-22761 Hamburg
http://www.ision.net
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |