2002-05-10 Mark Bradshaw <bradshaw@staff.crosswalk.com>

* libc/include/string.h (!__STRICT_ANSI__): Add strlcat and strlcpy.
	* libc/string/Makefile.am: Add strlcat.c and strlcpy.c.
	* libc/string/strlcat.c: New file.
	* libc/string/strlcpy.c: New file.
This commit is contained in:
Thomas Fitzsimmons 2002-05-13 19:33:01 +00:00
parent 043bc3e1ee
commit 7d2ce8983d
4 changed files with 22 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2002-05-10 Mark Bradshaw <bradshaw@staff.crosswalk.com>
* libc/include/string.h (!__STRICT_ANSI__): Add strlcat and strlcpy.
* libc/string/Makefile.am: Add strlcat.c and strlcpy.c.
* libc/string/strlcat.c: New file.
* libc/string/strlcpy.c: New file.
2002-05-10 Jeff Johnston <jjohnstn@redhat.com> 2002-05-10 Jeff Johnston <jjohnstn@redhat.com>
* libc/string/strchr.c: Fix comment typo. * libc/string/strchr.c: Fix comment typo.

View File

@ -61,6 +61,8 @@ char *_EXFUN(rindex,(const char *, int));
int _EXFUN(strcasecmp,(const char *, const char *)); int _EXFUN(strcasecmp,(const char *, const char *));
char *_EXFUN(strdup,(const char *)); char *_EXFUN(strdup,(const char *));
char *_EXFUN(_strdup_r,(struct _reent *, const char *)); char *_EXFUN(_strdup_r,(struct _reent *, const char *));
size_t _EXFUN(strlcat,(char *, const char *, size_t));
size_t _EXFUN(strlcpy,(char *, const char *, size_t));
int _EXFUN(strncasecmp,(const char *, const char *, size_t)); int _EXFUN(strncasecmp,(const char *, const char *, size_t));
char *_EXFUN(strsep,(char **, const char *)); char *_EXFUN(strsep,(char **, const char *));
char *_EXFUN(strlwr,(char *)); char *_EXFUN(strlwr,(char *));

View File

@ -23,6 +23,8 @@ LIB_SOURCES = \
strcpy.c \ strcpy.c \
strcspn.c \ strcspn.c \
strerror.c \ strerror.c \
strlcat.c \
strlcpy.c \
strlen.c \ strlen.c \
strlwr.c \ strlwr.c \
strncat.c \ strncat.c \

View File

@ -121,6 +121,8 @@ LIB_SOURCES = \
strcpy.c \ strcpy.c \
strcspn.c \ strcspn.c \
strerror.c \ strerror.c \
strlcat.c \
strlcpy.c \
strlen.c \ strlen.c \
strlwr.c \ strlwr.c \
strncat.c \ strncat.c \
@ -177,10 +179,11 @@ lib_a_LIBADD =
@USE_LIBTOOL_FALSE@lib_a_OBJECTS = bcmp.o bcopy.o bzero.o index.o \ @USE_LIBTOOL_FALSE@lib_a_OBJECTS = bcmp.o bcopy.o bzero.o index.o \
@USE_LIBTOOL_FALSE@memchr.o memcmp.o memcpy.o memmove.o memset.o \ @USE_LIBTOOL_FALSE@memchr.o memcmp.o memcpy.o memmove.o memset.o \
@USE_LIBTOOL_FALSE@rindex.o strcat.o strchr.o strcmp.o strcasecmp.o \ @USE_LIBTOOL_FALSE@rindex.o strcat.o strchr.o strcmp.o strcasecmp.o \
@USE_LIBTOOL_FALSE@strcoll.o strcpy.o strcspn.o strerror.o strlen.o \ @USE_LIBTOOL_FALSE@strcoll.o strcpy.o strcspn.o strerror.o strlcat.o \
@USE_LIBTOOL_FALSE@strlwr.o strncat.o strncmp.o strncasecmp.o strncpy.o \ @USE_LIBTOOL_FALSE@strlcpy.o strlen.o strlwr.o strncat.o strncmp.o \
@USE_LIBTOOL_FALSE@strpbrk.o strrchr.o strspn.o strtok.o strtok_r.o \ @USE_LIBTOOL_FALSE@strncasecmp.o strncpy.o strpbrk.o strrchr.o strspn.o \
@USE_LIBTOOL_FALSE@strupr.o strxfrm.o strstr.o swab.o u_strerr.o @USE_LIBTOOL_FALSE@strtok.o strtok_r.o strupr.o strxfrm.o strstr.o \
@USE_LIBTOOL_FALSE@swab.o u_strerr.o
LTLIBRARIES = $(noinst_LTLIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES)
libstring_la_LIBADD = libstring_la_LIBADD =
@ -188,10 +191,10 @@ libstring_la_LIBADD =
@USE_LIBTOOL_TRUE@index.lo memchr.lo memcmp.lo memcpy.lo memmove.lo \ @USE_LIBTOOL_TRUE@index.lo memchr.lo memcmp.lo memcpy.lo memmove.lo \
@USE_LIBTOOL_TRUE@memset.lo rindex.lo strcat.lo strchr.lo strcmp.lo \ @USE_LIBTOOL_TRUE@memset.lo rindex.lo strcat.lo strchr.lo strcmp.lo \
@USE_LIBTOOL_TRUE@strcasecmp.lo strcoll.lo strcpy.lo strcspn.lo \ @USE_LIBTOOL_TRUE@strcasecmp.lo strcoll.lo strcpy.lo strcspn.lo \
@USE_LIBTOOL_TRUE@strerror.lo strlen.lo strlwr.lo strncat.lo strncmp.lo \ @USE_LIBTOOL_TRUE@strerror.lo strlcat.lo strlcpy.lo strlen.lo strlwr.lo \
@USE_LIBTOOL_TRUE@strncasecmp.lo strncpy.lo strpbrk.lo strrchr.lo \ @USE_LIBTOOL_TRUE@strncat.lo strncmp.lo strncasecmp.lo strncpy.lo \
@USE_LIBTOOL_TRUE@strspn.lo strtok.lo strtok_r.lo strupr.lo strxfrm.lo \ @USE_LIBTOOL_TRUE@strpbrk.lo strrchr.lo strspn.lo strtok.lo strtok_r.lo \
@USE_LIBTOOL_TRUE@strstr.lo swab.lo u_strerr.lo @USE_LIBTOOL_TRUE@strupr.lo strxfrm.lo strstr.lo swab.lo u_strerr.lo
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)