libc/string: put source files list one item per line libc/string: add strdupa(3) and strndupa(3)
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
| lib/libc/string/strdupa.c | ||
|---|---|---|
| 2 | The two C files added are verbatim copy of the source files without 'a'. I kept the licenses blocks in both of them intact, since the change made in code is minuscule. I do not want to edit anything in there for the purpose of the commit. Afterwards, you can edit it as you see fit. | |
| lib/libc/string/strdup.3 | ||
|---|---|---|
| 109 | and strndupa(), no? | |
Comment Actions
This cannot work, alloca result is only valid for the duration of the current frame.
The functions can be moved to string.h as __always_inline, but I suspect that this would cause compat issues with weird compilers.
It seems that the only option is to define the extension macros together with the use of __builtin_alloca().