mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Don't use included strlcpy/strlcat when already defined as macros
OS X 10.9 with Fortify has conflicting prototypes: In file included from calmwm.c:36: ./calmwm.h:28:8: error: conflicting types for '__builtin___strlcat_chk' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat' __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
This commit is contained in:
parent
a483e23e94
commit
c7f481e6fa
15
calmwm.h
15
calmwm.h
@ -21,11 +21,24 @@
|
||||
#ifndef _CALMWM_H_
|
||||
#define _CALMWM_H_
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
#include "queue.h"
|
||||
|
||||
/* prototypes for portable-included functions */
|
||||
char *fgetln(FILE *, size_t *);
|
||||
long long strtonum(const char *, long long, long long, const char **);
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
|
||||
#ifdef strlcat
|
||||
#define HAVE_STRLCAT
|
||||
#else
|
||||
size_t strlcat(char *, const char *, size_t);
|
||||
#endif
|
||||
#ifdef strlcpy
|
||||
#define HAVE_STRLCPY
|
||||
#else
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
#endif
|
||||
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
@ -18,10 +18,11 @@
|
||||
|
||||
/* OPENBSD ORIGINAL: lib/libc/string/strlcat.c */
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include "calmwm.h"
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
|
||||
/*
|
||||
* Appends src to string dst of size siz (unlike strncat, siz is the
|
||||
|
Loading…
Reference in New Issue
Block a user