mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
Add fallback implementation of strndup()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Linux test code fixed by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
ed38c2648c
commit
acde97a39d
8 changed files with 133 additions and 1 deletions
|
|
@ -190,6 +190,9 @@
|
|||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strndup' function. */
|
||||
#undef HAVE_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
|
|
|
|||
|
|
@ -492,6 +492,10 @@ extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz);
|
|||
extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
extern _X_EXPORT char * strndup(const char *str, size_t n);
|
||||
#endif
|
||||
|
||||
/* Logging. */
|
||||
typedef enum _LogParameter {
|
||||
XLOG_FLUSH,
|
||||
|
|
|
|||
Loading…
Reference in a new issue