+2021-05-29 Mike Frysinger <vapier@gentoo.org>
+
+ * emul_generic.c (emul_write_status): Rename errno to err.
+ (emul_write2_status): Likewise.
+ * emul_generic.h (emul_write_status, emul_write2_status): Likewise.
+ * emul_netbsd.c (errno): Delete.
+ * emul_unix.c (errno): Delete.
+
2021-05-29 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (INCLUDES): Add -I../..
INLINE_EMUL_GENERIC void
emul_write_status(cpu *processor,
int status,
- int errno)
+ int err)
{
- if (status == -1 && errno != 0) {
- cpu_registers(processor)->gpr[3] = errno;
+ if (status == -1 && err != 0) {
+ cpu_registers(processor)->gpr[3] = err;
CR_SET(0, cr_i_summary_overflow);
}
else {
emul_write2_status(cpu *processor,
int status1,
int status2,
- int errno)
+ int err)
{
- if (status1 == -1 && errno != 0) {
- cpu_registers(processor)->gpr[3] = errno;
+ if (status1 == -1 && err != 0) {
+ cpu_registers(processor)->gpr[3] = err;
CR_SET(0, cr_i_summary_overflow);
}
else {
INLINE_EMUL_GENERIC void emul_write_status
(cpu *processor,
int status,
- int errno);
+ int err);
INLINE_EMUL_GENERIC void emul_write2_status
(cpu *processor,
int status1,
int status2,
- int errno);
+ int err);
INLINE_EMUL_GENERIC char *emul_read_string
(char *dest,
#undef HAVE_GETDIRENTRIES
#endif
-#if (BSD < 199306) /* here BSD as just a bug */
-extern int errno;
-#endif
-
#ifndef STATIC_INLINE_EMUL_NETBSD
#define STATIC_INLINE_EMUL_NETBSD STATIC_INLINE
#endif
#include <stdlib.h>
#include <time.h>
-#if defined(BSD) && !defined(errno) && (BSD < 199306) /* here BSD as just a bug */
-extern int errno;
-#endif
-
#ifndef STATIC_INLINE_EMUL_UNIX
#define STATIC_INLINE_EMUL_UNIX STATIC_INLINE
#endif