move dmath, dsafe and nixctor to snippets/ directory

This commit is contained in:
Jeremy Baxter 2024-04-10 13:06:39 +12:00
parent 43b30424b1
commit 625968bef3
13 changed files with 0 additions and 0 deletions

View file

@ -1,20 +0,0 @@
/*
* Snippet of code showing how to call OpenBSD's
* pledge() syscall in safe D (or not!)
*/
int
main(string[] args) @safe
{
/* if you're not using @safe you can
* remove this ugly lambda thing */
version (OpenBSD) () @trusted {
import core.sys.openbsd.unistd : pledge;
import std.string : toStringz;
immutable(char) *promises;
promises = toStringz("stdio rpath wpath cpath ...");
pledge(promises, null);
}();
}