Added STRLCPY_DEFINED

SVN revision: 1257
This commit is contained in:
2005-03-21 16:06:48 +00:00
parent 88b936b7f9
commit 2fa4739faa
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ regex.o: src/regex.c src/regex.h
$(CC) $(CFLAGS) -c -o regex.o src/regex.c
mxml.o: src/mxml.c src/mxml.h
$(CC) $(CFLAGS) -c -o mxml.o src/mxml.c
$(CC) $(CFLAGS) -DSTRLCPY_DEFINED -c -o mxml.o src/mxml.c
elogd: src/elogd.c regex.o mxml.o
$(CC) $(CFLAGS) -o elogd src/elogd.c regex.o mxml.o $(LIBS)
+7
View File
@@ -6,6 +6,9 @@
Contents: Electronic logbook utility
$Log$
Revision 1.24 2005/03/21 16:06:48 ritt
Added STRLCPY_DEFINED
Revision 1.23 2005/01/15 17:05:09 midas
Changed comment
@@ -195,6 +198,8 @@ int equal_ustring(char *str1, char *str2)
/*---- strlcpy and strlcat to avoid buffer overflow ----------------*/
#ifndef STRLCPY_DEFINED
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless size == 0).
@@ -258,6 +263,8 @@ size_t strlcat(char *dst, const char *src, size_t size)
return (dlen + (s - src)); /* count does not include NUL */
}
#endif // STRLCPY_DEFINED
/*-------------------------------------------------------------------*/
void btou(char *str)
+4 -1
View File
@@ -6,6 +6,9 @@
Contents: Midas XML Library
$Log$
Revision 1.7 2005/03/21 16:05:21 ritt
Added STRLCPY_DEFINED
Revision 1.6 2005/03/21 16:02:08 ritt
Added code for strlcpy/cat ifndef STRLCPY_DEFINED
@@ -66,7 +69,7 @@ typedef int BOOL;
#ifdef STRLCPY_DEFINED
extern size_t strlcpy(char *dst, const char *src, size_t size);
extern size_t strlcat(char *dst, const char *src, size_t size)
extern size_t strlcat(char *dst, const char *src, size_t size);
#else