* terms and conditions of either the GPL or the CDDL or both.
 */


/*******************************************************************************
*   Header Files                                                               *
*******************************************************************************/
#include <iprt/nocrt/string.h>
#undef strlen

#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
# ifndef __MINGW32__
#  pragma weak strlen
# endif

/* No alias support here (yet in the ming case). */
extern size_t (strlen)(const char *psz)
{
    return RT_NOCRT(strlen)(psz);
}

#elif __GNUC__ >= 4
/* create a weak alias. */
__asm__(".weak strlen\t\n"
        " .set strlen," RT_NOCRT_STR(strlen) "\t\n");
#else
/* create a weak alias. */
extern __typeof(RT_NOCRT(strlen)) strlen __attribute__((weak, alias(RT_NOCRT_STR(strlen))));
#endif

 * terms and conditions of either the GPL or the CDDL or both.
 */


/*******************************************************************************
*   Header Files                                                               *
*******************************************************************************/
#include <iprt/nocrt/string.h>
#undef memset

#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
# ifndef __MINGW32__
#  pragma weak memset
# endif

/* No alias support here (yet in the ming case). */
extern void *(memset)(void *pvDst, int ch, size_t cb)
{
    return RT_NOCRT(memset)(pvDst, ch, cb);
}

#elif __GNUC__ >= 4
/* create a weak alias. */
__asm__(".weak memset\t\n"
        " .set memset," RT_NOCRT_STR(memset) "\t\n");
#else
/* create a weak alias. */
extern __typeof(RT_NOCRT(memset)) memset __attribute__((weak, alias(RT_NOCRT_STR(memset))));
#endif

示例#3
0
 * terms and conditions of either the GPL or the CDDL or both.
 */


/*********************************************************************************************************************************
*   Header Files                                                                                                                 *
*********************************************************************************************************************************/
#include <iprt/nocrt/string.h>
#undef strcmp

#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
# ifndef __MINGW32__
#  pragma weak strcmp
# endif

/* No alias support here (yet in the ming case). */
extern int (strcmp)(const char *psz1, const char *psz2)
{
    return RT_NOCRT(strcmp)(psz1, psz2);
}

#elif __GNUC__ >= 4
/* create a weak alias. */
__asm__(".weak strcmp\t\n"
        " .set strcmp," RT_NOCRT_STR(strcmp) "\t\n");
#else
/* create a weak alias. */
extern __typeof(RT_NOCRT(strcmp)) strcmp __attribute__((weak, alias(RT_NOCRT_STR(strcmp))));
#endif

示例#4
0
 * terms and conditions of either the GPL or the CDDL or both.
 */


/*********************************************************************************************************************************
*   Header Files                                                                                                                 *
*********************************************************************************************************************************/
#include <iprt/nocrt/string.h>
#undef memchr

#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
# ifndef __MINGW32__
#  pragma weak memchr
# endif

/* No alias support here (yet in the ming case). */
extern void *(memchr)(const void *pv, int ch, size_t cb)
{
    return RT_NOCRT(memchr)(pv, ch, cb);
}

#elif __GNUC__ >= 4
/* create a weak alias. */
__asm__(".weak memchr\t\n"
        " .set memchr," RT_NOCRT_STR(memchr) "\t\n");
#else
/* create a weak alias. */
extern __typeof(RT_NOCRT(memchr)) memchr __attribute__((weak, alias(RT_NOCRT_STR(memchr))));
#endif

 * terms and conditions of either the GPL or the CDDL or both.
 */


/*******************************************************************************
*   Header Files                                                               *
*******************************************************************************/
#include <iprt/nocrt/string.h>
#undef memmove

#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
# ifndef __MINGW32__
#  pragma weak memmove
# endif

/* No alias support here (yet in the ming case). */
extern void *(memmove)(void *pvDst, const void *pvSrc, size_t cb)
{
    return RT_NOCRT(memmove)(pvDst, pvSrc, cb);
}

#elif __GNUC__ >= 4
/* create a weak alias. */
__asm__(".weak memmove\t\n"
        " .set memmove," RT_NOCRT_STR(memmove) "\t\n");
#else
/* create a weak alias. */
extern __typeof(RT_NOCRT(memmove)) memmove __attribute__((weak, alias(RT_NOCRT_STR(memmove))));
#endif


/*******************************************************************************
*   Header Files                                                               *
*******************************************************************************/
#include <iprt/nocrt/string.h>
#undef strcpy

#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
# ifndef __MINGW32__
#  pragma weak strcpy
# endif

/* No alias support here (yet in the ming case). */
extern char * (strcpy)(char *psz1, const char *psz2)
{
    return RT_NOCRT(strcpy)(psz1, psz2);
}

#elif __GNUC__ >= 4
/* create a weak alias. */
__asm__(".weak strcpy\t\n"
        " .set strcpy," RT_NOCRT_STR(strcpy) "\t\n"
        ".global strcpy\t\n"
        );
#else
/* create a weak alias. */
extern __typeof(RT_NOCRT(strcpy)) strcpy __attribute__((weak, alias(RT_NOCRT_STR(strcpy))));
#endif