VirtualBox

Changeset 9503 in vbox for trunk/src


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

Reverted 31773.

File:
1 edited

Legend:

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

    r9502 r9503  
    11/* $Id$ */
    22/** @file
    3  * IPRT - No-CRT strlen() alias for gcc.
     3 * IPRT - No-CRT strchr() alias for gcc.
    44 */
    55
    66/*
    7  * Copyright (C) 2006-2008 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2007 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 strlen
     36#undef strchr
    3737
    3838#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
    3939# ifndef __MINGW32__
    40 #  pragma weak strlen
     40#  pragma weak strchr
    4141# endif
    4242
    4343/* No alias support here (yet in the ming case). */
    44 extern char *(strlen)(const char *psz, int ch)
     44extern char *(strchr)(const char *psz, int ch)
    4545{
    46     return RT_NOCRT(strlen)(psz, ch);
     46    return RT_NOCRT(strchr)(psz, ch);
    4747}
    4848
    4949#elif __GNUC__ >= 4
    5050/* create a weak alias. */
    51 __asm__(".weak strlen\t\n"
    52         " .set strlen," RT_NOCRT_STR(strlen) "\t\n");
     51__asm__(".weak strchr\t\n"
     52        " .set strchr," RT_NOCRT_STR(strchr) "\t\n");
    5353#else
    5454/* create a weak alias. */
    55 extern __typeof(RT_NOCRT(strlen)) strlen __attribute__((weak, alias(RT_NOCRT_STR(strlen))));
     55extern __typeof(RT_NOCRT(strchr)) strchr __attribute__((weak, alias(RT_NOCRT_STR(strchr))));
    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