xref: /freebsd/crypto/openssl/NOTES-POSIX.md (revision e7be843b4a162e68651d3911f0357ed464915629)
1*e7be843bSPierre ProncheryNotes on POSIX
2*e7be843bSPierre Pronchery==============
3*e7be843bSPierre Pronchery
4*e7be843bSPierre ProncheryThere are few instances where OpenSSL requires a POSIX C library, at least
5*e7be843bSPierre Proncheryversion 1-2008, or compatible enough functionality.
6*e7be843bSPierre Pronchery
7*e7be843bSPierre ProncheryThere are exceptions, though, for platforms that do not have a POSIX
8*e7be843bSPierre Proncherylibrary, or where there are quirks that need working around.  A notable
9*e7be843bSPierre Proncheryplatform is Windows, where POSIX functionality may be available, but where
10*e7be843bSPierre Proncherythe function names are prefixed with an underscore, and where some POSIX
11*e7be843bSPierre Proncherytypes are not present (such as `ssize_t`).
12*e7be843bSPierre Pronchery
13*e7be843bSPierre ProncheryPlatforms that do have a POSIX library may still not have them accessible
14*e7be843bSPierre Proncheryunless the following macros are defined:
15*e7be843bSPierre Pronchery
16*e7be843bSPierre Pronchery    _POSIX_C_SOURCE=200809L
17*e7be843bSPierre Pronchery    _XOPEN_SOURCE=1
18*e7be843bSPierre Pronchery
19*e7be843bSPierre ProncheryThis is, for example, the case when building with gcc or clang and using the
20*e7be843bSPierre Proncheryflag `-ansi`.
21