[newlib-cygwin] gmon.h: Fix type of gmonparam state member

Corinna Vinschen corinna@sourceware.org
Fri Mar 11 21:50:00 GMT 2016


commit 5b972d5b297203a7717a4d8f2058867dfac3ab9e
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Fri Mar 11 22:50:24 2016 +0100

    gmon.h: Fix type of gmonparam state member
    gmonparam::state is used in calls to Win32 Interlocked functions.
    Having this defined as int breaks the build on i686.  Redefine as
    LONG (same size and correct type on all platforms) to make gcc happy.
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

 winsup/cygwin/gmon.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/gmon.h b/winsup/cygwin/gmon.h
index b0fb479..fa648a2 100644
--- a/winsup/cygwin/gmon.h
+++ b/winsup/cygwin/gmon.h
@@ -65,6 +65,9 @@ extern void mcount(void);
 #ifdef __MINGW32__
 #include <_bsd_types.h>
 #endif /* __MINGW32__*/
+#ifdef __CYGWIN__
+#include <winsup.h>
  * Structure prepended to gmon.out profiling data file.
@@ -153,7 +156,7 @@ struct rawarc {
  * The profiling data structures are housed in this structure.
 struct gmonparam {
-	volatile int	state;
+	volatile LONG	state;
 	u_short		*kcount;
 	size_t		kcountsize;
 	u_short		*froms;

More information about the Cygwin-cvs mailing list