summaryrefslogtreecommitdiffstats
path: root/lib/libc/include
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-04-29 21:13:50 +0000
committernectar <nectar@FreeBSD.org>2003-04-29 21:13:50 +0000
commite69967f5348cec651f8806d25d2c59ac8ed8c2a2 (patch)
treee9749f1ff2693755bce73e10528fc8cc6a6563ea /lib/libc/include
parent975e4bcef1ba69d85a5c90f1849accc3cd74cb65 (diff)
downloadFreeBSD-src-e69967f5348cec651f8806d25d2c59ac8ed8c2a2.zip
FreeBSD-src-e69967f5348cec651f8806d25d2c59ac8ed8c2a2.tar.gz
`Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's version if the application defines them. Inspired by: qpopper's interfering and buggy version of strlcpy
Diffstat (limited to 'lib/libc/include')
-rw-r--r--lib/libc/include/namespace.h2
-rw-r--r--lib/libc/include/un-namespace.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h
index e626200..6a7c68d 100644
--- a/lib/libc/include/namespace.h
+++ b/lib/libc/include/namespace.h
@@ -43,6 +43,8 @@
#define err _err
#define warn _warn
#define nsdispatch _nsdispatch
+#define strlcat _strlcat
+#define strlcpy _strlcpy
/*
* Prototypes for syscalls/functions that need to be overridden
diff --git a/lib/libc/include/un-namespace.h b/lib/libc/include/un-namespace.h
index eaa9471..f354f78 100644
--- a/lib/libc/include/un-namespace.h
+++ b/lib/libc/include/un-namespace.h
@@ -149,5 +149,7 @@ int _flock(int, int);
#undef err
#undef warn
#undef nsdispatch
+#undef strlcat
+#undef strlcpy
#endif /* _UN_NAMESPACE_H_ */
OpenPOWER on IntegriCloud