added include guards to compatibility headers
This commit is contained in:
parent
6bf7c0d219
commit
745b8cf420
@ -1,9 +1,18 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* @brief prototypes of strlcpy()/strlcat() imported from OpenBSD
|
* @brief prototypes of strlcat() imported from OpenBSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __COMPAT_STRLCAT_H
|
||||||
|
#define __COMPAT_STRLCAT_H
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCAT
|
#ifndef HAVE_STRLCAT
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -28,10 +28,19 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* @brief prototypes of strlcpy()/strlcat() imported from OpenBSD
|
* @brief prototypes of strlcpy() imported from OpenBSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __COMPAT_STRLCPY_H
|
||||||
|
#define __COMPAT_STRLCPY_H
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#ifndef HAVE_STRLCPY
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -3,7 +3,16 @@
|
|||||||
* @brief prototype of strnlen() from OpenBSD
|
* @brief prototype of strnlen() from OpenBSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __COMPAT_STRNLEN_H
|
||||||
|
#define __COMPAT_STRNLEN_H
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRNLEN
|
#ifndef HAVE_STRNLEN
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
size_t strnlen(const char *str, size_t maxlen);
|
size_t strnlen(const char *str, size_t maxlen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user