include $(top_srcdir)libc/string/generic/Makefile.in
MSRC:=wstring.c
-MOBJ:= basename.o bcopy.o bzero.o dirname.o ffs.o memccpy.o memchr.o memcmp.o \
- memcpy.o memmove.o mempcpy.o memrchr.o memset.o rawmemchr.o stpcpy.o \
- stpncpy.o strcasecmp.o strcasestr.o strcat.o strchrnul.o strchr.o \
- strcmp.o strcpy.o strcspn.o strdup.o strlen.o strncasecmp.o strncat.o \
- strncmp.o strncpy.o strndup.o strnlen.o strpbrk.o strrchr.o strsep.o \
- strspn.o strstr.o strtok.o strtok_r.o strerror.o __xpg_strerror_r.o \
+MOBJ:= basename.o bcopy.o bzero.o dirname.o ffs.o memccpy.o \
+ memrchr.o rawmemchr.o strcasecmp.o strcasestr.o \
+ strncasecmp.o strndup.o strsep.o \
+ strtok.o strerror.o __xpg_strerror_r.o \
_string_syserrmsgs.o __glibc_strerror_r.o \
_string_syssigmsgs.o sys_siglist.o strsignal.o psignal.o \
- __xpg_basename.o strlcat.o strlcpy.o sys_errlist.o memmem.o
+ __xpg_basename.o strlcat.o sys_errlist.o memmem.o
MOBJW:=
ifeq ($(UCLIBC_HAS_WCHAR),y)
-MOBJW:= wcscasecmp.o wcscat.o wcschrnul.o wcschr.o wcscmp.o wcscpy.o wcscspn.o \
- wcsdup.o wcslen.o wcsncasecmp.o wcsncat.o wcsncmp.o wcsncpy.o \
- wcsnlen.o wcspbrk.o wcsrchr.o wcsspn.o wcsstr.o wcstok.o wmemchr.o \
- wmemcmp.o wmemcpy.o wmemmove.o wmempcpy.o wmemset.o wcpcpy.o wcpncpy.o \
- __wcslcpy.o \
+MOBJW:= wcscasecmp.o wcsncasecmp.o \
wcsxfrm.o strxfrm.o # wcscoll strcoll.o
endif
STRING_DIR:=$(top_srcdir)libc/string
STRING_OUT:=$(top_builddir)libc/string
+STRING_WSRC:=$(filter-out $(STRING_DIR)/wstring.c,$(wildcard $(STRING_DIR)/w*.c))
+STRING_CSRC:=$(filter-out $(STRING_DIR)/wstring.c $(STRING_WSRC),$(wildcard $(STRING_DIR)/*.c))
+
+ifeq ($(UCLIBC_HAS_STRING_ARCH_OPT),y)
+ifneq ($(strip $(STRING_ARCH_OBJS)),)
+MOBJ:=$(filter-out $(notdir $(STRING_ARCH_OBJS)),$(MOBJ))
+STRING_CSRC:=$(filter-out $(patsubst %.o,$(STRING_DIR)/%.c,$(notdir $(STRING_ARCH_OBJS))),$(STRING_CSRC))
+STRING_WSRC:=$(filter-out $(patsubst %.o,$(STRING_DIR)/%.c,$(notdir $(STRING_ARCH_OBJS))),$(STRING_WSRC))
+endif
+endif
+
+ifeq ($(UCLIBC_HAS_STRING_GENERIC_OPT),y)
+ifneq ($(strip $(STRING_GENERIC_OBJS)),)
+MOBJ:=$(filter-out $(notdir $(STRING_GENERIC_OBJS)),$(MOBJ))
+STRING_CSRC:=$(filter-out $(patsubst %.o,$(STRING_DIR)/%.c,$(notdir $(STRING_GENERIC_OBJS))),$(STRING_CSRC))
+STRING_WSRC:=$(filter-out $(patsubst %.o,$(STRING_DIR)/%.c,$(notdir $(STRING_GENERIC_OBJS))),$(STRING_WSRC))
+endif
+endif
+
+
+STRING_COBJ:=$(patsubst $(STRING_DIR)/%.c,$(STRING_OUT)/%.o,$(STRING_CSRC))
+ifeq ($(UCLIBC_HAS_WCHAR),y)
+STRING_WOBJ:=$(patsubst $(STRING_DIR)/%.c,$(STRING_OUT)/%.o,$(STRING_WSRC))
+endif
STRING_MSRC:=$(patsubst %.c,$(STRING_DIR)/%.c,$(MSRC))
STRING_MOBJ:=$(patsubst %.o,$(STRING_OUT)/%.o,$(MOBJ))
STRING_MOBJW:=$(patsubst %.o,$(STRING_OUT)/%.o,$(MOBJW))
STRING_DEF:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(STRING_MOBJ))))
STRING_Wx:=$(STRING_MOBJW) $(STRING_MOBJx) $(STRING_MOBJWx)
-STRING_OBJS:=$(STRING_MOBJ) $(STRING_Wx)
+STRING_OBJS:=$(STRING_COBJ) $(STRING_WOBJ) $(STRING_MOBJ) $(STRING_Wx)
$(STRING_MOBJ): $(STRING_MSRC)
$(compile.m)
libc-so-y+=$(STRING_OBJS:.o=.os)
CFLAGS-multi-y+=$(STRING_DEF)
-libc-multi-y+=$(STRING_MSRC)
+libc-multi-y+=$(STRING_MSRC) $(STRING_CSRC) $(STRING_WSRC)
libc-nomulti-y+=$(STRING_Wx)
objclean-y+=string_objclean
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memchr
+#define Wmemchr __memchr
+
+#include "wstring.c"
+
+strong_alias(__memchr, memchr)
+
+#undef L_memchr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memcmp
+#define Wmemcmp __memcmp
+
+#include "wstring.c"
+
+strong_alias(__memcmp, memcmp)
+
+weak_alias(memcmp, bcmp)
+
+#undef L_memcmp
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memcpy
+#define Wmemcpy __memcpy
+
+#include "wstring.c"
+
+strong_alias(__memcpy, memcpy)
+
+#undef L_memcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memmove
+#define Wmemmove __memmove
+
+#include "wstring.c"
+
+strong_alias(__memmove, memmove)
+
+#undef L_memmove
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_mempcpy
+#define Wmempcpy __mempcpy
+
+#include "wstring.c"
+
+strong_alias(__mempcpy, mempcpy)
+
+#undef L_mempcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memset
+#define Wmemset __memset
+
+#include "wstring.c"
+
+strong_alias(__memset, memset)
+
+#undef L_memset
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_stpcpy
+#define Wstpcpy __stpcpy
+
+#include "wstring.c"
+
+strong_alias(__stpcpy, stpcpy)
+
+#undef L_stpcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_stpncpy
+#define Wstpncpy __stpncpy
+
+#include "wstring.c"
+
+strong_alias(__stpncpy, stpncpy)
+
+#undef L_stpncpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcat
+#define Wstrcat __strcat
+
+#include "wstring.c"
+
+strong_alias(__strcat, strcat)
+
+#undef L_strcat
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strchr
+#define Wstrchr __strchr
+
+#include "wstring.c"
+
+strong_alias(__strchr, strchr)
+
+weak_alias(strchr, index)
+
+#undef L_strchr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strchrnul
+#define Wstrchrnul __strchrnul
+
+#include "wstring.c"
+
+strong_alias(__strchrnul, strchrnul)
+
+#undef L_strchrnul
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcmp
+#define Wstrcmp __strcmp
+
+#include "wstring.c"
+
+strong_alias(__strcmp, strcmp)
+
+#ifdef __LOCALE_C_ONLY
+weak_alias(__strcmp, __strcoll)
+strong_alias(__strcoll, strcoll)
+#endif
+
+#undef L_strcmp
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcpy
+#define Wstrcpy __strcpy
+
+#include "wstring.c"
+
+strong_alias(__strcpy, strcpy)
+
+#undef L_strcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcspn
+#define Wstrcspn __strcspn
+
+#include "wstring.c"
+
+strong_alias(__strcspn, strcspn)
+
+#undef L_strcspn
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strdup
+#define Wstrdup __strdup
+
+#undef Wstrlen
+#undef Wstrcpy
+#define Wstrlen __strlen
+#define Wstrcpy __strcpy
+
+#include "wstring.c"
+
+strong_alias(__strdup, strdup)
+
+#undef L_strdup
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strlcpy
+#define Wstrlcpy __strlcpy
+
+#include "wstring.c"
+
+strong_alias(__strlcpy, strlcpy)
+
+#ifdef __LOCALE_C_ONLY
+weak_alias(strlcpy, strxfrm)
+#endif
+
+#undef L_strlcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strlen
+#define Wstrlen __strlen
+
+#include "wstring.c"
+
+strong_alias(__strlen, strlen)
+
+#undef L_strlen
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strncat
+#define Wstrncat __strncat
+
+#include "wstring.c"
+
+strong_alias(__strncat, strncat)
+
+#undef L_strncat
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strncmp
+#define Wstrncmp __strncmp
+
+#include "wstring.c"
+
+strong_alias(__strncmp, strncmp)
+
+#undef L_strncmp
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strncpy
+#define Wstrncpy __strncpy
+
+#include "wstring.c"
+
+strong_alias(__strncpy, strncpy)
+
+#undef L_strncpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strnlen
+#define Wstrnlen __strnlen
+
+#include "wstring.c"
+
+strong_alias(__strnlen, strnlen)
+
+#undef L_strnlen
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strpbrk
+#define Wstrpbrk __strpbrk
+
+#include "wstring.c"
+
+strong_alias(__strpbrk, strpbrk)
+
+#undef L_strpbrk
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strrchr
+#define Wstrrchr __strrchr
+
+#include "wstring.c"
+
+strong_alias(__strrchr, strrchr)
+
+weak_alias(strrchr, rindex)
+
+#undef L_strrchr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strspn
+#define Wstrspn __strspn
+
+#include "wstring.c"
+
+strong_alias(__strspn, strspn)
+
+#undef L_strspn
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strstr
+#define Wstrstr __strstr
+
+#include "wstring.c"
+
+strong_alias(__strstr, strstr)
+
+#undef L_strstr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strtok_r
+#define Wstrtok_r __strtok_r
+
+#undef Wstrspn
+#define Wstrspn __strspn
+#undef Wstrpbrk
+#define Wstrpbrk __strpbrk
+
+#include "wstring.c"
+
+strong_alias(__strtok_r, strtok_r)
+
+#undef L_strtok_r
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_stpcpy
+#define WANT_WIDE
+#define Wstpcpy __wcpcpy
+
+#include "wstring.c"
+
+strong_alias(__wcpcpy, wcpcpy)
+
+#undef L_stpcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_stpncpy
+#define WANT_WIDE
+#define Wstpncpy __wcpncpy
+
+#include "wstring.c"
+
+strong_alias(__wcpncpy, wcpncpy)
+
+#undef L_stpncpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcat
+#define WANT_WIDE
+#define Wstrcat __wcscat
+
+#include "wstring.c"
+
+strong_alias(__wcscat, wcscat)
+
+#undef L_strcat
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strchr
+#define WANT_WIDE
+#define Wstrchr __wcschr
+
+#include "wstring.c"
+
+strong_alias(__wcschr, wcschr)
+
+#undef L_strchr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strchrnul
+#define WANT_WIDE
+#define Wstrchrnul __wcschrnul
+
+#include "wstring.c"
+
+strong_alias(__wcschrnul, wcschrnul)
+
+#undef L_strchrnul
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcmp
+#define WANT_WIDE
+#define Wstrcmp __wcscmp
+
+#include "wstring.c"
+
+strong_alias(__wcscmp, wcscmp)
+
+#ifdef __LOCALE_C_ONLY
+weak_alias(__wcscmp, __wcscoll)
+strong_alias(__wcscoll, wcscoll)
+#endif
+
+#undef L_strcmp
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcpy
+#define WANT_WIDE
+#define Wstrcpy __wcscpy
+
+#include "wstring.c"
+
+strong_alias(__wcscpy, wcscpy)
+
+#undef L_strcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strcspn
+#define WANT_WIDE
+#define Wstrcspn __wcscspn
+
+#include "wstring.c"
+
+strong_alias(__wcscspn, wcscspn)
+
+#undef L_strcspn
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strdup
+#define WANT_WIDE
+#define Wstrdup __wcsdup
+
+#undef Wstrlen
+#undef Wstrcpy
+#define Wstrlen __wcslen
+#define Wstrcpy __wcscpy
+
+#include "wstring.c"
+
+strong_alias(__wcsdup, wcsdup)
+
+#undef L_strdup
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strlcpy
+#define WANT_WIDE
+#define Wstrlcpy __wcslcpy
+
+#include "wstring.c"
+
+#ifdef __LOCALE_C_ONLY
+weak_alias(__wcslcpy, wcsxfrm)
+#endif
+
+#undef L_strlcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strlen
+#define WANT_WIDE
+#define Wstrlen __wcslen
+
+#include "wstring.c"
+
+strong_alias(__wcslen, wcslen)
+
+#undef L_strlen
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strncat
+#define WANT_WIDE
+#define Wstrncat __wcsncat
+
+#include "wstring.c"
+
+strong_alias(__wcsncat, wcsncat)
+
+#undef L_strncat
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strncmp
+#define WANT_WIDE
+#define Wstrncmp __wcsncmp
+
+#include "wstring.c"
+
+strong_alias(__wcsncmp, wcsncmp)
+
+#undef L_strncmp
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strncpy
+#define WANT_WIDE
+#define Wstrncpy __wcsncpy
+
+#include "wstring.c"
+
+strong_alias(__wcsncpy, wcsncpy)
+
+#undef L_strncpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strnlen
+#define WANT_WIDE
+#define Wstrnlen __wcsnlen
+
+#include "wstring.c"
+
+strong_alias(__wcsnlen, wcsnlen)
+
+#undef L_strnlen
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strpbrk
+#define WANT_WIDE
+#define Wstrpbrk __wcspbrk
+
+#include "wstring.c"
+
+strong_alias(__wcspbrk, wcspbrk)
+
+#undef L_strpbrk
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strrchr
+#define WANT_WIDE
+#define Wstrrchr __wcsrchr
+
+#include "wstring.c"
+
+strong_alias(__wcsrchr, wcsrchr)
+
+#undef L_strrchr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strspn
+#define WANT_WIDE
+#define Wstrspn __wcsspn
+
+#include "wstring.c"
+
+strong_alias(__wcsspn, wcsspn)
+
+#undef L_strspn
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strstr
+#define WANT_WIDE
+#define Wstrstr __wcsstr
+
+#include "wstring.c"
+
+strong_alias(__wcsstr, wcsstr)
+
+weak_alias(wcsstr, wcswcs)
+
+#undef L_strstr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_strtok_r
+#define WANT_WIDE
+#define Wstrtok_r __wcstok
+
+#undef Wstrspn
+#define Wstrspn __wcsspn
+#undef Wstrpbrk
+#define Wstrpbrk __wcspbrk
+
+#include "wstring.c"
+
+strong_alias(__wcstok, wcstok)
+
+#undef L_strtok_r
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memchr
+#define WANT_WIDE
+#define Wmemchr __wmemchr
+
+#include "wstring.c"
+
+strong_alias(__wmemchr, wmemchr)
+
+#undef L_memchr
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memcmp
+#define WANT_WIDE
+#define Wmemcmp __wmemcmp
+
+#include "wstring.c"
+
+strong_alias(__wmemcmp, wmemcmp)
+
+#undef L_memcmp
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memcpy
+#define WANT_WIDE
+#define Wmemcpy __wmemcpy
+
+#include "wstring.c"
+
+strong_alias(__wmemcpy, wmemcpy)
+
+#undef L_memcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memmove
+#define WANT_WIDE
+#define Wmemmove __wmemmove
+
+#include "wstring.c"
+
+strong_alias(__wmemmove, wmemmove)
+
+#undef L_memmove
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_mempcpy
+#define WANT_WIDE
+#define Wmempcpy __wmempcpy
+
+#include "wstring.c"
+
+strong_alias(__wmempcpy, wmempcpy)
+
+#undef L_mempcpy
--- /dev/null
+/*
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#define L_memset
+#define WANT_WIDE
+#define Wmemset __wmemset
+
+#include "wstring.c"
+
+strong_alias(__wmemset, wmemset)
+
+#undef L_memset
-/* Copyright (C) 2002 Manuel Novoa III
+/*
+ * Copyright (C) 2002 Manuel Novoa III
+ * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
/* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
#endif
/**********************************************************************/
+#if 0
#ifdef L_wmemcpy
#define L_memcpy
#define Wmemcpy wmemcpy
#else
#define Wmemcpy memcpy
#endif
+#endif
#ifdef L_memcpy
-Wvoid *Wmemcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
+#ifndef WANT_WIDE
+#undef memcpy
+#else
+#undef wmemcpy
+#endif
+Wvoid attribute_hidden *Wmemcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
{
register Wchar *r1 = s1;
register const Wchar *r2 = s2;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wmemmove
#define L_memmove
#define Wmemmove wmemmove
#else
#define Wmemmove memmove
#endif
+#endif
#ifdef L_memmove
-Wvoid *Wmemmove(Wvoid *s1, const Wvoid *s2, size_t n)
+#ifndef WANT_WIDE
+#undef memmove
+#else
+#undef wmemmove
+#endif
+Wvoid attribute_hidden *Wmemmove(Wvoid *s1, const Wvoid *s2, size_t n)
{
#ifdef __BCC__
register Wchar *s = (Wchar *) s1;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcscpy
#define L_strcpy
#define Wstrcpy wcscpy
#else
#define Wstrcpy strcpy
#endif
+#endif
#ifdef L_strcpy
-Wchar *Wstrcpy(Wchar * __restrict s1, const Wchar * __restrict s2)
+#ifndef WANT_WIDE
+#undef strcpy
+#else
+#undef wcscpy
+#endif
+Wchar attribute_hidden *Wstrcpy(Wchar * __restrict s1, const Wchar * __restrict s2)
{
register Wchar *s = s1;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsncpy
#define L_strncpy
#define Wstrncpy wcsncpy
#else
#define Wstrncpy strncpy
#endif
+#endif
#ifdef L_strncpy
-Wchar *Wstrncpy(Wchar * __restrict s1, register const Wchar * __restrict s2,
+#ifndef WANT_WIDE
+#undef strncpy
+#else
+#undef wcsncpy
+#endif
+Wchar attribute_hidden *Wstrncpy(Wchar * __restrict s1, register const Wchar * __restrict s2,
size_t n)
{
register Wchar *s = s1;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcscat
#define L_strcat
#define Wstrcat wcscat
#else
#define Wstrcat strcat
#endif
+#endif
#ifdef L_strcat
-Wchar *Wstrcat(Wchar * __restrict s1, register const Wchar * __restrict s2)
+#ifndef WANT_WIDE
+#undef strcat
+#else
+#undef wcscat
+#endif
+Wchar attribute_hidden *Wstrcat(Wchar * __restrict s1, register const Wchar * __restrict s2)
{
register Wchar *s = s1;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsncat
#define L_strncat
#define Wstrncat wcsncat
#else
#define Wstrncat strncat
#endif
+#endif
#ifdef L_strncat
-Wchar *Wstrncat(Wchar * __restrict s1, register const Wchar * __restrict s2,
+#ifndef WANT_WIDE
+#undef strncat
+#else
+#undef wcsncat
+#endif
+Wchar attribute_hidden *Wstrncat(Wchar * __restrict s1, register const Wchar * __restrict s2,
size_t n)
{
register Wchar *s = s1;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wmemcmp
#define L_memcmp
#define Wmemcmp wmemcmp
#else
#define Wmemcmp memcmp
#endif
+#endif
#ifdef L_memcmp
-int Wmemcmp(const Wvoid *s1, const Wvoid *s2, size_t n)
+#ifndef WANT_WIDE
+#undef memcmp
+#else
+#undef wmemcmp
+#endif
+int attribute_hidden Wmemcmp(const Wvoid *s1, const Wvoid *s2, size_t n)
{
register const Wuchar *r1 = (const Wuchar *) s1;
register const Wuchar *r2 = (const Wuchar *) s2;
#endif
}
-#ifndef L_wmemcmp
-weak_alias(memcmp,bcmp);
+#if 0 /* ndef L_wmemcmp */
+weak_alias(memcmp, bcmp)
#endif
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcscmp
#define L_strcmp
#define Wstrcmp wcscmp
#else
#define Wstrcmp strcmp
#endif
+#endif
#ifdef L_strcmp
-int Wstrcmp(register const Wchar *s1, register const Wchar *s2)
+#ifndef WANT_WIDE
+#undef strcmp
+#else
+#undef wcscmp
+#endif
+int attribute_hidden Wstrcmp(register const Wchar *s1, register const Wchar *s2)
{
#ifdef WANT_WIDE
while (*((Wuchar *)s1) == *((Wuchar *)s2)) {
#endif
}
-#ifdef __LOCALE_C_ONLY
+#if 0 /* def __LOCALE_C_ONLY */
#ifdef L_wcscmp
-weak_alias(wcscmp,wcscoll);
+weak_alias(wcscmp, wcscoll)
#else /* L_wcscmp */
-weak_alias(strcmp,strcoll);
+weak_alias(strcmp, strcoll)
#endif /* L_wcscmp */
#endif /* __LOCALE_C_ONLY */
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsncmp
#define L_strncmp
#define Wstrncmp wcsncmp
#else
#define Wstrncmp strncmp
#endif
+#endif
#ifdef L_strncmp
-int Wstrncmp(register const Wchar *s1, register const Wchar *s2, size_t n)
+#ifndef WANT_WIDE
+#undef strncmp
+#else
+#undef wcsncmp
+#endif
+int attribute_hidden Wstrncmp(register const Wchar *s1, register const Wchar *s2, size_t n)
{
#ifdef WANT_WIDE
while (n && (*((Wuchar *)s1) == *((Wuchar *)s2))) {
#endif
/**********************************************************************/
+#if 0
#ifdef L_wmemchr
#define L_memchr
#define Wmemchr wmemchr
#else
#define Wmemchr memchr
#endif
+#endif
#ifdef L_memchr
-Wvoid *Wmemchr(const Wvoid *s, Wint c, size_t n)
+#ifndef WANT_WIDE
+#undef memchr
+#else
+#undef wmemchr
+#endif
+Wvoid attribute_hidden *Wmemchr(const Wvoid *s, Wint c, size_t n)
{
register const Wuchar *r = (const Wuchar *) s;
#ifdef __BCC__
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcschr
#define L_strchr
#define Wstrchr wcschr
#else
#define Wstrchr strchr
#endif
+#endif
#ifdef L_strchr
-Wchar *Wstrchr(register const Wchar *s, Wint c)
+#ifndef WANT_WIDE
+#undef strchr
+#else
+#undef wcschr
+#endif
+Wchar attribute_hidden *Wstrchr(register const Wchar *s, Wint c)
{
do {
if (*s == ((Wchar)c)) {
return NULL;
}
-#ifndef L_wcschr
-weak_alias(strchr,index);
+#if 0 /* ndef L_wcschr */
+weak_alias(strchr, index)
#endif
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcscspn
#define L_strcspn
#define Wstrcspn wcscspn
#else
#define Wstrcspn strcspn
#endif
+#endif
#ifdef L_strcspn
-size_t Wstrcspn(const Wchar *s1, const Wchar *s2)
+#ifndef WANT_WIDE
+#undef strcspn
+#else
+#undef wcscspn
+#endif
+size_t attribute_hidden Wstrcspn(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s;
register const Wchar *p;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcspbrk
#define L_strpbrk
#define Wstrpbrk wcspbrk
#else
#define Wstrpbrk strpbrk
#endif
+#endif
#ifdef L_strpbrk
-Wchar *Wstrpbrk(const Wchar *s1, const Wchar *s2)
+#ifndef WANT_WIDE
+#undef strpbrk
+#else
+#undef wcspbrk
+#endif
+Wchar attribute_hidden *Wstrpbrk(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s;
register const Wchar *p;
}
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsrchr
#define L_strrchr
#define Wstrrchr wcsrchr
#else
#define Wstrrchr strrchr
#endif
+#endif
#ifdef L_strrchr
-Wchar *Wstrrchr(register const Wchar *s, Wint c)
+#ifndef WANT_WIDE
+#undef strrchr
+#else
+#undef wcsrchr
+#endif
+Wchar attribute_hidden *Wstrrchr(register const Wchar *s, Wint c)
{
register const Wchar *p;
return (Wchar *) p; /* silence the warning */
}
-#ifndef L_wcsrchr
-weak_alias(strrchr,rindex);
+#if 0 /* ndef L_wcsrchr */
+weak_alias(strrchr, rindex)
#endif
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsspn
#define L_strspn
#define Wstrspn wcsspn
#else
#define Wstrspn strspn
#endif
+#endif
#ifdef L_strspn
-size_t Wstrspn(const Wchar *s1, const Wchar *s2)
+#ifndef WANT_WIDE
+#undef strspn
+#else
+#undef wcsspn
+#endif
+size_t attribute_hidden Wstrspn(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s = s1;
register const Wchar *p = s2;
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsstr
#define L_strstr
#define Wstrstr wcsstr
#else
#define Wstrstr strstr
#endif
+#endif
#ifdef L_strstr
/* NOTE: This is the simple-minded O(len(s1) * len(s2)) worst-case approach. */
-Wchar *Wstrstr(const Wchar *s1, const Wchar *s2)
+#ifndef WANT_WIDE
+#undef strstr
+#else
+#undef wcsstr
+#endif
+Wchar attribute_hidden *Wstrstr(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s = s1;
register const Wchar *p = s2;
} while (1);
}
-#ifdef L_wcsstr
-weak_alias(wcsstr,wcswcs);
+#if 0 /* def L_wcsstr */
+weak_alias(wcsstr, wcswcs)
#endif
#endif
/**********************************************************************/
+#if 0
#undef Wstrspn
#undef Wstrpbrk
#define Wstrspn strspn
#define Wstrpbrk strpbrk
#endif
+#endif
#ifdef L_strtok_r
-Wchar *Wstrtok_r(Wchar * __restrict s1, const Wchar * __restrict s2,
+#ifndef WANT_WIDE
+#undef strtok_r
+#else
+#undef wcstok
+#endif
+Wchar attribute_hidden *Wstrtok_r(Wchar * __restrict s1, const Wchar * __restrict s2,
Wchar ** __restrict next_start)
{
register Wchar *s;
#endif
}
-#ifndef L_wcstok
-weak_alias(__strtok_r,strtok_r);
+#if 0 /* ndef L_wcstok */
+weak_alias(__strtok_r, strtok_r)
#endif
#endif
#endif
/**********************************************************************/
+#if 0
#ifdef L_wmemset
#define L_memset
#define Wmemset wmemset
#else
#define Wmemset memset
#endif
+#endif
#ifdef L_memset
-Wvoid *Wmemset(Wvoid *s, Wint c, size_t n)
+#ifndef WANT_WIDE
+#undef memset
+#else
+#undef wmemset
+#endif
+Wvoid attribute_hidden *Wmemset(Wvoid *s, Wint c, size_t n)
{
register Wuchar *p = (Wuchar *) s;
#ifdef __BCC__
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcslen
#define L_strlen
#define Wstrlen wcslen
#else
#define Wstrlen strlen
#endif
+#endif
#ifdef L_strlen
-size_t Wstrlen(const Wchar *s)
+#ifndef WANT_WIDE
+#undef strlen
+#else
+#undef wcslen
+#endif
+size_t attribute_hidden Wstrlen(const Wchar *s)
{
register const Wchar *p;
/**********************************************************************/
#ifdef L_ffs
-int ffs(int i)
+#undef ffs
+int attribute_hidden __ffs(int i)
{
#if 1
/* inlined binary search method */
#endif
}
+strong_alias(__ffs, ffs)
+
#endif
/**********************************************************************/
#if defined(L_strcasecmp) || defined(L_strcasecmp_l) || defined(L_wcscasecmp) || defined(L_wcscasecmp_l)
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcsnlen
#define L_strnlen
#define Wstrnlen wcsnlen
#else
#define Wstrnlen strnlen
#endif
+#endif
#ifdef L_strnlen
-size_t Wstrnlen(const Wchar *s, size_t max)
+#ifndef WANT_WIDE
+#undef strnlen
+#else
+#undef wcsnlen
+#endif
+size_t attribute_hidden Wstrnlen(const Wchar *s, size_t max)
{
register const Wchar *p = s;
#ifdef __BCC__
#ifdef L_memccpy
-void *memccpy(void * __restrict s1, const void * __restrict s2, int c, size_t n)
+#undef memccpy
+void attribute_hidden *__memccpy(void * __restrict s1, const void * __restrict s2, int c, size_t n)
{
register char *r1 = s1;
register const char *r2 = s2;
return (n == (size_t) -1) ? NULL : r1;
}
+strong_alias(__memccpy, memccpy)
+
#endif
/**********************************************************************/
+#if 0
#undef Wstrlen
#undef Wstrcpy
#define Wstrlen strlen
#define Wstrcpy strcpy
#endif
+#endif
#ifdef L_strdup
-Wchar *Wstrdup(register const Wchar *s1)
+#ifndef WANT_WIDE
+#undef strdup
+#else
+#undef wcsdup
+#endif
+Wchar attribute_hidden *Wstrdup(register const Wchar *s1)
{
register Wchar *s;
/**********************************************************************/
#ifdef L_strerror
-char *strerror(int errnum)
+#undef strerror
+char attribute_hidden *__strerror(int errnum)
{
static char buf[_STRERROR_BUFSIZE];
return buf;
}
+strong_alias(__strerror, strerror)
+
#endif
/**********************************************************************/
/* SUSv3 functions. */
return strerrbuf;
}
-weak_alias(__glibc_strerror_r,__strerror_r);
+weak_alias(__glibc_strerror_r, __strerror_r)
#endif
/**********************************************************************/
#ifdef L_memmem
-void *memmem(const void *haystack, size_t haystacklen,
+#undef memmem
+void attribute_hidden *__memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen)
{
register const char *ph;
return NULL;
}
+strong_alias(__memmem, memmem)
+
#endif
/**********************************************************************/
+#if 0
#ifdef L_wmempcpy
#define L_mempcpy
#define Wmempcpy wmempcpy
#else
#define Wmempcpy __mempcpy
#endif
+#endif
#ifdef L_mempcpy
-Wvoid *Wmempcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
+#ifndef WANT_WIDE
+#undef mempcpy
+#else
+#undef wmempcpy
+#endif
+Wvoid attribute_hidden *Wmempcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
{
register Wchar *r1 = s1;
register const Wchar *r2 = s2;
return r1;
}
-#ifndef L_wmempcpy
-weak_alias(__mempcpy,mempcpy);
+#if 0 /* ndef L_wmempcpy */
+weak_alias(__mempcpy, mempcpy)
#endif
#endif
/**********************************************************************/
#ifdef L_memrchr
-void *memrchr(const void *s, int c, size_t n)
+#undef memrchr
+void attribute_hidden *__memrchr(const void *s, int c, size_t n)
{
register const unsigned char *r;
#ifdef __BCC__
}
#undef np
+strong_alias(__memrchr, memrchr)
+
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcpcpy
#define L_stpcpy
#define Wstpcpy wcpcpy
#else
#define Wstpcpy stpcpy
#endif
+#endif
#ifdef L_stpcpy
-Wchar *Wstpcpy(register Wchar * __restrict s1, const Wchar * __restrict s2)
+#ifndef WANT_WIDE
+#undef stpcpy
+#else
+#undef wcpcpy
+#endif
+Wchar attribute_hidden *Wstpcpy(register Wchar * __restrict s1, const Wchar * __restrict s2)
{
#ifdef __BCC__
do {
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcpncpy
#define L_stpncpy
#define Wstpncpy wcpncpy
#else
#define Wstpncpy stpncpy
#endif
+#endif
#ifdef L_stpncpy
-Wchar *Wstpncpy(register Wchar * __restrict s1,
+#ifndef WANT_WIDE
+#undef stpncpy
+#else
+#undef wcpncpy
+#endif
+Wchar attribute_hidden *Wstpncpy(register Wchar * __restrict s1,
register const Wchar * __restrict s2,
size_t n)
{
/**********************************************************************/
#ifdef L_bzero
-void __bzero(void *s, size_t n)
+#undef bzero
+void attribute_hidden __bzero(void *s, size_t n)
{
#if 1
(void)memset(s, 0, n);
}
#endif
}
-weak_alias(__bzero,bzero);
+#if 0
+weak_alias(__bzero, bzero)
+#else
+strong_alias(__bzero, bzero)
+#endif
#undef np
#endif
/**********************************************************************/
#ifdef L_bcopy
-void bcopy(const void *s2, void *s1, size_t n)
+#undef bcopy
+void attribute_hidden __bcopy(const void *s2, void *s1, size_t n)
{
#if 1
memmove(s1, s2, n);
#endif
}
+strong_alias(__bcopy, bcopy)
+
#endif
/**********************************************************************/
#ifdef L_strcasestr
-char *strcasestr(const char *s1, const char *s2)
+#undef strcasestr
+char attribute_hidden *__strcasestr(const char *s1, const char *s2)
{
register const char *s = s1;
register const char *p = s2;
#endif
}
+strong_alias(__strcasestr, strcasestr)
+
#endif
/**********************************************************************/
#ifdef L_strndup
-char *strndup(register const char *s1, size_t n)
+#undef strndup
+char attribute_hidden *__strndup(register const char *s1, size_t n)
{
register char *s;
return s;
}
+strong_alias(__strndup, strndup)
+
#endif
/**********************************************************************/
#ifdef L_strsep
-char *strsep(char ** __restrict s1, const char * __restrict s2)
+#undef strsep
+char attribute_hidden *__strsep(char ** __restrict s1, const char * __restrict s2)
{
register char *s = *s1;
register char *p;
return s;
}
+strong_alias(__strsep, strsep)
+
#endif
/**********************************************************************/
+#if 0
#ifdef L_wcschrnul
#define L_strchrnul
#define __Wstrchrnul __wcschrnul
#define __Wstrchrnul __strchrnul
#define Wstrchrnul strchrnul
#endif
+#endif
#ifdef L_strchrnul
-Wchar *__Wstrchrnul(register const Wchar *s, Wint c)
+#ifndef WANT_WIDE
+#undef strchrnul
+#else
+#undef wcschrnul
+#endif
+Wchar attribute_hidden *Wstrchrnul(register const Wchar *s, Wint c)
{
--s;
while (*++s && (*s != ((Wchar)c)));
return (Wchar *) s;
}
-weak_alias(__Wstrchrnul, Wstrchrnul);
+#if 0
+weak_alias(__Wstrchrnul, Wstrchrnul)
+#endif
#endif
/**********************************************************************/
#ifdef L_rawmemchr
-void *rawmemchr(const void *s, int c)
+#undef rawmemchr
+void attribute_hidden *__rawmemchr(const void *s, int c)
{
register const unsigned char *r = s;
return (void *) r; /* silence the warning */
}
+strong_alias(__rawmemchr, rawmemchr)
+
#endif
/**********************************************************************/
#ifdef L_basename
-char *basename(const char *path)
+#undef basename
+char attribute_hidden *__basename(const char *path)
{
register const char *s;
register const char *p;
return (char *) p;
}
+strong_alias(__basename, basename)
+
#endif
/**********************************************************************/
#ifdef L___xpg_basename
#endif
/**********************************************************************/
+#if 0
#ifdef WANT_WIDE
extern size_t __wcslcpy(wchar_t *__restrict dst,
const wchar_t *__restrict src,
#ifdef L___wcslcpy
#define L_strlcpy
#define Wstrlcpy __wcslcpy
+#else
+#define Wstrlcpy strlcpy
+#endif
#endif
#ifdef L_strlcpy
-#ifndef L___wcslcpy
-#define Wstrlcpy strlcpy
-#endif
-
/* OpenBSD function:
* Copy at most n-1 chars from src to dst and nul-terminate dst.
* Returns strlen(src), so truncation occurred if the return value is >= n. */
-size_t Wstrlcpy(register Wchar *__restrict dst,
+#ifndef WANT_WIDE
+#undef strlcpy
+#else
+#undef wcslcpy
+#endif
+size_t attribute_hidden Wstrlcpy(register Wchar *__restrict dst,
register const Wchar *__restrict src,
size_t n)
{
return src - src0;
}
-#ifdef __LOCALE_C_ONLY
+#if 0 /* def __LOCALE_C_ONLY */
#ifdef L___wcslcpy
weak_alias(__wcslcpy,wcsxfrm);
#else
/* TODO: make a threadsafe version? */
+#undef strsignal
#ifdef __UCLIBC_HAS_SIGNUM_MESSAGES__
#if defined(__alpha__) || defined(__mips__) || defined(__hppa__) || defined(__sparc__)
};
#endif
-char *strsignal(int signum)
+char attribute_hidden *__strsignal(int signum)
{
register char *s;
int i;
#else /* __UCLIBC_HAS_SIGNUM_MESSAGES__ */
-char *strsignal(int signum)
+char attribute_hidden *__strsignal(int signum)
{
static char buf[_STRSIGNAL_BUFSIZE];
static const char unknown[] = {
#endif /* __UCLIBC_HAS_SIGNUM_MESSAGES__ */
+strong_alias(__strsignal, strsignal)
+
#endif
/**********************************************************************/
#ifdef L_psignal
int wcscoll (const Wchar *s0, const Wchar *s1)
{
- return __wcscoll_l(s0, s1, __UCLIBC_CURLOCALE );
+ return wcscoll_l(s0, s1, __UCLIBC_CURLOCALE );
}
size_t wcsxfrm(Wchar *__restrict ws1, const Wchar *__restrict ws2, size_t n)
{
- return __wcsxfrm_l(ws1, ws2, n, __UCLIBC_CURLOCALE );
+ return wcsxfrm_l(ws1, ws2, n, __UCLIBC_CURLOCALE );
}
#else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
int pass;
if (!CUR_COLLATE->num_weights) { /* C locale */
- return __wcslcpy(ws1, ws2, n);
+ return wcslcpy(ws1, ws2, n);
}
#ifdef __UCLIBC_MJN3_ONLY__