From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: gdb@sources.redhat.com Cc: ac131313@cygnus.com Subject: DOS/Windows-specific code in sim/ Date: Tue, 08 May 2001 04:54:00 -0000 Message-id: <200105081156.OAA06345@is.elta.co.il> References: <20010503211502.21716.qmail@web6401.mail.yahoo.com> <3AF1DAA0.3060702@cygnus.com> <200105071609.TAA24129@is.elta.co.il> X-SW-Source: 2001-05/msg00114.html * sim/callback.c: #if defined(__GO32__) || defined (_MSC_VER) static int os_poll_quit (p) host_callback *p; { #if defined(__GO32__) int kbhit (); int getkey (); if (kbhit ()) { int k = getkey (); if (k == 1) { return 1; } else if (k == 2) { return 1; } else { sim_cb_eprintf (p, "CTRL-A to quit, CTRL-B to quit harder\n"); } } #endif #if defined (_MSC_VER) /* NB - this will not compile! */ int k = win32pollquit(); if (k == 1) return 1; else if (k == 2) return 1; #endif return 0; } #else #define os_poll_quit 0 #endif /* defined(__GO32__) || defined(_MSC_VER) */ This is an old code which was changed in utils.c long ago. Is some platform still using this? * sim/common/sim-signal.c: #ifdef _MSC_VER #ifndef SIGTRAP #define SIGTRAP 5 #endif #ifndef SIGBUS #define SIGBUS 10 #endif #ifndef SIGQUIT #define SIGQUIT 3 #endif #endif Does someone know why this is done? If SIGTRAP etc. are not defined, the code should simply not reference it. * sim/common/sim-types.h: #if !defined (SIM_TYPES_H) && defined (_MSC_VER) #define SIM_TYPES_H /* bit based */ #define UNSIGNED32(X) (X##ui32) #define UNSIGNED64(X) (X##ui64) #define SIGNED32(X) (X##i32) #define SIGNED64(X) (X##i64) typedef signed char signed8; typedef signed short signed16; typedef signed int signed32; typedef signed __int64 signed64; typedef unsigned int unsigned8; typedef unsigned int unsigned16; typedef unsigned int unsigned32; typedef unsigned __int64 unsigned64; typedef struct { unsigned64 a[2]; } unsigned128; typedef struct { signed64 a[2]; } signed128; #endif /* _MSC_VER */ Does anyone know why is this ifdef'ed away for MSC?