mirror of
https://github.com/troglobit/libite.git
synced 2026-10-05 23:13:41 +07:00
strdupa.h: #error if building with non-GCC on non-GNU systems
At the moment only GCC is supported on non-GNU systems, unfortunately. GNU systems usually have GLIBC, or another library with strdupa(). This strdupa() implementation requires GCC for the builtin alloca API. Followup to pull-request #4 Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
#if !HAVE_STRDUPA
|
||||
#if defined(__GNUC__)
|
||||
#include <stddef.h> /* size_t */
|
||||
|
||||
#include <string.h> /* memcpy(3) strlen(3) */
|
||||
|
||||
#define strdupa(src) (__extension__ ({ \
|
||||
@@ -47,6 +46,8 @@
|
||||
(char *)memcpy(dst_, src, len_); \
|
||||
}))
|
||||
|
||||
#else /* If not GCC, e.g. Clang */
|
||||
#error strdupa() may use an unsupported GNU C API, please forward any fix to maintainer, cheers!
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* !HAVE_STRDUPA */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user