Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ports:portabilityguidelines [2008/11/18 18:26] – Add a link to bashisms on Ubuntu's wiki ThierryThomas | ports:portabilityguidelines [2022/10/06 23:39] (current) – Fix list item and link KubilayKocak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | * Don't use /proc if there are other ways to get the information, | + | * Don't use '' |
| - | * Don't rely on undocumented (by POSIX) behavior. | + | * Don't rely on undocumented (by POSIX) behavior. |
| * Don't record timestamps in the critical path of the app if it also works without (getting timestamps may be slow, depending on the accuracy of timestamps in the OS). If you have to get timestamps, determine how precise they have to be and use an API, which is documented to just deliver the needed precision. | * Don't record timestamps in the critical path of the app if it also works without (getting timestamps may be slow, depending on the accuracy of timestamps in the OS). If you have to get timestamps, determine how precise they have to be and use an API, which is documented to just deliver the needed precision. | ||
| Line 7: | Line 7: | ||
| * A number of simple syscalls (for example '' | * A number of simple syscalls (for example '' | ||
| - | * Do not rely on Linux-specific socket behaviour. In particular, default socket buffer sizes are different (call '' | + | * Do not rely on Linux-specific socket behaviour. In particular, default socket buffer sizes are different (call '' |
| * If you absolutely need to rely on non-standard behaviour, properly encapsulate it into a generic API, do a check for the thing in the configure stage and bail out if it's missing. | * If you absolutely need to rely on non-standard behaviour, properly encapsulate it into a generic API, do a check for the thing in the configure stage and bail out if it's missing. | ||
| - | * Check the man pages at [[http://www.freebsd.org/ | + | * Check the [[https://man.freebsd.org/ |
| - | * Do not assume that '' | + | * Do not assume that '' |
| + | * Here is a [[https:// | ||
| * Do not '' | * Do not '' | ||
| - | * Check that you include headers in the way recommended through POSIX or the man-page. Eg. '' | + | * Check that you include headers in the way recommended through POSIX or the man-page. Eg. '' |
| - | * Compile threaded apps with "-pthread", not "-lpthread" | + | * Compile threaded apps with '' |
| - | * A list of common bashisms is available at https:// | + | ---- |
| + | |||
| + | {{tag> | ||
| + | {{tag> | ||
| + | {{tag> | ||