This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/disklabel.h> | |
#include <sys/dkio.h> /* DIOCGDINFO */ | |
#include <sys/ioctl.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
/* | |
* Shows the size in bytes of a disk partition in OpenBSD. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some of Ruby's tests get stuck in OpenBSD. | |
This is because of OpenBSD's bug. FIFO gets stuck. | |
This patch causes all FIFO tests to fail, | |
so I can run `make test-all` and `make test-spec` in OpenBSD. | |
Jeremy Evans (who knows OpenBSD better than me) | |
described the bug here: https://bugs.ruby-lang.org/issues/13875#note-7 | |
diff --git a/spec/ruby/spec_helper.rb b/spec/ruby/spec_helper.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/util/amisc/aelflod.c b/util/amisc/aelflod.c | |
index d5a9c0d..dbaafc9 100644 | |
--- a/util/amisc/aelflod.c | |
+++ b/util/amisc/aelflod.c | |
@@ -43,6 +43,7 @@ char* stringarea; | |
uint32_t ack_off_char; | |
int nstab = 0; /* S_STB symbol count */ | |
int nsym = 0; /* other symbol count */ | |
+int nlocal = 0; /* local symbols */ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mach/powerpc/as/mach2.c b/mach/powerpc/as/mach2.c | |
index 480c5fa..47ef18c 100644 | |
--- a/mach/powerpc/as/mach2.c | |
+++ b/mach/powerpc/as/mach2.c | |
@@ -10,18 +10,32 @@ | |
%token <y_word> C | |
%token <y_word> OP | |
+%token <y_word> OP_BDA | |
+%token <y_word> OP_BDL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE SetDemo; | |
FROM InOut IMPORT WriteLn, WriteString; | |
PROCEDURE Puts(s: ARRAY OF CHAR); | |
BEGIN | |
WriteString(s); | |
WriteLn; | |
END Puts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run benchmarks: | |
# $ ruby benchrand.rb | |
# Run benchmarks in parallel with sh and xterm: | |
# $ for i in 1 2; do xterm -hold -e ruby benchrand.rb& done | |
# | |
# Outputs the time to generate SIZE random bytes with several | |
# different random number generators: | |
# - Random::DEFAULT from Ruby | |
# - /dev/urandom | |
# - arc4random_buf() from libc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script compiles scramble.c and calculates the score. | |
# Before use, put scramble.c, $text, $pict in current directory. | |
text=pg100.txt | |
pict=filament.jpg | |
# Die if any command fails. | |
# Die if files are missing. | |
set -e | |
ls scramble.c $text $pict >/dev/null |
NewerOlder