Solve the y2038 problem for powerpc
AKA Make time_t 64 bits on powerpc(32). PowerPC currently (until now) was one of two architectures with a 32-bit time_t on 32-bit archs (the other being i386). This is an ABI breakage, so all ports, and all local binaries, *must* be recompiled. Tested by: andreast, others MFC after: Never Relnotes: Yes
This commit is contained in:
parent
81b07aac10
commit
fbcf7bcdf4
9
UPDATING
9
UPDATING
@ -51,6 +51,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
|
||||
|
||||
****************************** SPECIAL WARNING: ******************************
|
||||
|
||||
20170625:
|
||||
The FreeBSD/powerpc platform now uses a 64-bit type for time_t. This is
|
||||
a very major ABI incompatible change, so users of FreeBSD/powerpc must
|
||||
be careful when performing source upgrades. It is best to run
|
||||
'make installworld' from an alternate root system, either a live
|
||||
CD/memory stick, or a temporary root partition. Additionally, all ports
|
||||
must be recompiled. powerpc64 is largely unaffected, except in the case
|
||||
of 32-bit compatibility. All 32-bit binaries will be affected.
|
||||
|
||||
20170623:
|
||||
Forward compatibility for the "ino64" project have been committed. This
|
||||
will allow most new binaries to run on older kernels in a limited
|
||||
|
@ -203,8 +203,8 @@ Machine-dependent type sizes:
|
||||
.It mips64el Ta 8 Ta 8 Ta 8
|
||||
.It mips64elhf Ta 8 Ta 8 Ta 8
|
||||
.It mips64hf Ta 8 Ta 8 Ta 8
|
||||
.It powerpc Ta 4 Ta 8 Ta 4
|
||||
.It powerpcspe Ta 4 Ta 8 Ta 4
|
||||
.It powerpc Ta 4 Ta 8 Ta 8
|
||||
.It powerpcspe Ta 4 Ta 8 Ta 8
|
||||
.It powerpc64 Ta 8 Ta 8 Ta 8
|
||||
.It riscv64 Ta 8 Ta 16 Ta 8
|
||||
.It riscv64sf Ta 8 Ta 16 Ta 8
|
||||
|
@ -45,7 +45,7 @@
|
||||
/*
|
||||
* Being a newer port, 32-bit FreeBSD/MIPS uses 64-bit time_t.
|
||||
*/
|
||||
#ifdef __mips__
|
||||
#if defined (__mips__) || defined(__powerpc__)
|
||||
typedef int64_t time32_t;
|
||||
#else
|
||||
typedef int32_t time32_t;
|
||||
|
@ -109,13 +109,13 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD");
|
||||
|
||||
#ifndef __mips__
|
||||
#if !defined(__mips__) && !defined(__powerpc__)
|
||||
CTASSERT(sizeof(struct timeval32) == 8);
|
||||
CTASSERT(sizeof(struct timespec32) == 8);
|
||||
CTASSERT(sizeof(struct itimerval32) == 16);
|
||||
#endif
|
||||
CTASSERT(sizeof(struct statfs32) == 256);
|
||||
#ifndef __mips__
|
||||
#if !defined(__mips__) && !defined(__powerpc__)
|
||||
CTASSERT(sizeof(struct rusage32) == 72);
|
||||
#endif
|
||||
CTASSERT(sizeof(struct sigaltstack32) == 12);
|
||||
@ -125,7 +125,7 @@ CTASSERT(sizeof(struct msghdr32) == 28);
|
||||
#ifdef __amd64__
|
||||
CTASSERT(sizeof(struct stat32) == 208);
|
||||
#endif
|
||||
#ifndef __mips__
|
||||
#if !defined(__mips__) && !defined(__powerpc__)
|
||||
CTASSERT(sizeof(struct freebsd11_stat32) == 96);
|
||||
#endif
|
||||
CTASSERT(sizeof(struct sigaction32) == 24);
|
||||
|
@ -1283,7 +1283,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
|
||||
#endif
|
||||
case BIOCGETIF:
|
||||
case BIOCGRTIMEOUT:
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__)
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
|
||||
case BIOCGRTIMEOUT32:
|
||||
#endif
|
||||
case BIOCGSTATS:
|
||||
@ -1295,7 +1295,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
|
||||
case FIONREAD:
|
||||
case BIOCLOCK:
|
||||
case BIOCSRTIMEOUT:
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__)
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
|
||||
case BIOCSRTIMEOUT32:
|
||||
#endif
|
||||
case BIOCIMMEDIATE:
|
||||
@ -1519,7 +1519,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
|
||||
* Set read timeout.
|
||||
*/
|
||||
case BIOCSRTIMEOUT:
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__)
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
|
||||
case BIOCSRTIMEOUT32:
|
||||
#endif
|
||||
{
|
||||
@ -1550,12 +1550,12 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
|
||||
* Get read timeout.
|
||||
*/
|
||||
case BIOCGRTIMEOUT:
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__)
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
|
||||
case BIOCGRTIMEOUT32:
|
||||
#endif
|
||||
{
|
||||
struct timeval *tv;
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__)
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
|
||||
struct timeval32 *tv32;
|
||||
struct timeval tv64;
|
||||
|
||||
@ -1567,7 +1567,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
|
||||
|
||||
tv->tv_sec = d->bd_rtout / hz;
|
||||
tv->tv_usec = (d->bd_rtout % hz) * tick;
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__)
|
||||
#if defined(COMPAT_FREEBSD32) && !defined(__mips__) && !defined(__powerpc__)
|
||||
if (cmd == BIOCGRTIMEOUT32) {
|
||||
tv32 = (struct timeval32 *)addr;
|
||||
tv32->tv_sec = tv->tv_sec;
|
||||
|
@ -98,16 +98,18 @@ typedef __int64_t __register_t;
|
||||
typedef __int64_t __segsz_t; /* segment size (in pages) */
|
||||
typedef __uint64_t __size_t; /* sizeof() */
|
||||
typedef __int64_t __ssize_t; /* byte count or error */
|
||||
typedef __int64_t __time_t; /* time()... */
|
||||
typedef __uint64_t __uintfptr_t;
|
||||
typedef __uint64_t __uintptr_t;
|
||||
#else
|
||||
typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
|
||||
typedef __int32_t __register_t;
|
||||
typedef __int32_t __segsz_t; /* segment size (in pages) */
|
||||
typedef __uint32_t __size_t; /* sizeof() */
|
||||
typedef __int32_t __ssize_t; /* byte count or error */
|
||||
typedef __int32_t __time_t; /* time()... */
|
||||
#endif
|
||||
typedef __int64_t __time_t; /* time()... */
|
||||
#ifdef __LP64__
|
||||
typedef __uint64_t __uintfptr_t;
|
||||
typedef __uint64_t __uintptr_t;
|
||||
#else
|
||||
typedef __uint32_t __uintfptr_t;
|
||||
typedef __uint32_t __uintptr_t;
|
||||
#endif
|
||||
|
@ -48,9 +48,9 @@ struct mdproc {
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define KINFO_PROC_SIZE 1088
|
||||
#define KINFO_PROC32_SIZE 768
|
||||
#define KINFO_PROC32_SIZE 816
|
||||
#else
|
||||
#define KINFO_PROC_SIZE 768
|
||||
#define KINFO_PROC_SIZE 816
|
||||
#endif
|
||||
|
||||
struct syscall_args {
|
||||
|
@ -66,9 +66,6 @@ struct acctv3 {
|
||||
float ac_io; /* count of IO blocks */
|
||||
__dev_t ac_tty; /* controlling tty */
|
||||
uint32_t ac_pad0;
|
||||
#if defined(__powerpc__) && !defined(_LP64)
|
||||
uint32_t ac_pad1;
|
||||
#endif
|
||||
uint16_t ac_len2; /* record length */
|
||||
union {
|
||||
uint32_t ac_align; /* force v1 compatible alignment */
|
||||
|
@ -58,7 +58,7 @@
|
||||
* in the range 5 to 9.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 1200035 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 1200036 /* Master, propagated to newvers */
|
||||
|
||||
/*
|
||||
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
|
||||
|
Loading…
Reference in New Issue
Block a user