Portability

What does your platform need to run Oils?

These are some notes that supplement INSTALL.

Table of Contents
Issues in the core of Oils
libc - FNM_EXTMATCH is not in POSIX
libc - GLOB_PERIOD is not in POSIX
Atomic Assignments
Extra Features
USDT - Userland Statically-Defined Tracing
"Enums" that are often extended
Unicode

Issues in the core of Oils

libc - FNM_EXTMATCH is not in POSIX

To match extended globs like @(*.cc|*.h), OSH relies on FNM_EXTMATCH from GNU libc.

This is unlike bash, which has its own extended glob library.

TODO: when using other libc, using this syntax should be an error.

libc - GLOB_PERIOD is not in POSIX

To implement the bash feature shopt -s dotglob, OSH relies on GLOB_PERIOD, which some libc's implement.

This is unlike bash, which has its own glob library.

Atomic Assignments

The signal handler assumes that int and pointer assignments are atomic. This is a common and widespread assumption.

Extra Features

USDT - Userland Statically-Defined Tracing

Our C++ code has DTRACE_PROBE() macros, which means we can use tools like bpftrace on Linux to make low-overhead queries of runtime behavior.

The probe names and locations aren't stable across releases.

"Enums" that are often extended

Different Unix implementations often extend:

Unicode

Strings in Oils are byte strings, which are often UTF-8 encoded.

We use libc functions that may depend on the global locale setting, like glob(). We currently assume your libc is configured to use UTF-8.

See the Unicode doc for details on Unicode-aware operations.

Generated on Sun, 05 Jan 2025 23:28:55 -0500