diff --git a/Makefile b/Makefile index 73b36304..6f583d16 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/src/elog.c b/src/elog.c index 34e60baf..7e4120c9 100755 --- a/src/elog.c +++ b/src/elog.c @@ -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) diff --git a/src/mxml.c b/src/mxml.c index 2fe480d7..e7d2961c 100755 --- a/src/mxml.c +++ b/src/mxml.c @@ -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