Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-01-25 06:29:55 +0300
committerDanny Smith <dannysmith@users.sourceforge.net>2002-01-25 06:29:55 +0300
commita3e23446e2969387efdd71a2e1b062af0bedfce7 (patch)
tree9e99aa01aa1c4721f64fa843689b8f9f8e658f9f /winsup/mingw/profile/gmon.c
parent628ef8b6bb7236e750cf51cc688ab39677f5c2ed (diff)
* profile/profil.c: Update copyright info.
* profile/profil.h: Likewise. * profile/gcrt0.c: Likewise. * profile/profil.h (PROFADDR): Cast idx to unsigned long long to avoid overflow. * profile/gmon.c: Define bzero as memset if mingw32. (monstartup): Use it.
Diffstat (limited to 'winsup/mingw/profile/gmon.c')
-rw-r--r--winsup/mingw/profile/gmon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/mingw/profile/gmon.c b/winsup/mingw/profile/gmon.c
index 17398b8e2..b68f31818 100644
--- a/winsup/mingw/profile/gmon.c
+++ b/winsup/mingw/profile/gmon.c
@@ -55,6 +55,10 @@ static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $
/* XXX needed? */
//extern char *minbrk __asm ("minbrk");
+#ifdef __MINGW32__
+#define bzero(ptr,size) memset (ptr, 0, size);
+#endif
+
struct gmonparam _gmonparam = { GMON_PROF_OFF };
static int s_scale;
@@ -102,9 +106,10 @@ monstartup(lowpc, highpc)
ERR("monstartup: out of memory\n");
return;
}
-#ifdef notdef
+
+ /* zero out cp as value will be added there */
bzero(cp, p->kcountsize + p->fromssize + p->tossize);
-#endif
+
p->tos = (struct tostruct *)cp;
cp += p->tossize;
p->kcount = (u_short *)cp;