Fix include guard, and always declare the functions.

This commit is contained in:
Dag-Erling Smørgrav 2014-07-10 13:40:23 +00:00 committed by des
parent 03dbd212fa
commit 2f3ecfa7ba
3 changed files with 10 additions and 7 deletions

View file

@ -31,11 +31,12 @@
* $Cryb$
*/
#ifndef OPENPAM_STRLCAT_H_INCLUDED
#define OPENPAM_STRLCAT_H_INCLUDED
#ifndef CRYB_STRLCAT_H_INCLUDED
#define CRYB_STRLCAT_H_INCLUDED
size_t cryb_strlcat(char *, const char *, size_t);
#ifndef HAVE_STRLCAT
size_t cryb_strlcat(char *, const char *, size_t);
#undef strlcat
#define strlcat(arg, ...) cryb_strlcat(arg, __VA_ARGS__)
#endif

View file

@ -34,8 +34,9 @@
#ifndef CRYB_STRLCMP_H_INCLUDED
#define CRYB_STRLCMP_H_INCLUDED
#ifndef HAVE_STRLCMP
int cryb_strlcmp(const char *, const char *, size_t);
#ifndef HAVE_STRLCMP
#undef strlcmp
#define strlcmp(...) cryb_strlcmp(__VA_ARGS__)
#endif

View file

@ -31,11 +31,12 @@
* $Cryb$
*/
#ifndef OPENPAM_STRLCPY_H_INCLUDED
#define OPENPAM_STRLCPY_H_INCLUDED
#ifndef CRYB_STRLCPY_H_INCLUDED
#define CRYB_STRLCPY_H_INCLUDED
size_t cryb_strlcpy(char *, const char *, size_t);
#ifndef HAVE_STRLCPY
size_t cryb_strlcpy(char *, const char *, size_t);
#undef strlcpy
#define strlcpy(arg, ...) cryb_strlcpy(arg, __VA_ARGS__)
#endif