diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/dv-sockser.c | 2 | ||||
-rw-r--r-- | sim/common/nrun.c | 4 | ||||
-rw-r--r-- | sim/config.h.in | 15 | ||||
-rwxr-xr-x | sim/configure | 85 | ||||
-rw-r--r-- | sim/d10v/gencode.c | 2 | ||||
-rw-r--r-- | sim/m4/sim_ac_option_warnings.m4 | 2 | ||||
-rw-r--r-- | sim/m4/sim_ac_platform.m4 | 42 | ||||
-rw-r--r-- | sim/m4/sim_ac_toolchain.m4 | 2 | ||||
-rw-r--r-- | sim/or1k/cpu.c | 32 | ||||
-rw-r--r-- | sim/or1k/cpu.h | 14 | ||||
-rw-r--r-- | sim/or1k/or1k.c | 4 | ||||
-rw-r--r-- | sim/or1k/traps.c | 2 | ||||
-rw-r--r-- | sim/ppc/emul_netbsd.c | 6 | ||||
-rw-r--r-- | sim/ppc/emul_unix.c | 12 | ||||
-rw-r--r-- | sim/ppc/main.c | 4 | ||||
-rw-r--r-- | sim/testsuite/common/bits-tst.c | 5 |
16 files changed, 93 insertions, 140 deletions
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c index c46bafe..04111fb 100644 --- a/sim/common/dv-sockser.c +++ b/sim/common/dv-sockser.c @@ -175,7 +175,7 @@ dv_sockser_init (SIM_DESC sd) ??? Need a central signal management module. */ #ifdef SIGPIPE { - RETSIGTYPE (*orig) (int); + void (*orig) (int); orig = signal (SIGPIPE, SIG_IGN); /* If a handler is already set up, don't mess with it. */ if (orig != SIG_DFL && orig != SIG_IGN) diff --git a/sim/common/nrun.c b/sim/common/nrun.c index 22d420e..d52e53d 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -44,7 +44,7 @@ static const char *myname; static SIM_DESC sd; -static RETSIGTYPE +static void cntrl_c (int sig) { if (! sim_stop (sd)) @@ -64,7 +64,7 @@ main (int argc, char **argv) enum sim_stop reason; int sigrc = 0; int single_step = 0; - RETSIGTYPE (*prev_sigint) (int); + void (*prev_sigint) (int); myname = lbasename (argv[0]); diff --git a/sim/config.h.in b/sim/config.h.in index f5742a9..44ff515 100644 --- a/sim/config.h.in +++ b/sim/config.h.in @@ -307,18 +307,6 @@ /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE -/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ -#undef HAVE_ST_BLKSIZE - -/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ -#undef HAVE_ST_BLOCKS - -/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use - `HAVE_STRUCT_STAT_ST_RDEV' instead. */ -#undef HAVE_ST_RDEV - /* Define to 1 if you have the `symlink' function. */ #undef HAVE_SYMLINK @@ -483,9 +471,6 @@ /* Bug reporting address */ #undef REPORT_BUGS_TO -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG diff --git a/sim/configure b/sim/configure index 365a12d..db0eaa6 100755 --- a/sim/configure +++ b/sim/configure @@ -637,6 +637,7 @@ ac_func_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +LIBOBJS SIM_RX_CYCLE_ACCURATE_FLAGS SIM_RISCV_BITSIZE sim_ppc_model_issue @@ -905,7 +906,6 @@ LD FGREP SED LIBTOOL -LIBOBJS C_DIALECT PKG_CONFIG_LIBDIR PKG_CONFIG_PATH @@ -8559,52 +8559,6 @@ fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -_ACEOF - - -$as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h - -fi - - -ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 -_ACEOF - - -$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h - -else - case " $LIBOBJS " in - *" fileblocks.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" - ;; -esac - -fi - - -ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF - - -$as_echo "#define HAVE_ST_RDEV 1" >>confdefs.h - -fi - - ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> #include <$ac_cv_struct_tm> @@ -9311,39 +9265,6 @@ _ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <signal.h> - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : @@ -12878,7 +12799,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12881 "configure" +#line 12802 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12984,7 +12905,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12987 "configure" +#line 12908 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/sim/d10v/gencode.c b/sim/d10v/gencode.c index 3a37bac..763e2f5 100644 --- a/sim/d10v/gencode.c +++ b/sim/d10v/gencode.c @@ -150,5 +150,5 @@ write_opcodes (void) printf ("},\n"); } } - printf ("{ 0,0,0,0,0,0,0,(void (*)())0,0,{0,0,0}},\n};\n"); + printf ("{ 0,0,0,0,0,0,0,0,0,{0,0,0}},\n};\n"); } diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4 index 8860222..f105832 100644 --- a/sim/m4/sim_ac_option_warnings.m4 +++ b/sim/m4/sim_ac_option_warnings.m4 @@ -189,7 +189,7 @@ AC_DEFUN([_SIM_TEST_WARNING_FLAG], [dnl dnl Check whether GCC accepts it. saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror $wtest" - AC_TRY_COMPILE([],[],$2,$3) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[$2],[$3]) CFLAGS="$saved_CFLAGS" ]) dnl Export variable $1 to $2 for use in makefiles. diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index 3b22615..79de2a4 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -112,9 +112,6 @@ AC_CHECK_FUNCS_ONCE(m4_flatten([ utime ])) -AC_STRUCT_ST_BLKSIZE -AC_STRUCT_ST_BLOCKS -AC_STRUCT_ST_RDEV AC_STRUCT_TIMEZONE AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino], @@ -138,7 +135,7 @@ AC_CHECK_SIZEOF([void *]) dnl Check for struct statfs. AC_CACHE_CHECK([for struct statfs], [sim_cv_struct_statfs], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> @@ -151,9 +148,9 @@ AC_CACHE_CHECK([for struct statfs], #endif #ifdef HAVE_SYS_STATFS_H #include <sys/statfs.h> -#endif], [ +#endif]], [[ struct statfs s; -], [sim_cv_struct_statfs="yes"], [sim_cv_struct_statfs="no"])]) +]])],[sim_cv_struct_statfs="yes"],[sim_cv_struct_statfs="no"])]) AS_IF([test x"sim_cv_struct_statfs" = x"yes"], [dnl AC_DEFINE(HAVE_STRUCT_STATFS, 1, [Define if struct statfs is defined in <sys/mount.h>]) @@ -162,12 +159,12 @@ AS_IF([test x"sim_cv_struct_statfs" = x"yes"], [dnl dnl Some System V related checks. AC_CACHE_CHECK([if union semun defined], [sim_cv_has_union_semun], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #include <sys/ipc.h> -#include <sys/sem.h>], [ +#include <sys/sem.h>]], [[ union semun arg; -], [sim_cv_has_union_semun="yes"], [sim_cv_has_union_semun="no"])]) +]])],[sim_cv_has_union_semun="yes"],[sim_cv_has_union_semun="no"])]) AS_IF([test x"$sim_cv_has_union_semun" = x"yes"], [dnl AC_DEFINE(HAVE_UNION_SEMUN, 1, [Define if union semun is defined in <sys/sem.h>]) @@ -175,7 +172,7 @@ AS_IF([test x"$sim_cv_has_union_semun" = x"yes"], [dnl AC_CACHE_CHECK([whether System V semaphores are supported], [sim_cv_sysv_sem], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> @@ -185,7 +182,7 @@ AC_CACHE_CHECK([whether System V semaphores are supported], struct semid_ds *buf; ushort *array; }; -#endif], [ +#endif]], [[ union semun arg; int id = semget(IPC_PRIVATE, 1, IPC_CREAT|0400); if (id == -1) @@ -193,23 +190,23 @@ AC_CACHE_CHECK([whether System V semaphores are supported], arg.val = 0; /* avoid implicit type cast to union */ if (semctl(id, 0, IPC_RMID, arg) == -1) return 1; -], [sim_cv_sysv_sem="yes"], [sim_cv_sysv_sem="no"])]) +]])],[sim_cv_sysv_sem="yes"],[sim_cv_sysv_sem="no"])]) AS_IF([test x"$sim_cv_sysv_sem" = x"yes"], [dnl AC_DEFINE(HAVE_SYSV_SEM, 1, [Define if System V semaphores are supported]) ]) AC_CACHE_CHECK([whether System V shared memory is supported], [sim_cv_sysv_shm], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #include <sys/ipc.h> -#include <sys/shm.h>], [ +#include <sys/shm.h>]], [[ int id = shmget(IPC_PRIVATE, 1, IPC_CREAT|0400); if (id == -1) return 1; if (shmctl(id, IPC_RMID, 0) == -1) return 1; -], [sim_cv_sysv_shm="yes"], [sim_cv_sysv_shm="no"])]) +]])],[sim_cv_sysv_shm="yes"],[sim_cv_sysv_shm="no"])]) AS_IF([test x"$sim_cv_sysv_shm" = x"yes"], [dnl AC_DEFINE(HAVE_SYSV_SHM, 1, [Define if System V shared memory is supported]) ]) @@ -217,16 +214,16 @@ AS_IF([test x"$sim_cv_sysv_shm" = x"yes"], [dnl dnl Figure out what type of termio/termios support there is AC_CACHE_CHECK([for struct termios], [sim_cv_termios_struct], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> -#include <sys/termios.h>], [ +#include <sys/termios.h>]], [[ static struct termios x; x.c_iflag = 0; x.c_oflag = 0; x.c_cflag = 0; x.c_lflag = 0; x.c_cc[NCCS] = 0; -], [sim_cv_termios_struct="yes"], [sim_cv_termios_struct="no"])]) +]])],[sim_cv_termios_struct="yes"],[sim_cv_termios_struct="no"])]) if test $sim_cv_termios_struct = yes; then AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.]) fi @@ -250,16 +247,16 @@ fi if test "$sim_cv_termios_struct" != "yes"; then AC_CACHE_CHECK([for struct termio], [sim_cv_termio_struct], - [AC_TRY_COMPILE([ + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> -#include <sys/termio.h>], [ +#include <sys/termio.h>]], [[ static struct termio x; x.c_iflag = 0; x.c_oflag = 0; x.c_cflag = 0; x.c_lflag = 0; x.c_cc[NCC] = 0; -], [sim_cv_termio_struct="yes"], [sim_cv_termio_struct="no"])]) +]])],[sim_cv_termio_struct="yes"],[sim_cv_termio_struct="no"])]) if test $sim_cv_termio_struct = yes; then AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.]) fi @@ -288,7 +285,6 @@ AC_TYPE_GETGROUPS AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T -AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_TYPE_UID_T @@ -344,7 +340,7 @@ if test -r ../readline/Makefile; then READLINE_CFLAGS='-I$(READLINE_SRC)/..' else AC_CHECK_LIB(readline, readline, READLINE_LIB=-lreadline, - AC_ERROR([the required "readline" library is missing]), $TERMCAP_LIB) + AC_MSG_ERROR(the required "readline" library is missing), $TERMCAP_LIB) READLINE_CFLAGS= fi AC_SUBST(READLINE_LIB) diff --git a/sim/m4/sim_ac_toolchain.m4 b/sim/m4/sim_ac_toolchain.m4 index 8e6f6f1..6fd4ab5 100644 --- a/sim/m4/sim_ac_toolchain.m4 +++ b/sim/m4/sim_ac_toolchain.m4 @@ -16,7 +16,7 @@ dnl dnl Setup the toolchain variables. AC_DEFUN([SIM_AC_TOOLCHAIN], [dnl -AC_CANONICAL_SYSTEM +AC_CANONICAL_TARGET AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CPP]) AC_C_BIGENDIAN diff --git a/sim/or1k/cpu.c b/sim/or1k/cpu.c index c75e2a0..14e43cc 100644 --- a/sim/or1k/cpu.c +++ b/sim/or1k/cpu.c @@ -1100,6 +1100,38 @@ or1k32bf_h_sys_esr15_set (SIM_CPU *current_cpu, USI newval) SET_H_SYS_ESR15 (newval); } +/* Get the value of h-sys-coreid. */ + +USI +or1k32bf_h_sys_coreid_get (SIM_CPU *current_cpu) +{ + return GET_H_SYS_COREID (); +} + +/* Set a value for h-sys-coreid. */ + +void +or1k32bf_h_sys_coreid_set (SIM_CPU *current_cpu, USI newval) +{ + SET_H_SYS_COREID (newval); +} + +/* Get the value of h-sys-numcores. */ + +USI +or1k32bf_h_sys_numcores_get (SIM_CPU *current_cpu) +{ + return GET_H_SYS_NUMCORES (); +} + +/* Set a value for h-sys-numcores. */ + +void +or1k32bf_h_sys_numcores_set (SIM_CPU *current_cpu, USI newval) +{ + SET_H_SYS_NUMCORES (newval); +} + /* Get the value of h-sys-gpr0. */ USI diff --git a/sim/or1k/cpu.h b/sim/or1k/cpu.h index 7f8a340..ab2c062 100644 --- a/sim/or1k/cpu.h +++ b/sim/or1k/cpu.h @@ -408,6 +408,16 @@ SET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_ESR14), (x));\ do { \ SET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_ESR15), (x));\ ;} while (0) +#define GET_H_SYS_COREID() GET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_COREID)) +#define SET_H_SYS_COREID(x) \ +do { \ +SET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_COREID), (x));\ +;} while (0) +#define GET_H_SYS_NUMCORES() GET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_NUMCORES)) +#define SET_H_SYS_NUMCORES(x) \ +do { \ +SET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_NUMCORES), (x));\ +;} while (0) #define GET_H_SYS_GPR0() GET_H_SPR (ORSI (SLLSI (SPR_GROUP_SYS, 11), SPR_INDEX_SYS_GPR0)) #define SET_H_SYS_GPR0(x) \ do { \ @@ -3379,6 +3389,10 @@ USI or1k32bf_h_sys_esr14_get (SIM_CPU *); void or1k32bf_h_sys_esr14_set (SIM_CPU *, USI); USI or1k32bf_h_sys_esr15_get (SIM_CPU *); void or1k32bf_h_sys_esr15_set (SIM_CPU *, USI); +USI or1k32bf_h_sys_coreid_get (SIM_CPU *); +void or1k32bf_h_sys_coreid_set (SIM_CPU *, USI); +USI or1k32bf_h_sys_numcores_get (SIM_CPU *); +void or1k32bf_h_sys_numcores_set (SIM_CPU *, USI); USI or1k32bf_h_sys_gpr0_get (SIM_CPU *); void or1k32bf_h_sys_gpr0_set (SIM_CPU *, USI); USI or1k32bf_h_sys_gpr1_get (SIM_CPU *); diff --git a/sim/or1k/or1k.c b/sim/or1k/or1k.c index 2d1f7f8..73ab6f0 100644 --- a/sim/or1k/or1k.c +++ b/sim/or1k/or1k.c @@ -206,6 +206,10 @@ or1k_cpu_init (SIM_DESC sd, sim_cpu *current_cpu, const USI or1k_vr, /* Clear the floating point control status register. */ SET_H_SYS_FPCSR (0); + + /* Set this as the one and only core. */ + SET_H_SYS_NUMCORES (1); + SET_H_SYS_COREID (0); } void diff --git a/sim/or1k/traps.c b/sim/or1k/traps.c index 753bfff..d1113ac 100644 --- a/sim/or1k/traps.c +++ b/sim/or1k/traps.c @@ -224,6 +224,8 @@ or1k32bf_mfspr (sim_cpu *current_cpu, USI addr) case SPR_ADDR (SYS, PPC): case SPR_ADDR (SYS, FPCSR): case SPR_ADDR (SYS, EPCR0): + case SPR_ADDR (SYS, COREID): + case SPR_ADDR (SYS, NUMCORES): case SPR_ADDR (MAC, MACLO): case SPR_ADDR (MAC, MACHI): break; diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c index 950f1f4..37e6c08 100644 --- a/sim/ppc/emul_netbsd.c +++ b/sim/ppc/emul_netbsd.c @@ -146,13 +146,13 @@ write_stat(unsigned_word addr, /* H2T(buf.st_spare2); */ H2T(buf.st_ctime); /* H2T(buf.st_spare3); */ -#ifdef AC_STRUCT_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV H2T(buf.st_rdev); #endif -#ifdef AC_STRUCT_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE H2T(buf.st_blksize); #endif -#ifdef AC_STRUCT_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS H2T(buf.st_blocks); #endif #if WITH_NetBSD_HOST diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c index 88f6e3a..e63a930 100644 --- a/sim/ppc/emul_unix.c +++ b/sim/ppc/emul_unix.c @@ -1094,19 +1094,19 @@ convert_to_solaris_stat(unsigned_word addr, target.st_gid = H2T_4(host->st_gid); target.st_size = H2T_4(host->st_size); -#ifdef HAVE_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV target.st_rdev = H2T_4(host->st_rdev); #else target.st_rdev = 0; #endif -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE target.st_blksize = H2T_4(host->st_blksize); #else target.st_blksize = 0; #endif -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS target.st_blocks = H2T_4(host->st_blocks); #else target.st_blocks = 0; @@ -2043,19 +2043,19 @@ convert_to_linux_stat(unsigned_word addr, target.st_gid = H2T_4(host->st_gid); target.st_size = H2T_4(host->st_size); -#ifdef HAVE_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV target.st_rdev = H2T_4(host->st_rdev); #else target.st_rdev = 0; #endif -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE target.st_blksize = H2T_4(host->st_blksize); #else target.st_blksize = 0; #endif -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS target.st_blocks = H2T_4(host->st_blocks); #else target.st_blocks = 0; diff --git a/sim/ppc/main.c b/sim/ppc/main.c index 987e89e..afce983 100644 --- a/sim/ppc/main.c +++ b/sim/ppc/main.c @@ -245,7 +245,7 @@ zalloc(long size) /* When a CNTRL-C occures, queue an event to shut down the simulation */ -static RETSIGTYPE +static void cntrl_c(int sig) { psim_stop (simulation); @@ -289,7 +289,7 @@ main(int argc, char * const *argv) psim_stack(simulation, argv, environ); { - RETSIGTYPE (*prev) (int); + void (*prev) (int); prev = signal(SIGINT, cntrl_c); psim_run(simulation); signal(SIGINT, prev); diff --git a/sim/testsuite/common/bits-tst.c b/sim/testsuite/common/bits-tst.c index a30753e..95ca450 100644 --- a/sim/testsuite/common/bits-tst.c +++ b/sim/testsuite/common/bits-tst.c @@ -1,4 +1,5 @@ # 2 "bits-tst.c" +#include <string.h> /* Drive the bit test routines */ @@ -320,9 +321,7 @@ check_bits (int call, int -main (argc, argv) - int argc; - char **argv; +main (int argc, char **argv) { int errors = 0; |