summaryrefslogtreecommitdiffstats
path: root/usr/klibc/CAVEATS
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/CAVEATS')
-rw-r--r--usr/klibc/CAVEATS49
1 files changed, 49 insertions, 0 deletions
diff --git a/usr/klibc/CAVEATS b/usr/klibc/CAVEATS
new file mode 100644
index 0000000..39949c2
--- /dev/null
+++ b/usr/klibc/CAVEATS
@@ -0,0 +1,49 @@
+ -------------------------------------------------
+ Please note the following caveats when using klibc:
+ -------------------------------------------------
+
+optimization:
+-------------
+Compiling with -O0 is not supported. It may or may not work; please
+use -O1 if you want to do maximize debuggability.
+
+Compiling with -O0 is more likely to work on gcc 3.
+
+
+setjmp()/longjmp():
+-------------------
+setjmp() and longjmp() *do not* save signal state. sigsetjmp() and
+siglongjmp() *do* save the signal mask if the extra argument is nonzero.
+
+The standards actually state that if you pass longjmp() a final value
+of zero the library should change that to a 1! Presumably the reason
+is so people who write broken code can get away with writing
+longjmp(buf); or something equally bad. If you pass longjmp() a final
+value of 0 you get what you deserve -- setjmp() will happily return 0.
+
+
+stdio:
+------
+Only a small subset of the stdio functions are implemented. Those
+that are implemented do not buffer, although they *do* trap EINTR or
+short read/writes and iterate.
+
+_fread() and _fwrite(), which take only one size argument (like
+read/write), but do handle EINTR/short return are also available.
+
+
+namespaces:
+-----------
+klibc frequently includes headers in other headers in a way that
+exposes more symbols than POSIX says they should. "Live with it."
+
+
+theading:
+---------
+klibc is not thread-safe. Consequently, clone() or any of the
+pthreads functions are not included.
+
+
+bsd_signal vs sysv_signal:
+--------------------------
+signal() now defaults to bsd_signal().