Changeset 23494 for lang/c

Show
Ignore:
Timestamp:
11/13/08 03:14:29 (5 years ago)
Author:
saturday06
Message:

sttic inline

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/c/libintl-msvc/recipes/libintl.h

    r23481 r23494  
    413413 
    414414    /* Wide character support.  */ 
     415    /* XXX inline ! */ 
     416#ifdef _INTL_REDIRECT_INLINE 
     417#define WIDE_LIBINTL_STATIC_INLINE static inline 
     418#elif defined(_MSC_VER) 
     419#define WIDE_LIBINTL_STATIC_INLINE static _inline 
     420#else 
     421#define WIDE_LIBINTL_STATIC_INLINE static 
     422#endif 
     423 
    415424#define wgettext(msgid) wgettext_(msgid, L##msgid) 
    416425#define dwgettext(domainname, msgid) dwgettext_(domainname, msgid, L##msgid) 
     
    420429#define dcnwgettext(domainname, msgid1, msgid2, n, category) dnwgettext_(domainname, msgid1, msgid2, n, L##msgid1,  L##msgid2) 
    421430 
    422     static const wchar_t* wgettext_(const char* msgid, const wchar_t* wmsgid) { 
     431    WIDE_LIBINTL_STATIC_INLINE  
     432    const wchar_t* wgettext_(const char* msgid, const wchar_t* wmsgid) { 
    423433        const char* translated = gettext(msgid); 
    424434        return translated != msgid ? (const wchar_t*)translated : wmsgid; 
    425435    } 
    426436 
    427     static const wchar_t* dwgettext_(const char *domainname, const char* msgid, const wchar_t* wmsgid) { 
     437    WIDE_LIBINTL_STATIC_INLINE  
     438    const wchar_t* dwgettext_(const char *domainname, const char* msgid, const wchar_t* wmsgid) { 
    428439        const char* translated = dgettext(domainname, msgid); 
    429440        return translated != msgid ? (const wchar_t*)translated : wmsgid; 
    430441    } 
    431442 
    432     static const wchar_t* dcwgettext_(const char *domainname, const char* msgid, int category,  const wchar_t* wmsgid) { 
     443    WIDE_LIBINTL_STATIC_INLINE  
     444    const wchar_t* dcwgettext_(const char *domainname, const char* msgid, int category,  const wchar_t* wmsgid) { 
    433445        const char* translated = dcgettext(domainname, msgid, category); 
    434446        return translated != msgid ? (const wchar_t*)translated : wmsgid; 
    435447    } 
    436448 
    437     static const wchar_t* nwgettext_(const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 
     449    WIDE_LIBINTL_STATIC_INLINE  
     450    const wchar_t* nwgettext_(const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 
    438451        const char* translated = ngettext(msgid1, msgid2, n); 
    439452        return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t*)translated); 
    440453    } 
    441454 
    442     static const wchar_t* dnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 
     455    WIDE_LIBINTL_STATIC_INLINE  
     456    const wchar_t* dnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 
    443457        const char* translated = dngettext(domainname, msgid1, msgid2, n); 
    444458        return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t*)translated); 
    445459    } 
    446460 
    447     static const wchar_t* dcnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2, int category) { 
     461    WIDE_LIBINTL_STATIC_INLINE  
     462    const wchar_t* dcnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2, int category) { 
    448463        const char* translated = dcngettext(domainname, msgid1, msgid2, n, category); 
    449464        return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t*)translated); 
     
    471486#define wbindtextdomain windows_wbindtextdomain 
    472487 
    473     static const wchar_t* windows_wbindtextdomain(const char* domainname, const wchar_t* dirname16) { 
     488    WIDE_LIBINTL_STATIC_INLINE  
     489    const wchar_t* windows_wbindtextdomain(const char* domainname, const wchar_t* dirname16) { 
    474490        char* dirname8 = NULL; 
    475491        unsigned int num_elements = 0; 
     
    504520    } 
    505521 
    506     static const char* windows_bindtextdomain(const char* domainname, const char* dirname) { 
     522    WIDE_LIBINTL_STATIC_INLINE  
     523    const char* windows_bindtextdomain(const char* domainname, const char* dirname) { 
    507524        wchar_t* dirname16 = NULL; 
    508525        unsigned int num_elements = 0; 
     
    548565 
    549566#endif /* (defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)) && !defined(__CYGWIN__) */ 
     567#undef WIDE_LIBINTL_STATIC_INLINE  
    550568 
    551569#endif /* libintl.h */