We require C11 now, so no need for these pre-ANSI C hacks.
PTR is simply void*, so use that directly.
+2021-05-14 Mike Frysinger <vapier@gentoo.org>
+
+ * callback.h (p1, p2): Change PTR to void*.
+ (cb_host_to_target_stat): Likewise.
+
2021-05-14 Mike Frysinger <vapier@gentoo.org>
* callback.h (error): Replace __attribute__ with ATTRIBUTE_NORETURN.
int errcode;
/* Working space to be used by memory read/write callbacks. */
- PTR p1;
- PTR p2;
+ void *p1;
+ void *p2;
long x1,x2;
/* Callbacks for reading/writing memory (e.g. for read/write syscalls).
/* Translate host stat struct to target.
If stat struct ptr is NULL, just compute target stat struct size.
Result is size of target stat struct or 0 if error. */
-int cb_host_to_target_stat (host_callback *, const struct stat *, PTR);
+int cb_host_to_target_stat (host_callback *, const struct stat *, void *);
/* Translate a value to target endian. */
void cb_store_target_endian (host_callback *, char *, int, long);
+2021-05-14 Mike Frysinger <vapier@gentoo.org>
+
+ * callback.c (cb_host_to_target_stat): Change PTR to void*.
+ * sim-syscall.c (sim_syscall_multi): Delete (PTR) casts.
+
2021-05-14 Mike Frysinger <vapier@gentoo.org>
* Make-common.in (callback_h, remote_sim_h): Update path.
or zero if an error occurred during the translation. */
int
-cb_host_to_target_stat (host_callback *cb, const struct stat *hs, PTR ts)
+cb_host_to_target_stat (host_callback *cb, const struct stat *hs, void *ts)
{
const char *m = cb->stat_map;
char *p;
sc.arg3 = arg3;
sc.arg4 = arg4;
- sc.p1 = (PTR) sd;
- sc.p2 = (PTR) cpu;
+ sc.p1 = sd;
+ sc.p2 = cpu;
sc.read_mem = sim_syscall_read_mem;
sc.write_mem = sim_syscall_write_mem;