summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6ccea02..7d6d6ab 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,27 @@ because the twelve entry points this library needs are a fraction of what such
a wrapper brings, and one file with no dependency is easier to audit than one
more dependency.
+### Platform support and the calling convention
+
+Built and tested on **Linux x86-64 with gfortran**. Other platforms are
+plausible but unverified — including other compilers, `flang` and `ifx` among
+them.
+
+One limit is worth knowing before you port this: `curl_easy_setopt` and
+`curl_easy_getinfo` are **variadic** in C, and Fortran cannot express that.
+`src/cepis_http.f90` binds them with a single pointer-sized third argument and
+passes integers through `transfer`, which is what the **SysV AMD64** and
+**AAPCS64** calling conventions ask for — in both, the first several variadic
+arguments travel in registers exactly as fixed ones do.
+
+That assumption does **not** hold on every ABI. On one that passes variadic
+arguments on the stack while passing fixed arguments in registers — **Apple
+ARM64 is the case to watch** — the binding as written would put the value in
+the wrong place, and the failure would be silent corruption of the option
+value rather than a compile error. Porting there means giving the variadic
+calls their own interface blocks per option type, or routing them through a
+small C shim.
+
## Usage
`use cepis` brings in everything. Every fallible call returns an `integer`