diff options
author | Fabian Groffen <grobian@gentoo.org> | 2009-01-31 17:58:37 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2009-01-31 17:58:37 +0000 |
commit | 3fd86a625baab64b2dba1917d59ad0c5061dfe84 (patch) | |
tree | 9bb5b83088ce261c23be90bb67a799859a5ff5c5 /xfuncs.h | |
parent | check for lenght typo (diff) | |
download | pax-utils-3fd86a625baab64b2dba1917d59ad0c5061dfe84.tar.gz pax-utils-3fd86a625baab64b2dba1917d59ad0c5061dfe84.tar.bz2 pax-utils-3fd86a625baab64b2dba1917d59ad0c5061dfe84.zip |
For bug #249731, add an xstrndup wrapper, and implement strndup on hosts that don't have it, based on the strndup implementation of sandbox, with a little change to make it C90 compliant.
Diffstat (limited to 'xfuncs.h')
-rw-r--r-- | xfuncs.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* * Copyright 2003-2007 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/xfuncs.h,v 1.2 2008/12/30 12:58:08 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/pax-utils/xfuncs.h,v 1.3 2009/01/31 17:58:37 grobian Exp $ * * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org> * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org> @@ -11,6 +11,7 @@ #define __XFUNCS_H__ char *xstrdup(const char *s); +char *xstrndup(const char *s, const size_t n); void *xmalloc(size_t size); void *xzalloc(size_t size); void *xrealloc(void *ptr, size_t size); |