sys/abi_compat.h: move freebsd32_uint64_t and FU64_CP() there
Use private names for uintXX_t types. Remove conflicting (but equal) PTR_IN() definition from dev/mfi.c. Reviewed by: brooks Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55135
This commit is contained in:
@@ -38,24 +38,6 @@
|
||||
#include <sys/user.h>
|
||||
#include <sys/_ffcounter.h>
|
||||
|
||||
/*
|
||||
* i386 is the only arch with a 32-bit time_t.
|
||||
* Also it is the only arch with (u)int64_t having 4-bytes alignment.
|
||||
*/
|
||||
typedef struct {
|
||||
#ifdef __amd64__
|
||||
uint32_t val[2];
|
||||
#else
|
||||
uint64_t val;
|
||||
#endif
|
||||
} freebsd32_uint64_t;
|
||||
|
||||
#ifdef __amd64__
|
||||
typedef int32_t time32_t;
|
||||
#else
|
||||
typedef int64_t time32_t;
|
||||
#endif
|
||||
|
||||
struct timeval32 {
|
||||
time32_t tv_sec;
|
||||
int32_t tv_usec;
|
||||
|
||||
@@ -3084,8 +3084,6 @@ mfi_user_command(struct mfi_softc *sc, struct mfi_ioc_passthru *ioc)
|
||||
return (error);
|
||||
}
|
||||
|
||||
#define PTRIN(p) ((void *)(uintptr_t)(p))
|
||||
|
||||
static int
|
||||
mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
||||
{
|
||||
|
||||
+21
-1
@@ -29,10 +29,30 @@
|
||||
#ifndef _ABI_COMPAT_H_
|
||||
#define _ABI_COMPAT_H_
|
||||
|
||||
#include <sys/_types.h>
|
||||
|
||||
/*
|
||||
* Helper macros for translating objects between different ABIs.
|
||||
* Helper types and macros for translating objects between different ABIs.
|
||||
*/
|
||||
|
||||
/*
|
||||
* i386 is the only arch with a 32-bit time_t.
|
||||
* Also it is the only arch with (u)int64_t having 4-bytes alignment.
|
||||
*/
|
||||
typedef struct {
|
||||
#ifdef __amd64__
|
||||
__uint32_t val[2];
|
||||
#else
|
||||
__uint64_t val;
|
||||
#endif
|
||||
} freebsd32_uint64_t;
|
||||
|
||||
#ifdef __amd64__
|
||||
typedef __int32_t time32_t;
|
||||
#else
|
||||
typedef __int64_t time32_t;
|
||||
#endif
|
||||
|
||||
#define PTRIN(v) (void *)(uintptr_t)(v)
|
||||
#define PTROUT(v) (uintptr_t)(v)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user