Guard against strlcpy()/strlcat() being implemented as macros

This commit is contained in:
sin 2014-02-10 13:14:12 +00:00
parent 1de3e6c679
commit a8e1ea1398
3 changed files with 4 additions and 0 deletions

2
util.h
View File

@ -14,6 +14,8 @@ void eprintf(const char *, ...);
long estrtol(const char *, int);
void putword(const char *);
void recurse(const char *, void (*)(const char *));
#undef strlcat
size_t strlcat(char *, const char *, size_t);
#undef strlcpy
size_t strlcpy(char *, const char *, size_t);
char *ttytostr(int, int);

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
#include "../util.h"
size_t
strlcat(char *dest, const char *src, size_t count)

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
#include "../util.h"
size_t
strlcpy(char *dest, const char *src, size_t size)