diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-03-14 19:52:11 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-03-14 19:52:11 +0000 |
commit | 19c5dfc29d83101e415590e778b99e7c37d9b730 (patch) | |
tree | 44a9e4b644d621b5083c029387285185ee5b5eba /libgm2/libm2iso/wraptime.cc | |
parent | 71b33f8fb8daa6a7a359f322b24365d9016438fc (diff) | |
download | gcc-19c5dfc29d83101e415590e778b99e7c37d9b730.zip gcc-19c5dfc29d83101e415590e778b99e7c37d9b730.tar.gz gcc-19c5dfc29d83101e415590e778b99e7c37d9b730.tar.bz2 |
PR 109125 Modula2 SIGBUS in m2pim_ldtoa_ldtoa
13 regression failures seen on sparc SIGBUS in m2pim_ldtoa_ldtoa.
This patch fixes int bool parameter mismatches between the
definition modules and their C/C++ implementations.
gcc/m2/ChangeLog:
PR modula2/109125
* gm2-libs-ch/cgetopt.c (cgetopt_SetOption): Replace int
for bool.
* gm2-libs-ch/termios.c (doSetUnset): Replace int for bool.
* gm2-libs/Builtins.mod (isfinitef): Correct typo in return
statement.
libgm2/ChangeLog:
PR modula2/109125
* libm2iso/ErrnoCategory.cc (FALSE): Remove.
(TRUE): Remove.
* libm2iso/wrapsock.c (TRUE): Remove.
(FALSE): Remove.
* libm2iso/wraptime.cc (TRUE): Remove.
(FALSE): Remove.
* libm2pim/cgetopt.cc: Replace int for bool for every BOOLEAN
parameter in the definition module.
* libm2pim/dtoa.cc: Ditto.
* libm2pim/ldtoa.cc: Ditto.
* libm2pim/termios.cc: Ditto.
(doSetUnset): Replace int for bool.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libgm2/libm2iso/wraptime.cc')
-rw-r--r-- | libgm2/libm2iso/wraptime.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libgm2/libm2iso/wraptime.cc b/libgm2/libm2iso/wraptime.cc index 3cdc385..ffe85f1 100644 --- a/libgm2/libm2iso/wraptime.cc +++ b/libgm2/libm2iso/wraptime.cc @@ -51,14 +51,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "limits.h" #endif -#if !defined(TRUE) -#define TRUE (1 == 1) -#endif - -#if !defined(FALSE) -#define FALSE (1 == 0) -#endif - #if !defined(NULL) #define NULL (void *)0 #endif @@ -322,16 +314,16 @@ EXPORT(GetSecond) (void *m) /* wraptime_GetSummerTime - returns true if summer time is in effect. */ #if defined(HAVE_STRUCT_TIMEZONE) -extern "C" unsigned int +extern "C" bool EXPORT(GetSummerTime) (struct timezone *tz) { return tz->tz_dsttime != 0; } #else -extern "C" unsigned int +extern "C" bool EXPORT(GetSummerTime) (void *tz) { - return FALSE; + return false; } #endif |