diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-02 19:25:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-02 19:25:52 +0000 |
commit | 67f14032b18b7b46a56bd32ccb88923588603164 (patch) | |
tree | e226b607d34b77df664416b3ee2d123ecf4e88d1 /src/common/compat.c | |
parent | 509c0bdc22c5c36b8f6048e9beef852875de85d2 (diff) | |
download | tor-67f14032b18b7b46a56bd32ccb88923588603164.tar.gz tor-67f14032b18b7b46a56bd32ccb88923588603164.zip |
Handle strlcat/strlcpy correctly on platforms that have them.
svn:r2647
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 58ba52c375..649d99e8fc 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -68,6 +68,14 @@ #include "log.h" #include "util.h" +/* Inline the strl functions if the plaform doesn't have them. */ +#ifndef HAVE_STRLCPY +#include "strlcpy.c" +#endif +#ifndef HAVE_STRLCAT +#include "strlcat.c" +#endif + /** Replacement for snprintf. Differs from platform snprintf in two * ways: First, always NUL-terminates its output. Second, always * returns -1 if the result is truncated. (Note that this return |