remove "program_invocation_short_name" dependency for Linux
[libcext.git] / README.md
1 A (WIP) collection of portable, (mostly) strict C99, single-header implementations of common libc extensions.
2
3 ### How to
4
5 Include the header in every file needed as usual:
6
7 ```
8 #include "<ext-func-name>.h"
9 ```
10
11 In the file chosen for the function implementation:
12
13 ```
14 #define <EXT-FUNC-NAME>_IMPLEMENTATION
15 #include "<ext-func-name.h>"
16 ```
17
18 By default, the header won't have any stdlib includes, change that with:
19
20 ```
21 #define <EXT-FUNC-NAME>_INCLUDE_LIBC
22 ```
23
24 Or disable function override with:
25
26 ```
27 #define HAVE_<EXT-FUNC-NAME>
28 ```
29
30 ## Specifics
31
32 ### getopt\_long
33
34 `getopt_long.h` has additional macros related to argument
35 permuting, defining those enables it (GNU behaviour):
36
37 ```
38 #define GETOPT_PERMUTE_ARGS
39 #define GETOPT_LONG_PERMUTE_ARGS
40 #define GETOPT_LONG_ONLY_PERMUTE_ARGS
41 ```