[PATCH] strdupa, strndupa

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Wed Jun 1 15:24:00 GMT 2011


The attached patch adds strdupa(3) and strndupa(3):

http://www.kernel.org/doc/man-pages/online/pages/man3/strdup.3.html

These functions must be macros, as they use alloca(3) (or more
precisely, __builtin_alloca, as they are only available with GCC).
The code is adapted from our own strdup code.


Yaakov
Cygwin/X
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib-strdupa.patch
Type: application/octet-stream
Size: 1242 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20110601/cb542ad1/attachment.obj>


More information about the Newlib mailing list