Move the 32-bit time_t problems to userspace.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -86,10 +86,6 @@ typedef unsigned long long u_quad_t; · 85 unmodified lines | ||
| 86 | 86 | |
| 87 | 87 | #define inline |
| 88 | 88 | |
| 89 | −struct timespec { | |
| 90 | − long ts_sec; | |
| 91 | − long ts_nsec; | |
| 92 | −}; | |
| 93 | 89 | #else /* DJGPP but not KERNEL */ |
| 94 | 90 | #include <sys/time.h> |
| 95 | 91 | typedef unsigned long long u_quad_t; |
| @@ -110,13 +106,6 @@ typedef unsigned long long u_quad_t; · 14 unmodified lines | ||
| 110 | 106 | #define cdev_t dev_t |
| 111 | 107 | #endif |
| 112 | 108 | |
| 113 | −#ifdef __CYGWIN32__ | |
| 114 | −struct timespec { | |
| 115 | − time_t tv_sec; /* seconds */ | |
| 116 | − long tv_nsec; /* nanoseconds */ | |
| 117 | −}; | |
| 118 | −#endif | |
| 119 | − | |
| 120 | 109 | #ifndef __BIT_TYPES_DEFINED__ |
| 121 | 110 | #define __BIT_TYPES_DEFINED__ |
| 122 | 111 | typedef signed char int8_t; |
| @@ -211,19 +200,10 @@ struct CodaFid { · 88 unmodified lines | ||
| 211 | 200 | */ |
| 212 | 201 | enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD }; |
| 213 | 202 | |
| 214 | −#ifdef __linux__ | |
| 215 | −/* | |
| 216 | − * This matches the traditional Linux 'timespec' structure binary layout, | |
| 217 | − * before using 64-bit time_t everywhere. Overflows in y2038 on 32-bit | |
| 218 | − * architectures. | |
| 219 | − */ | |
| 220 | −struct vtimespec { | |
| 221 | − long tv_sec; /* seconds */ | |
| 203 | +struct coda_timespec { | |
| 204 | + int64_t tv_sec; /* seconds */ | |
| 222 | 205 | long tv_nsec; /* nanoseconds */ |
| 223 | 206 | }; |
| 224 | −#else | |
| 225 | −#define vtimespec timespec | |
| 226 | −#endif | |
| 227 | 207 | |
| 228 | 208 | struct coda_vattr { |
| 229 | 209 | long va_type; /* vnode type (for create) */ |
| @@ -234,9 +214,9 @@ struct coda_vattr { · 4 unmodified lines | ||
| 234 | 214 | long va_fileid; /* file id */ |
| 235 | 215 | u_quad_t va_size; /* file size in bytes */ |
| 236 | 216 | long va_blocksize; /* blocksize preferred for i/o */ |
| 237 | − struct vtimespec va_atime; /* time of last access */ | |
| 238 | − struct vtimespec va_mtime; /* time of last modification */ | |
| 239 | − struct vtimespec va_ctime; /* time file changed */ | |
| 217 | + struct coda_timespec va_atime; /* time of last access */ | |
| 218 | + struct coda_timespec va_mtime; /* time of last modification */ | |
| 219 | + struct coda_timespec va_ctime; /* time file changed */ | |
| 240 | 220 | u_long va_gen; /* generation number of file */ |
| 241 | 221 | u_long va_flags; /* flags defined for file */ |
| 242 | 222 | cdev_t va_rdev; /* device special file represents */ |
| @@ -301,7 +281,8 @@ struct coda_statfs { · 58 unmodified lines | ||
| 301 | 281 | |
| 302 | 282 | #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) |
| 303 | 283 | |
| 304 | −#define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ | |
| 284 | +// CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ | |
| 285 | +#define CODA_KERNEL_VERSION 4 /* 64-bit timespec */ | |
| 305 | 286 | |
| 306 | 287 | /* |
| 307 | 288 | * Venus <-> Coda RPC arguments |