@zigc/lib 0.17.0-dev.332 → 0.17.0-dev.356

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/docs/main.js +8 -8
  2. package/libc/darwin/SDKSettings.json +1 -1
  3. package/libc/darwin/libSystem.tbd +88 -87
  4. package/libc/include/aarch64-openbsd-none/arm64/cpu.h +7 -1
  5. package/libc/include/aarch64-openbsd-none/arm64/intr.h +9 -1
  6. package/libc/include/aarch64-openbsd-none/machine/cpu.h +7 -1
  7. package/libc/include/aarch64-openbsd-none/machine/intr.h +9 -1
  8. package/libc/include/any-darwin-any/AvailabilityInternal.h +10 -10
  9. package/libc/include/any-darwin-any/AvailabilityVersions.h +8 -0
  10. package/libc/include/any-darwin-any/mach/host_info.h +3 -1
  11. package/libc/include/any-darwin-any/mach/mach_voucher_types.h +2 -0
  12. package/libc/include/any-darwin-any/mach/vm_statistics.h +33 -2
  13. package/libc/include/any-darwin-any/spawn.h +3 -1
  14. package/libc/include/any-darwin-any/sys/_symbol_aliasing.h +12 -0
  15. package/libc/include/generic-openbsd/db.h +1 -7
  16. package/libc/include/generic-openbsd/ddb/db_interface.h +2 -1
  17. package/libc/include/generic-openbsd/fnmatch.h +6 -2
  18. package/libc/include/generic-openbsd/login_cap.h +3 -1
  19. package/libc/include/generic-openbsd/miscfs/fuse/fusefs_node.h +2 -1
  20. package/libc/include/generic-openbsd/net/bpf.h +3 -1
  21. package/libc/include/generic-openbsd/net/hfsc.h +4 -4
  22. package/libc/include/generic-openbsd/net/if.h +5 -1
  23. package/libc/include/generic-openbsd/net/if_bridge.h +48 -1
  24. package/libc/include/generic-openbsd/net/if_etherbridge.h +20 -7
  25. package/libc/include/generic-openbsd/net/if_media.h +26 -1
  26. package/libc/include/generic-openbsd/net/if_pflow.h +71 -20
  27. package/libc/include/generic-openbsd/net/if_pfsync.h +2 -2
  28. package/libc/include/generic-openbsd/net/if_sppp.h +2 -1
  29. package/libc/include/generic-openbsd/net/if_trunk.h +3 -2
  30. package/libc/include/generic-openbsd/net/if_types.h +2 -2
  31. package/libc/include/generic-openbsd/net/if_var.h +34 -12
  32. package/libc/include/generic-openbsd/net/netisr.h +1 -3
  33. package/libc/include/generic-openbsd/net/pfvar.h +154 -1
  34. package/libc/include/generic-openbsd/net/pfvar_priv.h +256 -1
  35. package/libc/include/generic-openbsd/net80211/ieee80211.h +76 -4
  36. package/libc/include/generic-openbsd/net80211/ieee80211_ioctl.h +3 -2
  37. package/libc/include/generic-openbsd/net80211/ieee80211_node.h +48 -2
  38. package/libc/include/generic-openbsd/net80211/ieee80211_proto.h +4 -1
  39. package/libc/include/generic-openbsd/net80211/ieee80211_var.h +18 -2
  40. package/libc/include/generic-openbsd/netinet/if_ether.h +12 -11
  41. package/libc/include/generic-openbsd/netinet/igmp_var.h +17 -3
  42. package/libc/include/generic-openbsd/netinet/in_pcb.h +2 -1
  43. package/libc/include/generic-openbsd/netinet/in_var.h +17 -59
  44. package/libc/include/generic-openbsd/netinet/ip.h +3 -2
  45. package/libc/include/generic-openbsd/netinet/tcp_timer.h +1 -2
  46. package/libc/include/generic-openbsd/netinet6/in6_var.h +15 -29
  47. package/libc/include/generic-openbsd/netinet6/ip6_var.h +1 -2
  48. package/libc/include/generic-openbsd/netinet6/mld6_var.h +17 -4
  49. package/libc/include/generic-openbsd/netinet6/nd6.h +2 -2
  50. package/libc/include/generic-openbsd/pthread.h +2 -2
  51. package/libc/include/generic-openbsd/signal.h +2 -2
  52. package/libc/include/generic-openbsd/sndio.h +6 -12
  53. package/libc/include/generic-openbsd/strings.h +5 -1
  54. package/libc/include/generic-openbsd/sys/device.h +4 -3
  55. package/libc/include/generic-openbsd/sys/disklabel.h +17 -5
  56. package/libc/include/generic-openbsd/sys/dkio.h +3 -5
  57. package/libc/include/generic-openbsd/sys/filedesc.h +3 -2
  58. package/libc/include/generic-openbsd/sys/mbuf.h +1 -1
  59. package/libc/include/generic-openbsd/sys/mman.h +7 -2
  60. package/libc/include/generic-openbsd/sys/mutex.h +10 -7
  61. package/libc/include/generic-openbsd/sys/namei.h +8 -7
  62. package/libc/include/generic-openbsd/sys/param.h +1 -1
  63. package/libc/include/generic-openbsd/sys/pledge.h +1 -3
  64. package/libc/include/generic-openbsd/sys/protosw.h +8 -1
  65. package/libc/include/generic-openbsd/sys/ptrace.h +4 -1
  66. package/libc/include/generic-openbsd/sys/sched.h +8 -1
  67. package/libc/include/generic-openbsd/sys/signal.h +4 -2
  68. package/libc/include/generic-openbsd/sys/socketvar.h +2 -1
  69. package/libc/include/generic-openbsd/sys/sockio.h +11 -1
  70. package/libc/include/generic-openbsd/sys/syscall.h +5 -3
  71. package/libc/include/generic-openbsd/sys/syscallargs.h +9 -2
  72. package/libc/include/generic-openbsd/sys/sysctl.h +7 -4
  73. package/libc/include/generic-openbsd/sys/types.h +6 -2
  74. package/libc/include/generic-openbsd/sys/videoio.h +143 -68
  75. package/libc/include/generic-openbsd/sys/xcall.h +2 -2
  76. package/libc/include/generic-openbsd/time.h +2 -2
  77. package/libc/include/generic-openbsd/unistd.h +2 -2
  78. package/libc/include/generic-openbsd/uvm/uvm_anon.h +2 -3
  79. package/libc/include/generic-openbsd/uvm/uvm_extern.h +1 -19
  80. package/libc/include/generic-openbsd/uvm/uvm_pager.h +3 -4
  81. package/libc/include/generic-openbsd/uvm/uvm_pmemrange.h +1 -2
  82. package/libc/include/generic-openbsd/uvm/uvm_swap.h +4 -1
  83. package/libc/include/generic-openbsd/uvm/uvm_vnode.h +3 -4
  84. package/libc/include/generic-openbsd/uvm/uvmexp.h +41 -35
  85. package/libc/include/mips64-openbsd-none/machine/octeonvar.h +1 -27
  86. package/libc/include/mips64-openbsd-none/octeon/octeonvar.h +1 -27
  87. package/libc/include/mips64el-openbsd-none/loongson/apmvar.h +1 -1
  88. package/libc/include/mips64el-openbsd-none/loongson/param.h +1 -5
  89. package/libc/include/mips64el-openbsd-none/machine/apmvar.h +1 -1
  90. package/libc/include/mips64el-openbsd-none/machine/param.h +1 -5
  91. package/libc/include/powerpc-openbsd-eabihf/powerpc/intr.h +1 -4
  92. package/libc/include/powerpc64-openbsd-none/machine/atomic.h +3 -3
  93. package/libc/include/powerpc64-openbsd-none/powerpc64/atomic.h +3 -3
  94. package/libc/include/riscv64-openbsd-none/machine/cpu.h +4 -8
  95. package/libc/include/riscv64-openbsd-none/machine/cpufunc.h +4 -4
  96. package/libc/include/riscv64-openbsd-none/machine/pmap.h +5 -1
  97. package/libc/include/riscv64-openbsd-none/machine/pte.h +9 -1
  98. package/libc/include/riscv64-openbsd-none/riscv64/cpu.h +4 -8
  99. package/libc/include/riscv64-openbsd-none/riscv64/cpufunc.h +4 -4
  100. package/libc/include/riscv64-openbsd-none/riscv64/pmap.h +5 -1
  101. package/libc/include/riscv64-openbsd-none/riscv64/pte.h +9 -1
  102. package/libc/include/x86-openbsd-none/i386/specialreg.h +3 -1
  103. package/libc/include/x86-openbsd-none/machine/specialreg.h +3 -1
  104. package/libc/include/x86_64-openbsd-none/amd64/conf.h +11 -2
  105. package/libc/include/x86_64-openbsd-none/amd64/cpu.h +14 -4
  106. package/libc/include/x86_64-openbsd-none/amd64/cpufunc.h +2 -3
  107. package/libc/include/x86_64-openbsd-none/amd64/ghcb.h +2 -1
  108. package/libc/include/x86_64-openbsd-none/amd64/i82489var.h +2 -4
  109. package/libc/include/x86_64-openbsd-none/amd64/i8259.h +1 -53
  110. package/libc/include/x86_64-openbsd-none/amd64/intr.h +5 -2
  111. package/libc/include/x86_64-openbsd-none/amd64/intrdefs.h +9 -7
  112. package/libc/include/x86_64-openbsd-none/amd64/kexec.h +48 -0
  113. package/libc/include/x86_64-openbsd-none/amd64/specialreg.h +4 -1
  114. package/libc/include/x86_64-openbsd-none/machine/conf.h +11 -2
  115. package/libc/include/x86_64-openbsd-none/machine/cpu.h +14 -4
  116. package/libc/include/x86_64-openbsd-none/machine/cpufunc.h +2 -3
  117. package/libc/include/x86_64-openbsd-none/machine/ghcb.h +2 -1
  118. package/libc/include/x86_64-openbsd-none/machine/i82489var.h +2 -4
  119. package/libc/include/x86_64-openbsd-none/machine/i8259.h +1 -53
  120. package/libc/include/x86_64-openbsd-none/machine/intr.h +5 -2
  121. package/libc/include/x86_64-openbsd-none/machine/intrdefs.h +9 -7
  122. package/libc/include/x86_64-openbsd-none/machine/kexec.h +48 -0
  123. package/libc/include/x86_64-openbsd-none/machine/specialreg.h +4 -1
  124. package/libc/openbsd/abilists +0 -0
  125. package/package.json +1 -1
  126. package/std/Io/File.zig +6 -0
  127. package/std/Target.zig +50 -38
  128. package/std/bit_set.zig +0 -1
  129. package/std/crypto/ascon.zig +0 -2
  130. package/std/crypto/salsa20.zig +0 -6
  131. package/std/crypto/sha3.zig +0 -2
  132. package/std/debug/cpu_context.zig +0 -21
  133. package/libc/include/mips64el-openbsd-none/loongson/hibernate.h +0 -33
  134. package/libc/include/mips64el-openbsd-none/loongson/hibernate_var.h +0 -39
  135. package/libc/include/mips64el-openbsd-none/machine/hibernate.h +0 -33
  136. package/libc/include/mips64el-openbsd-none/machine/hibernate_var.h +0 -39
package/std/Io/File.zig CHANGED
@@ -268,6 +268,12 @@ pub const SetLengthError = error{
268
268
  /// Truncates or expands the file, populating any new data with zeroes.
269
269
  ///
270
270
  /// The file offset after this call is left unchanged.
271
+ ///
272
+ /// This function operates on an open file handle. There is not an equivalent
273
+ /// function in `Dir` which operates on paths because generally, such
274
+ /// functionality will introduce Time-Of-Check, Time-Of-Use (TOCTOU) bugs. In
275
+ /// the rare case when those semantics are actually needed, it is reasonable to
276
+ /// open the file with the truncate flag.
271
277
  pub fn setLength(file: File, io: Io, new_length: u64) SetLengthError!void {
272
278
  return io.vtable.fileSetLength(io.userdata, file, new_length);
273
279
  }
package/std/Target.zig CHANGED
@@ -407,20 +407,20 @@ pub const Os = struct {
407
407
 
408
408
  .contiki => .{
409
409
  .semver = .{
410
- .min = .{ .major = 4, .minor = 0, .patch = 0 },
410
+ .min = .{ .major = 5, .minor = 0, .patch = 0 },
411
411
  .max = .{ .major = 5, .minor = 1, .patch = 0 },
412
412
  },
413
413
  },
414
414
  .fuchsia => .{
415
415
  .semver = .{
416
- .min = .{ .major = 1, .minor = 0, .patch = 0 },
417
- .max = .{ .major = 28, .minor = 0, .patch = 0 },
416
+ .min = .{ .major = 27, .minor = 0, .patch = 0 },
417
+ .max = .{ .major = 30, .minor = 0, .patch = 0 },
418
418
  },
419
419
  },
420
420
  .hermit => .{
421
421
  .semver = .{
422
- .min = .{ .major = 0, .minor = 5, .patch = 0 },
423
- .max = .{ .major = 0, .minor = 11, .patch = 0 },
422
+ .min = .{ .major = 0, .minor = 8, .patch = 0 },
423
+ .max = .{ .major = 0, .minor = 13, .patch = 2 },
424
424
  },
425
425
  },
426
426
 
@@ -430,7 +430,7 @@ pub const Os = struct {
430
430
  .min = .{ .major = 0, .minor = 9, .patch = 0 },
431
431
  .max = .{ .major = 0, .minor = 9, .patch = 0 },
432
432
  },
433
- .glibc = .{ .major = 2, .minor = 28, .patch = 0 },
433
+ .glibc = .{ .major = 2, .minor = 31, .patch = 0 },
434
434
  },
435
435
  },
436
436
  .linux => .{
@@ -449,7 +449,7 @@ pub const Os = struct {
449
449
 
450
450
  break :blk default_min;
451
451
  },
452
- .max = .{ .major = 6, .minor = 19, .patch = 0 },
452
+ .max = .{ .major = 7, .minor = 0, .patch = 9 },
453
453
  },
454
454
  .glibc = blk: {
455
455
  // For 32-bit targets that traditionally used 32-bit time, we require
@@ -490,14 +490,14 @@ pub const Os = struct {
490
490
  },
491
491
  .rtems => .{
492
492
  .semver = .{
493
- .min = .{ .major = 5, .minor = 1, .patch = 0 },
494
- .max = .{ .major = 6, .minor = 1, .patch = 0 },
493
+ .min = .{ .major = 5, .minor = 3, .patch = 0 },
494
+ .max = .{ .major = 6, .minor = 2, .patch = 0 },
495
495
  },
496
496
  },
497
497
 
498
498
  .dragonfly => .{
499
499
  .semver = .{
500
- .min = .{ .major = 6, .minor = 0, .patch = 0 },
500
+ .min = .{ .major = 6, .minor = 4, .patch = 0 },
501
501
  .max = .{ .major = 6, .minor = 4, .patch = 2 },
502
502
  },
503
503
  },
@@ -516,7 +516,7 @@ pub const Os = struct {
516
516
 
517
517
  break :blk default_min;
518
518
  },
519
- .max = .{ .major = 15, .minor = 0, .patch = 0 },
519
+ .max = .{ .major = 15, .minor = 1, .patch = 0 },
520
520
  },
521
521
  },
522
522
  .netbsd => .{
@@ -552,44 +552,44 @@ pub const Os = struct {
552
552
 
553
553
  break :blk default_min;
554
554
  },
555
- .max = .{ .major = 7, .minor = 8, .patch = 0 },
555
+ .max = .{ .major = 7, .minor = 9, .patch = 0 },
556
556
  },
557
557
  },
558
558
 
559
559
  .driverkit => .{
560
560
  .semver = .{
561
561
  .min = .{ .major = 20, .minor = 0, .patch = 0 },
562
- .max = .{ .major = 25, .minor = 0, .patch = 0 },
562
+ .max = .{ .major = 25, .minor = 5, .patch = 0 },
563
563
  },
564
564
  },
565
565
  .macos => .{
566
566
  .semver = .{
567
- .min = .{ .major = 13, .minor = 0, .patch = 0 },
568
- .max = .{ .major = 15, .minor = 6, .patch = 0 },
567
+ .min = .{ .major = 14, .minor = 0, .patch = 0 },
568
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
569
569
  },
570
570
  },
571
571
  .ios, .maccatalyst => .{
572
572
  .semver = .{
573
573
  .min = .{ .major = 15, .minor = 0, .patch = 0 },
574
- .max = .{ .major = 18, .minor = 6, .patch = 0 },
574
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
575
575
  },
576
576
  },
577
577
  .tvos => .{
578
578
  .semver = .{
579
- .min = .{ .major = 15, .minor = 0, .patch = 0 },
580
- .max = .{ .major = 18, .minor = 5, .patch = 0 },
579
+ .min = .{ .major = 26, .minor = 0, .patch = 0 },
580
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
581
581
  },
582
582
  },
583
583
  .visionos => .{
584
584
  .semver = .{
585
- .min = .{ .major = 1, .minor = 0, .patch = 0 },
586
- .max = .{ .major = 2, .minor = 5, .patch = 0 },
585
+ .min = .{ .major = 26, .minor = 0, .patch = 0 },
586
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
587
587
  },
588
588
  },
589
589
  .watchos => .{
590
590
  .semver = .{
591
- .min = .{ .major = 8, .minor = 0, .patch = 0 },
592
- .max = .{ .major = 11, .minor = 6, .patch = 0 },
591
+ .min = .{ .major = 11, .minor = 0, .patch = 0 },
592
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
593
593
  },
594
594
  },
595
595
 
@@ -644,8 +644,8 @@ pub const Os = struct {
644
644
 
645
645
  .amdhsa => .{
646
646
  .semver = .{
647
- .min = .{ .major = 5, .minor = 0, .patch = 0 },
648
- .max = .{ .major = 7, .minor = 1, .patch = 0 },
647
+ .min = .{ .major = 6, .minor = 1, .patch = 0 },
648
+ .max = .{ .major = 7, .minor = 2, .patch = 3 },
649
649
  },
650
650
  },
651
651
  .amdpal => .{
@@ -656,8 +656,8 @@ pub const Os = struct {
656
656
  },
657
657
  .cuda => .{
658
658
  .semver = .{
659
- .min = .{ .major = 11, .minor = 0, .patch = 1 },
660
- .max = .{ .major = 13, .minor = 0, .patch = 2 },
659
+ .min = .{ .major = 12, .minor = 5, .patch = 0 },
660
+ .max = .{ .major = 13, .minor = 2, .patch = 0 },
661
661
  },
662
662
  },
663
663
  .nvcl,
@@ -683,7 +683,7 @@ pub const Os = struct {
683
683
  .vulkan => .{
684
684
  .semver = .{
685
685
  .min = .{ .major = 1, .minor = 2, .patch = 0 },
686
- .max = .{ .major = 1, .minor = 4, .patch = 331 },
686
+ .max = .{ .major = 1, .minor = 4, .patch = 352 },
687
687
  },
688
688
  },
689
689
  };
@@ -852,9 +852,7 @@ pub const Abi = enum {
852
852
  else => .none,
853
853
  },
854
854
  .haiku => switch (arch) {
855
- .arm,
856
- .powerpc,
857
- => .eabihf,
855
+ .arm => .eabihf,
858
856
  else => .none,
859
857
  },
860
858
  .hurd => .gnu,
@@ -2048,6 +2046,7 @@ pub const Cpu = struct {
2048
2046
  },
2049
2047
  .armeb, .thumbeb => &arm.cpu.baseline,
2050
2048
  .aarch64 => switch (os.tag) {
2049
+ .haiku => &aarch64.cpu.cortex_a55,
2051
2050
  .driverkit, .maccatalyst, .macos => &aarch64.cpu.apple_m1,
2052
2051
  .ios, .tvos => &aarch64.cpu.apple_a7,
2053
2052
  .visionos => &aarch64.cpu.apple_m2,
@@ -2063,21 +2062,36 @@ pub const Cpu = struct {
2063
2062
  .lanai => &lanai.cpu.v11, // clang does not have a generic lanai model.
2064
2063
  .loongarch32 => &loongarch.cpu.la32v1_0,
2065
2064
  .loongarch64 => &loongarch.cpu.la64v1_0,
2066
- .m68k => &m68k.cpu.M68000,
2065
+ .m68k => &m68k.cpu.M68030,
2067
2066
  .mips => &mips.cpu.mips32r2,
2068
2067
  .mipsel => switch (os.tag) {
2069
2068
  .psp => &mips.cpu.allegrex,
2070
2069
  else => &mips.cpu.mips32r2,
2071
2070
  },
2072
- .mips64, .mips64el => &mips.cpu.mips64r2,
2071
+ .mips64 => switch (os.tag) {
2072
+ .openbsd => &mips.cpu.octeon,
2073
+ else => &mips.cpu.mips64r2,
2074
+ },
2075
+ .mips64el => &mips.cpu.mips64r2,
2073
2076
  .msp430 => &msp430.cpu.msp430,
2074
2077
  .nvptx, .nvptx64 => &nvptx.cpu.sm_52,
2078
+ .powerpc => switch (os.tag) {
2079
+ .openbsd => &powerpc.cpu.@"750",
2080
+ else => generic(arch),
2081
+ },
2082
+ .powerpc64 => switch (os.tag) {
2083
+ .openbsd => &powerpc.cpu.pwr9,
2084
+ else => generic(arch),
2085
+ },
2075
2086
  .powerpc64le => &powerpc.cpu.ppc64le,
2076
2087
  .riscv32, .riscv32be => &riscv.cpu.baseline_rv32,
2077
2088
  .riscv64, .riscv64be => &riscv.cpu.baseline_rv64,
2078
- // gcc/clang do not have a generic s390x model.
2079
- .s390x => &s390x.cpu.arch8,
2080
- .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
2089
+ .s390x => &s390x.cpu.arch11,
2090
+ .sparc => switch (os.tag) {
2091
+ .linux => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
2092
+ else => generic(arch),
2093
+ },
2094
+ .sparc64 => &sparc.cpu.ultrasparc,
2081
2095
  .x86 => &x86.cpu.pentium4,
2082
2096
  .x86_64 => switch (os.tag) {
2083
2097
  .driverkit, .maccatalyst => &x86.cpu.nehalem,
@@ -2087,6 +2101,7 @@ pub const Cpu = struct {
2087
2101
  else => generic(arch),
2088
2102
  },
2089
2103
  .xcore => &xcore.cpu.xs1b_generic,
2104
+ .xtensa => &xtensa.cpu.esp32,
2090
2105
  .wasm32, .wasm64 => &wasm.cpu.lime1,
2091
2106
 
2092
2107
  else => generic(arch),
@@ -2461,10 +2476,7 @@ pub const DynamicLinker = struct {
2461
2476
  .haiku => switch (cpu.arch) {
2462
2477
  .arm,
2463
2478
  .aarch64,
2464
- .m68k,
2465
- .powerpc,
2466
2479
  .riscv64,
2467
- .sparc64,
2468
2480
  .x86,
2469
2481
  .x86_64,
2470
2482
  => init("/system/runtime_loader"),
package/std/bit_set.zig CHANGED
@@ -1708,7 +1708,6 @@ fn testStaticBitSet(comptime Set: type) !void {
1708
1708
 
1709
1709
  test Integer {
1710
1710
  if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
1711
- if (comptime builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24300
1712
1711
 
1713
1712
  try testStaticBitSet(Integer(0));
1714
1713
  try testStaticBitSet(Integer(1));
@@ -980,8 +980,6 @@ test "Ascon-CXOF128 with customization" {
980
980
  }
981
981
 
982
982
  test "Ascon-AEAD128 round trip with various data sizes" {
983
- if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
984
-
985
983
  const key = [_]u8{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 };
986
984
  const nonce = [_]u8{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
987
985
 
@@ -557,8 +557,6 @@ pub const SealedBox = struct {
557
557
  const htest = @import("test.zig");
558
558
 
559
559
  test "(x)salsa20" {
560
- if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299
561
-
562
560
  const key: [32]u8 = @splat(0x69);
563
561
  const nonce: [8]u8 = @splat(0x42);
564
562
  const msg: [20]u8 = @splat(0);
@@ -604,8 +602,6 @@ test "xsalsa20poly1305 secretbox" {
604
602
  }
605
603
 
606
604
  test "xsalsa20poly1305 box" {
607
- if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299
608
-
609
605
  const io = std.testing.io;
610
606
  var msg: [100]u8 = undefined;
611
607
  var msg2: [msg.len]u8 = undefined;
@@ -621,8 +617,6 @@ test "xsalsa20poly1305 box" {
621
617
  }
622
618
 
623
619
  test "xsalsa20poly1305 sealedbox" {
624
- if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/24299
625
-
626
620
  const io = std.testing.io;
627
621
  var msg: [100]u8 = undefined;
628
622
  var msg2: [msg.len]u8 = undefined;
@@ -583,8 +583,6 @@ test "sha3-384 streaming" {
583
583
  }
584
584
 
585
585
  test "sha3-512 single" {
586
- if (builtin.cpu.has(.riscv, .v) and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/25083
587
-
588
586
  const h1 = "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26";
589
587
  try htest.assertEqualHash(Sha3_512, h1, "");
590
588
  const h2 = "b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0";
@@ -2600,25 +2600,6 @@ const signal_ucontext_t = switch (native_os) {
2600
2600
  sp: u64,
2601
2601
  pc: u64,
2602
2602
  },
2603
- // https://github.com/haiku/haiku/blob/47538c534fe0aadc626c09d121773fee8ea10d71/headers/posix/arch/m68k/signal.h
2604
- .m68k => extern struct {
2605
- pc: u32 align(8),
2606
- d: [8]u32,
2607
- a: [8]u32,
2608
- },
2609
- // https://github.com/haiku/haiku/blob/47538c534fe0aadc626c09d121773fee8ea10d71/headers/posix/arch/ppc/signal.h
2610
- .powerpc => extern struct {
2611
- pc: u32 align(8),
2612
- r: [13]u32, // Um, are you okay, Haiku?
2613
- _f: [14]f64,
2614
- _reserved: u32,
2615
- _fpscr: u32,
2616
- _ctr: u32,
2617
- _xer: u32,
2618
- _cr: u32,
2619
- _msr: u32,
2620
- lr: u32,
2621
- },
2622
2603
  // https://github.com/haiku/haiku/blob/47538c534fe0aadc626c09d121773fee8ea10d71/headers/posix/arch/riscv64/signal.h
2623
2604
  .riscv64 => extern struct {
2624
2605
  ra_sp_gp_tp: [4]u64,
@@ -2629,8 +2610,6 @@ const signal_ucontext_t = switch (native_os) {
2629
2610
  t3_6: [4]u64,
2630
2611
  pc: u64,
2631
2612
  },
2632
- // https://github.com/haiku/haiku/blob/47538c534fe0aadc626c09d121773fee8ea10d71/headers/posix/arch/sparc64/signal.h
2633
- .sparc64 => @compileError("sparc64-haiku mcontext_t missing"),
2634
2613
  // https://github.com/haiku/haiku/blob/47538c534fe0aadc626c09d121773fee8ea10d71/headers/posix/arch/x86/signal.h
2635
2614
  .x86 => extern struct {
2636
2615
  eip: u32,
@@ -1,33 +0,0 @@
1
- /* $OpenBSD: hibernate.h,v 1.3 2018/06/21 07:33:30 mlarkin Exp $ */
2
-
3
- /*
4
- * Copyright (c) 2013 Paul Irofti.
5
- *
6
- * Permission to use, copy, modify, and distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
- */
18
-
19
-
20
- #include <machine/hibernate_var.h>
21
-
22
- /* Loongson hibernate support structures and functions */
23
-
24
- int get_hibernate_info_md(union hibernate_info *);
25
- void hibernate_flush(void);
26
- void hibernate_enter_resume_mapping(vaddr_t, paddr_t, int);
27
- int hibernate_inflate_skip(union hibernate_info *, paddr_t);
28
- int hibernate_suspend(void);
29
- void hibernate_switch_stack_machdep(void);
30
- void hibernate_resume_machdep(vaddr_t);
31
- void hibernate_activate_resume_pt_machdep(void);
32
- void hibernate_enable_intr_machdep(void);
33
- void hibernate_disable_intr_machdep(void);
@@ -1,39 +0,0 @@
1
- /* $OpenBSD: hibernate_var.h,v 1.1 2013/06/02 21:46:04 pirofti Exp $ */
2
-
3
- /*
4
- * Copyright (c) 2013 Paul Irofti.
5
- *
6
- * Permission to use, copy, modify, and distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
- */
18
-
19
- /* Loongson hibernate support definitions */
20
-
21
- #define PAGE_MASK_4M ((256 * PAGE_SIZE) - 1)
22
-
23
- #define PIGLET_PAGE_MASK ~((paddr_t)PAGE_MASK_4M)
24
-
25
- /*
26
- * Steal hibernate pages right after the first page which is reserved
27
- * for the exception area.
28
- * */
29
- #define HIBERNATE_STACK_PAGE (PAGE_SIZE * 1)
30
- #define HIBERNATE_INFLATE_PAGE (PAGE_SIZE * 2)
31
- #define HIBERNATE_COPY_PAGE (PAGE_SIZE * 3)
32
- #define HIBERNATE_HIBALLOC_PAGE (PAGE_SIZE * 4)
33
-
34
- #define HIBERNATE_RESERVED_PAGES 4
35
-
36
- /* Use 4MB hibernation chunks */
37
- #define HIBERNATE_CHUNK_SIZE 0x400000
38
-
39
- #define HIBERNATE_CHUNK_TABLE_SIZE 0x100000
@@ -1,33 +0,0 @@
1
- /* $OpenBSD: hibernate.h,v 1.3 2018/06/21 07:33:30 mlarkin Exp $ */
2
-
3
- /*
4
- * Copyright (c) 2013 Paul Irofti.
5
- *
6
- * Permission to use, copy, modify, and distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
- */
18
-
19
-
20
- #include <machine/hibernate_var.h>
21
-
22
- /* Loongson hibernate support structures and functions */
23
-
24
- int get_hibernate_info_md(union hibernate_info *);
25
- void hibernate_flush(void);
26
- void hibernate_enter_resume_mapping(vaddr_t, paddr_t, int);
27
- int hibernate_inflate_skip(union hibernate_info *, paddr_t);
28
- int hibernate_suspend(void);
29
- void hibernate_switch_stack_machdep(void);
30
- void hibernate_resume_machdep(vaddr_t);
31
- void hibernate_activate_resume_pt_machdep(void);
32
- void hibernate_enable_intr_machdep(void);
33
- void hibernate_disable_intr_machdep(void);
@@ -1,39 +0,0 @@
1
- /* $OpenBSD: hibernate_var.h,v 1.1 2013/06/02 21:46:04 pirofti Exp $ */
2
-
3
- /*
4
- * Copyright (c) 2013 Paul Irofti.
5
- *
6
- * Permission to use, copy, modify, and distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
- */
18
-
19
- /* Loongson hibernate support definitions */
20
-
21
- #define PAGE_MASK_4M ((256 * PAGE_SIZE) - 1)
22
-
23
- #define PIGLET_PAGE_MASK ~((paddr_t)PAGE_MASK_4M)
24
-
25
- /*
26
- * Steal hibernate pages right after the first page which is reserved
27
- * for the exception area.
28
- * */
29
- #define HIBERNATE_STACK_PAGE (PAGE_SIZE * 1)
30
- #define HIBERNATE_INFLATE_PAGE (PAGE_SIZE * 2)
31
- #define HIBERNATE_COPY_PAGE (PAGE_SIZE * 3)
32
- #define HIBERNATE_HIBALLOC_PAGE (PAGE_SIZE * 4)
33
-
34
- #define HIBERNATE_RESERVED_PAGES 4
35
-
36
- /* Use 4MB hibernation chunks */
37
- #define HIBERNATE_CHUNK_SIZE 0x400000
38
-
39
- #define HIBERNATE_CHUNK_TABLE_SIZE 0x100000