VirtualBox

Changeset 9504 in vbox


Ignore:
Timestamp:
Jun 8, 2008 3:05:04 AM (17 years ago)
Author:
vboxsync
Message:

modified the right file now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strlen_alias.c

    r9502 r9504  
    11/* $Id$ */
    22/** @file
    3  * IPRT - No-CRT memchr() alias for gcc.
     3 * IPRT - No-CRT strlen() alias for gcc.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3434*******************************************************************************/
    3535#include <iprt/nocrt/string.h>
    36 #undef memchr
     36#undef strlen
    3737
    3838#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
    3939# ifndef __MINGW32__
    40 #  pragma weak memchr
     40#  pragma weak strlen
    4141# endif
    4242
    4343/* No alias support here (yet in the ming case). */
    44 extern void *(memchr)(const void *pv, int ch, size_t cb)
     44extern char *(strlen)(const char *psz, int ch)
    4545{
    46     return RT_NOCRT(memchr)(pv, ch, cb);
     46    return RT_NOCRT(strlen)(psz, ch);
    4747}
    4848
    4949#elif __GNUC__ >= 4
    5050/* create a weak alias. */
    51 __asm__(".weak memchr\t\n"
    52         " .set memchr," RT_NOCRT_STR(memchr) "\t\n");
     51__asm__(".weak strlen\t\n"
     52        " .set strlen," RT_NOCRT_STR(strlen) "\t\n");
    5353#else
    5454/* create a weak alias. */
    55 extern __typeof(RT_NOCRT(memchr)) memchr __attribute__((weak, alias(RT_NOCRT_STR(memchr))));
     55extern __typeof(RT_NOCRT(strlen)) strlen __attribute__((weak, alias(RT_NOCRT_STR(strlen))));
    5656#endif
    5757
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette