Simplify handling of replacement functions; strlcpy() & C:o
- Drop weak bindings, use simple #define in compat.h instead - No need to #ifdef sources with HAVE_foo, configure handles this for us - Move utimensat() declaration to compat.h from pidfile.c to be consistent With these changes we can let libsyslog link with the replacement objs, just like syslogd and logger does. Because even if the C-library does *not* have strlcpy() & C:o *and* an application has a local copy of any of these APIs, our versions are prefixed with __ in the symbol table. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@ -16,10 +16,6 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <compat.h>
|
||||
#ifndef HAVE_STRLCPY
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -52,7 +48,3 @@ __strlcpy(char *dst, const char *src, size_t dsize)
|
||||
|
||||
return(src - osrc - 1); /* count does not include NUL */
|
||||
}
|
||||
|
||||
weak_alias(__strlcpy, strlcpy);
|
||||
|
||||
#endif /* HAVE_STRLCPY */
|
||||
|
Reference in New Issue
Block a user