| author | |
| committer | |
| log | fc7a5f2ae49aa0a0c5e1f1dd1c5678ee3e49b1b6 |
| tree | 1be2f1200504b2a60422a7939a40e274461b20ad |
| parent | 8970d80355e869b07582ef400e7a7a6b8a4de974 |
| signature |
16 files changed, 12 insertions(+), 153 deletions(-)
lib/std/os/linux.zig+12-3| ... | @@ -88,7 +88,6 @@ pub fn clone( | ... | @@ -88,7 +88,6 @@ pub fn clone( |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | pub const ARCH = arch_bits.ARCH; | 90 | pub const ARCH = arch_bits.ARCH; |
| 91 | pub const Elf_Symndx = arch_bits.Elf_Symndx; | ||
| 92 | pub const F = arch_bits.F; | 91 | pub const F = arch_bits.F; |
| 93 | pub const Flock = arch_bits.Flock; | 92 | pub const Flock = arch_bits.Flock; |
| 94 | pub const HWCAP = arch_bits.HWCAP; | 93 | pub const HWCAP = arch_bits.HWCAP; |
| ... | @@ -103,8 +102,6 @@ pub const mode_t = arch_bits.mode_t; | ... | @@ -103,8 +102,6 @@ pub const mode_t = arch_bits.mode_t; |
| 103 | pub const nlink_t = arch_bits.nlink_t; | 102 | pub const nlink_t = arch_bits.nlink_t; |
| 104 | pub const off_t = arch_bits.off_t; | 103 | pub const off_t = arch_bits.off_t; |
| 105 | pub const time_t = arch_bits.time_t; | 104 | pub const time_t = arch_bits.time_t; |
| 106 | pub const timeval = arch_bits.timeval; | ||
| 107 | pub const timezone = arch_bits.timezone; | ||
| 108 | pub const user_desc = arch_bits.user_desc; | 105 | pub const user_desc = arch_bits.user_desc; |
| 109 | 106 | ||
| 110 | pub const tls = @import("linux/tls.zig"); | 107 | pub const tls = @import("linux/tls.zig"); |
| ... | @@ -1611,6 +1608,8 @@ pub fn flock(fd: fd_t, operation: i32) usize { | ... | @@ -1611,6 +1608,8 @@ pub fn flock(fd: fd_t, operation: i32) usize { |
| 1611 | return syscall2(.flock, @as(usize, @bitCast(@as(isize, fd))), @as(usize, @bitCast(@as(isize, operation)))); | 1608 | return syscall2(.flock, @as(usize, @bitCast(@as(isize, fd))), @as(usize, @bitCast(@as(isize, operation)))); |
| 1612 | } | 1609 | } |
| 1613 | 1610 | ||
| 1611 | pub const Elf_Symndx = if (native_arch == .s390x) u64 else u32; | ||
| 1612 | |||
| 1614 | // We must follow the C calling convention when we call into the VDSO | 1613 | // We must follow the C calling convention when we call into the VDSO |
| 1615 | const VdsoClockGettime = *align(1) const fn (clockid_t, *timespec) callconv(.c) usize; | 1614 | const VdsoClockGettime = *align(1) const fn (clockid_t, *timespec) callconv(.c) usize; |
| 1616 | var vdso_clock_gettime: ?VdsoClockGettime = &init_vdso_clock_gettime; | 1615 | var vdso_clock_gettime: ?VdsoClockGettime = &init_vdso_clock_gettime; |
| ... | @@ -8360,6 +8359,16 @@ pub const POSIX_FADV = switch (native_arch) { | ... | @@ -8360,6 +8359,16 @@ pub const POSIX_FADV = switch (native_arch) { |
| 8360 | }, | 8359 | }, |
| 8361 | }; | 8360 | }; |
| 8362 | 8361 | ||
| 8362 | pub const timeval = extern struct { | ||
| 8363 | tv_sec: isize, | ||
| 8364 | tv_usec: i64, | ||
| 8365 | }; | ||
| 8366 | |||
| 8367 | pub const timezone = extern struct { | ||
| 8368 | minuteswest: i32, | ||
| 8369 | dsttime: i32, | ||
| 8370 | }; | ||
| 8371 | |||
| 8363 | /// The timespec struct used by the kernel. | 8372 | /// The timespec struct used by the kernel. |
| 8364 | pub const kernel_timespec = extern struct { | 8373 | pub const kernel_timespec = extern struct { |
| 8365 | sec: i64, | 8374 | sec: i64, |
lib/std/os/linux/aarch64.zig-12| ... | @@ -230,15 +230,3 @@ pub const Stat = extern struct { | ... | @@ -230,15 +230,3 @@ pub const Stat = extern struct { |
| 230 | return self.ctim; | 230 | return self.ctim; |
| 231 | } | 231 | } |
| 232 | }; | 232 | }; |
| 233 | |||
| 234 | pub const timeval = extern struct { | ||
| 235 | sec: isize, | ||
| 236 | usec: isize, | ||
| 237 | }; | ||
| 238 | |||
| 239 | pub const timezone = extern struct { | ||
| 240 | minuteswest: i32, | ||
| 241 | dsttime: i32, | ||
| 242 | }; | ||
| 243 | |||
| 244 | pub const Elf_Symndx = u32; |
lib/std/os/linux/arm.zig-12| ... | @@ -266,15 +266,3 @@ pub const Stat = extern struct { | ... | @@ -266,15 +266,3 @@ pub const Stat = extern struct { |
| 266 | return self.ctim; | 266 | return self.ctim; |
| 267 | } | 267 | } |
| 268 | }; | 268 | }; |
| 269 | |||
| 270 | pub const timeval = extern struct { | ||
| 271 | sec: i32, | ||
| 272 | usec: i32, | ||
| 273 | }; | ||
| 274 | |||
| 275 | pub const timezone = extern struct { | ||
| 276 | minuteswest: i32, | ||
| 277 | dsttime: i32, | ||
| 278 | }; | ||
| 279 | |||
| 280 | pub const Elf_Symndx = u32; |
lib/std/os/linux/hexagon.zig-7| ... | @@ -154,11 +154,6 @@ pub const F = struct { | ... | @@ -154,11 +154,6 @@ pub const F = struct { |
| 154 | pub const GETOWNER_UIDS = 17; | 154 | pub const GETOWNER_UIDS = 17; |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | pub const timeval = extern struct { | ||
| 158 | sec: time_t, | ||
| 159 | usec: i32, | ||
| 160 | }; | ||
| 161 | |||
| 162 | pub const Flock = extern struct { | 157 | pub const Flock = extern struct { |
| 163 | type: i16, | 158 | type: i16, |
| 164 | whence: i16, | 159 | whence: i16, |
| ... | @@ -209,6 +204,4 @@ pub const Stat = extern struct { | ... | @@ -209,6 +204,4 @@ pub const Stat = extern struct { |
| 209 | } | 204 | } |
| 210 | }; | 205 | }; |
| 211 | 206 | ||
| 212 | pub const Elf_Symndx = u32; | ||
| 213 | |||
| 214 | pub const VDSO = void; | 207 | pub const VDSO = void; |
lib/std/os/linux/loongarch64.zig-7| ... | @@ -176,11 +176,6 @@ pub const Stat = extern struct { | ... | @@ -176,11 +176,6 @@ pub const Stat = extern struct { |
| 176 | } | 176 | } |
| 177 | }; | 177 | }; |
| 178 | 178 | ||
| 179 | pub const timeval = extern struct { | ||
| 180 | tv_sec: time_t, | ||
| 181 | tv_usec: i64, | ||
| 182 | }; | ||
| 183 | |||
| 184 | pub const F = struct { | 179 | pub const F = struct { |
| 185 | pub const DUPFD = 0; | 180 | pub const DUPFD = 0; |
| 186 | pub const GETFD = 1; | 181 | pub const GETFD = 1; |
| ... | @@ -209,5 +204,3 @@ pub const VDSO = struct { | ... | @@ -209,5 +204,3 @@ pub const VDSO = struct { |
| 209 | pub const CGT_SYM = "__vdso_clock_gettime"; | 204 | pub const CGT_SYM = "__vdso_clock_gettime"; |
| 210 | pub const CGT_VER = "LINUX_5.10"; | 205 | pub const CGT_VER = "LINUX_5.10"; |
| 211 | }; | 206 | }; |
| 212 | |||
| 213 | pub const Elf_Symndx = u32; |
lib/std/os/linux/m68k.zig-7| ... | @@ -186,11 +186,6 @@ pub const ino_t = u64; | ... | @@ -186,11 +186,6 @@ pub const ino_t = u64; |
| 186 | pub const dev_t = u64; | 186 | pub const dev_t = u64; |
| 187 | pub const blkcnt_t = i64; | 187 | pub const blkcnt_t = i64; |
| 188 | 188 | ||
| 189 | pub const timeval = extern struct { | ||
| 190 | sec: time_t, | ||
| 191 | usec: i32, | ||
| 192 | }; | ||
| 193 | |||
| 194 | pub const Flock = extern struct { | 189 | pub const Flock = extern struct { |
| 195 | type: i16, | 190 | type: i16, |
| 196 | whence: i16, | 191 | whence: i16, |
| ... | @@ -230,7 +225,5 @@ pub const Stat = extern struct { | ... | @@ -230,7 +225,5 @@ pub const Stat = extern struct { |
| 230 | } | 225 | } |
| 231 | }; | 226 | }; |
| 232 | 227 | ||
| 233 | pub const Elf_Symndx = u32; | ||
| 234 | |||
| 235 | // No VDSO used as of glibc 112a0ae18b831bf31f44d81b82666980312511d6. | 228 | // No VDSO used as of glibc 112a0ae18b831bf31f44d81b82666980312511d6. |
| 236 | pub const VDSO = void; | 229 | pub const VDSO = void; |
lib/std/os/linux/mips.zig-12| ... | @@ -336,15 +336,3 @@ pub const Stat = extern struct { | ... | @@ -336,15 +336,3 @@ pub const Stat = extern struct { |
| 336 | }; | 336 | }; |
| 337 | } | 337 | } |
| 338 | }; | 338 | }; |
| 339 | |||
| 340 | pub const timeval = extern struct { | ||
| 341 | sec: isize, | ||
| 342 | usec: isize, | ||
| 343 | }; | ||
| 344 | |||
| 345 | pub const timezone = extern struct { | ||
| 346 | minuteswest: i32, | ||
| 347 | dsttime: i32, | ||
| 348 | }; | ||
| 349 | |||
| 350 | pub const Elf_Symndx = u32; |
lib/std/os/linux/mips64.zig-12| ... | @@ -315,15 +315,3 @@ pub const Stat = extern struct { | ... | @@ -315,15 +315,3 @@ pub const Stat = extern struct { |
| 315 | }; | 315 | }; |
| 316 | } | 316 | } |
| 317 | }; | 317 | }; |
| 318 | |||
| 319 | pub const timeval = extern struct { | ||
| 320 | sec: isize, | ||
| 321 | usec: isize, | ||
| 322 | }; | ||
| 323 | |||
| 324 | pub const timezone = extern struct { | ||
| 325 | minuteswest: i32, | ||
| 326 | dsttime: i32, | ||
| 327 | }; | ||
| 328 | |||
| 329 | pub const Elf_Symndx = u32; |
lib/std/os/linux/powerpc.zig-12| ... | @@ -340,15 +340,3 @@ pub const Stat = extern struct { | ... | @@ -340,15 +340,3 @@ pub const Stat = extern struct { |
| 340 | return self.ctim; | 340 | return self.ctim; |
| 341 | } | 341 | } |
| 342 | }; | 342 | }; |
| 343 | |||
| 344 | pub const timeval = extern struct { | ||
| 345 | sec: time_t, | ||
| 346 | usec: isize, | ||
| 347 | }; | ||
| 348 | |||
| 349 | pub const timezone = extern struct { | ||
| 350 | minuteswest: i32, | ||
| 351 | dsttime: i32, | ||
| 352 | }; | ||
| 353 | |||
| 354 | pub const Elf_Symndx = u32; |
lib/std/os/linux/powerpc64.zig-12| ... | @@ -325,15 +325,3 @@ pub const Stat = extern struct { | ... | @@ -325,15 +325,3 @@ pub const Stat = extern struct { |
| 325 | return self.ctim; | 325 | return self.ctim; |
| 326 | } | 326 | } |
| 327 | }; | 327 | }; |
| 328 | |||
| 329 | pub const timeval = extern struct { | ||
| 330 | sec: isize, | ||
| 331 | usec: isize, | ||
| 332 | }; | ||
| 333 | |||
| 334 | pub const timezone = extern struct { | ||
| 335 | minuteswest: i32, | ||
| 336 | dsttime: i32, | ||
| 337 | }; | ||
| 338 | |||
| 339 | pub const Elf_Symndx = u32; |
lib/std/os/linux/riscv32.zig-7| ... | @@ -168,11 +168,6 @@ pub const ino_t = u64; | ... | @@ -168,11 +168,6 @@ pub const ino_t = u64; |
| 168 | pub const dev_t = u64; | 168 | pub const dev_t = u64; |
| 169 | pub const blkcnt_t = i64; | 169 | pub const blkcnt_t = i64; |
| 170 | 170 | ||
| 171 | pub const timeval = extern struct { | ||
| 172 | sec: time_t, | ||
| 173 | usec: i64, | ||
| 174 | }; | ||
| 175 | |||
| 176 | pub const Flock = extern struct { | 171 | pub const Flock = extern struct { |
| 177 | type: i16, | 172 | type: i16, |
| 178 | whence: i16, | 173 | whence: i16, |
| ... | @@ -214,8 +209,6 @@ pub const Stat = extern struct { | ... | @@ -214,8 +209,6 @@ pub const Stat = extern struct { |
| 214 | } | 209 | } |
| 215 | }; | 210 | }; |
| 216 | 211 | ||
| 217 | pub const Elf_Symndx = u32; | ||
| 218 | |||
| 219 | pub const VDSO = struct { | 212 | pub const VDSO = struct { |
| 220 | pub const CGT_SYM = "__vdso_clock_gettime"; | 213 | pub const CGT_SYM = "__vdso_clock_gettime"; |
| 221 | pub const CGT_VER = "LINUX_4.15"; | 214 | pub const CGT_VER = "LINUX_4.15"; |
lib/std/os/linux/riscv64.zig-7| ... | @@ -168,11 +168,6 @@ pub const ino_t = u64; | ... | @@ -168,11 +168,6 @@ pub const ino_t = u64; |
| 168 | pub const dev_t = u64; | 168 | pub const dev_t = u64; |
| 169 | pub const blkcnt_t = i64; | 169 | pub const blkcnt_t = i64; |
| 170 | 170 | ||
| 171 | pub const timeval = extern struct { | ||
| 172 | sec: time_t, | ||
| 173 | usec: i64, | ||
| 174 | }; | ||
| 175 | |||
| 176 | pub const Flock = extern struct { | 171 | pub const Flock = extern struct { |
| 177 | type: i16, | 172 | type: i16, |
| 178 | whence: i16, | 173 | whence: i16, |
| ... | @@ -214,8 +209,6 @@ pub const Stat = extern struct { | ... | @@ -214,8 +209,6 @@ pub const Stat = extern struct { |
| 214 | } | 209 | } |
| 215 | }; | 210 | }; |
| 216 | 211 | ||
| 217 | pub const Elf_Symndx = u32; | ||
| 218 | |||
| 219 | pub const VDSO = struct { | 212 | pub const VDSO = struct { |
| 220 | pub const CGT_SYM = "__vdso_clock_gettime"; | 213 | pub const CGT_SYM = "__vdso_clock_gettime"; |
| 221 | pub const CGT_VER = "LINUX_4.15"; | 214 | pub const CGT_VER = "LINUX_4.15"; |
lib/std/os/linux/s390x.zig-7| ... | @@ -186,11 +186,6 @@ pub const ino_t = u64; | ... | @@ -186,11 +186,6 @@ pub const ino_t = u64; |
| 186 | pub const dev_t = u64; | 186 | pub const dev_t = u64; |
| 187 | pub const blkcnt_t = i64; | 187 | pub const blkcnt_t = i64; |
| 188 | 188 | ||
| 189 | pub const timeval = extern struct { | ||
| 190 | sec: time_t, | ||
| 191 | usec: i64, | ||
| 192 | }; | ||
| 193 | |||
| 194 | pub const Flock = extern struct { | 189 | pub const Flock = extern struct { |
| 195 | type: i16, | 190 | type: i16, |
| 196 | whence: i16, | 191 | whence: i16, |
| ... | @@ -229,8 +224,6 @@ pub const Stat = extern struct { | ... | @@ -229,8 +224,6 @@ pub const Stat = extern struct { |
| 229 | } | 224 | } |
| 230 | }; | 225 | }; |
| 231 | 226 | ||
| 232 | pub const Elf_Symndx = u64; | ||
| 233 | |||
| 234 | pub const VDSO = struct { | 227 | pub const VDSO = struct { |
| 235 | pub const CGT_SYM = "__kernel_clock_gettime"; | 228 | pub const CGT_SYM = "__kernel_clock_gettime"; |
| 236 | pub const CGT_VER = "LINUX_2.6.29"; | 229 | pub const CGT_VER = "LINUX_2.6.29"; |
lib/std/os/linux/sparc64.zig-12| ... | @@ -314,15 +314,3 @@ pub const Stat = extern struct { | ... | @@ -314,15 +314,3 @@ pub const Stat = extern struct { |
| 314 | return self.ctim; | 314 | return self.ctim; |
| 315 | } | 315 | } |
| 316 | }; | 316 | }; |
| 317 | |||
| 318 | pub const timeval = extern struct { | ||
| 319 | sec: isize, | ||
| 320 | usec: i32, | ||
| 321 | }; | ||
| 322 | |||
| 323 | pub const timezone = extern struct { | ||
| 324 | minuteswest: i32, | ||
| 325 | dsttime: i32, | ||
| 326 | }; | ||
| 327 | |||
| 328 | pub const Elf_Symndx = u32; |
lib/std/os/linux/x86.zig-12| ... | @@ -278,18 +278,6 @@ pub const Stat = extern struct { | ... | @@ -278,18 +278,6 @@ pub const Stat = extern struct { |
| 278 | } | 278 | } |
| 279 | }; | 279 | }; |
| 280 | 280 | ||
| 281 | pub const timeval = extern struct { | ||
| 282 | sec: i32, | ||
| 283 | usec: i32, | ||
| 284 | }; | ||
| 285 | |||
| 286 | pub const timezone = extern struct { | ||
| 287 | minuteswest: i32, | ||
| 288 | dsttime: i32, | ||
| 289 | }; | ||
| 290 | |||
| 291 | pub const Elf_Symndx = u32; | ||
| 292 | |||
| 293 | pub const user_desc = extern struct { | 281 | pub const user_desc = extern struct { |
| 294 | entry_number: u32, | 282 | entry_number: u32, |
| 295 | base_addr: u32, | 283 | base_addr: u32, |
lib/std/os/linux/x86_64.zig-12| ... | @@ -234,15 +234,3 @@ pub const Stat = extern struct { | ... | @@ -234,15 +234,3 @@ pub const Stat = extern struct { |
| 234 | return self.ctim; | 234 | return self.ctim; |
| 235 | } | 235 | } |
| 236 | }; | 236 | }; |
| 237 | |||
| 238 | pub const timeval = extern struct { | ||
| 239 | sec: isize, | ||
| 240 | usec: isize, | ||
| 241 | }; | ||
| 242 | |||
| 243 | pub const timezone = extern struct { | ||
| 244 | minuteswest: i32, | ||
| 245 | dsttime: i32, | ||
| 246 | }; | ||
| 247 | |||
| 248 | pub const Elf_Symndx = u32; |