Imported portability-book.
[pkgsrc.git] / doc / portability-book / files / functions.xml
1 <!-- $NetBSD$ -->
2
3 <chapter id="functions">
4 <title>C/C++: functions</title>
5
6 <para>This chapter contains the requirements for using certain functions
7 in C and C++ code.</para>
8
9 <table>
10 <title>Functions on various platforms</title>
11 <tgroup cols="5">
12 <thead><row>
13   <entry>Function name</entry>
14   <entry>Platform</entry>
15   <entry>Library</entry>
16   <entry>Headers</entry>
17   <entry>Feature test macros</entry>
18 </row></thead>
19
20 <tbody>
21 <row>
22   <entry>getopt</entry>
23   <entry>NetBSD-*-*</entry>
24   <entry>c</entry>
25   <entry>unistd.h</entry>
26   <entry>_POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE >= 4 || defined(_NETBSD_SOURCE)</entry>
27 </row>
28 <row>
29   <entry>getopt</entry>
30   <entry>SunOS-5.10-*</entry>
31   <entry>c</entry>
32   <entry>unistd.h</entry>
33   <entry>(_XOPEN_SOURCE && _XOPEN_VERSION == 4) || __EXTENSIONS__</entry>
34 </row>
35 </tbody>
36 </tgroup>
37 </table>
38
39 </chapter>