VirtualBox

Changeset 2437

Show
Ignore:
Timestamp:
04/30/07 17:25:20 (2 years ago)
Author:
vboxsync
Message:

partly fixed my last commit for gcc-3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/iprt/cdefs.h

    r2435 r2437  
    401401# define DECLEXPORT(type)       __declspec(dllexport) type 
    402402#else 
    403 # define DECLEXPORT(type)       __attribute__((visibility("default"))) type 
     403# if __GNUC__ >= 4 
     404#  define DECLEXPORT(type)       __attribute__((visibility("default"))) type 
     405# else 
     406#  define DECLEXPORT(type) 
     407# endif 
    404408#endif 
    405409 
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/prtypes.h

    r2435 r2437  
    179179#else /* Unix */ 
    180180 
    181 #define PR_EXPORT(__type) __attribute__((visibility("default"))) extern __type 
    182 #define PR_EXPORT_DATA(__type) __attribute__((visibility("default"))) extern __type 
    183 #define PR_IMPORT(__type) extern __type 
    184 #define PR_IMPORT_DATA(__type) extern __type 
    185  
    186 #define PR_EXTERN(__type) __attribute__((visibility("default"))) extern __type 
    187 #define PR_IMPLEMENT(__type) __attribute__((visibility("default"))) __type 
    188 #define PR_EXTERN_DATA(__type) __attribute__((visibility("default"))) extern __type 
    189 #define PR_IMPLEMENT_DATA(__type) __attribute__((visibility("default"))) __type 
    190 #define PR_CALLBACK 
    191 #define PR_CALLBACK_DECL 
    192 #define PR_STATIC_CALLBACK(__x) static __x 
    193  
     181# if __GNUC__ >= 4 
     182#  define PR_EXPORT(__type) __attribute__((visibility("default"))) extern __type 
     183#  define PR_EXPORT_DATA(__type) __attribute__((visibility("default"))) extern __type 
     184#  define PR_IMPORT(__type) extern __type 
     185#  define PR_IMPORT_DATA(__type) extern __type 
     186#  define PR_EXTERN(__type) __attribute__((visibility("default"))) extern __type 
     187#  define PR_IMPLEMENT(__type) __attribute__((visibility("default"))) __type 
     188#  define PR_EXTERN_DATA(__type) __attribute__((visibility("default"))) extern __type 
     189#  define PR_IMPLEMENT_DATA(__type) __attribute__((visibility("default"))) __type 
     190#  define PR_CALLBACK 
     191#  define PR_CALLBACK_DECL 
     192#  define PR_STATIC_CALLBACK(__x) static __x 
     193# else 
     194#  define PR_EXPORT(__type) extern __type 
     195#  define PR_EXPORT_DATA(__type) extern __type 
     196#  define PR_IMPORT(__type) extern __type 
     197#  define PR_IMPORT_DATA(__type) extern __type 
     198#  define PR_EXTERN(__type) extern __type 
     199#  define PR_IMPLEMENT(__type) __type 
     200#  define PR_EXTERN_DATA(__type) extern __type 
     201#  define PR_IMPLEMENT_DATA(__type) __type 
     202#  define PR_CALLBACK 
     203#  define PR_CALLBACK_DECL 
     204#  define PR_STATIC_CALLBACK(__x) static __x 
     205# endif 
    194206#endif 
    195207 
  • trunk/src/libs/xpcom18a4/xpcom/base/nscore.h

    r2435 r2437  
    102102#ifdef HAVE_VISIBILITY_ATTRIBUTE 
    103103#define NS_VISIBILITY_HIDDEN   __attribute__ ((visibility ("hidden"))) 
    104 #define NS_VISIBILITY_DEFAULT  __attribute__ ((visibility ("default"))) 
     104# if __GNUC__ >= 4 
     105#  define NS_VISIBILITY_DEFAULT  __attribute__ ((visibility ("default"))) 
     106# else 
     107#  define NS_VISIBILITY_DEFAULT 
     108# endif 
    105109 
    106110#define NS_HIDDEN_(type)   NS_VISIBILITY_HIDDEN type 
     
    179183#else 
    180184 
    181 #define NS_IMPORT 
    182 #define NS_IMPORT_(type) type 
    183 #define NS_EXPORT __attribute__((visibility("default"))) 
    184 #define NS_EXPORT_(type) __attribute__((visibility("default"))) type 
    185 #define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL 
    186 #define NS_IMETHODIMP_(type) type 
    187 #define NS_METHOD_(type) type 
    188 #define NS_CALLBACK_(_type, _name) _type (* _name) 
    189 #define NS_STDCALL 
     185# if __GNUC__ >= 4 
     186#  define NS_IMPORT 
     187#  define NS_IMPORT_(type) type 
     188#  define NS_EXPORT __attribute__((visibility("default"))) 
     189#  define NS_EXPORT_(type) __attribute__((visibility("default"))) type 
     190#  define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL 
     191#  define NS_IMETHODIMP_(type) type 
     192#  define NS_METHOD_(type) type 
     193#  define NS_CALLBACK_(_type, _name) _type (* _name) 
     194#  define NS_STDCALL 
     195# else 
     196#  define NS_IMPORT 
     197#  define NS_IMPORT_(type) type 
     198#  define NS_EXPORT 
     199#  define NS_EXPORT_(type) type 
     200#  define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL 
     201#  define NS_IMETHODIMP_(type) type 
     202#  define NS_METHOD_(type) type 
     203#  define NS_CALLBACK_(_type, _name) _type (* _name) 
     204#  define NS_STDCALL 
     205# endif 
    190206#endif 
    191207 
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/public/xptcall.h

    r2435 r2437  
    6161#    define XPTC_EXPORT           __declspec(dllexport) 
    6262#else 
     63#  if __GNUC__ >= 4 
    6364#    define XPTC_EXPORT           __attribute__((visibility("default"))) 
     65#  else 
     66#    define XPTC_EXPORT  
     67#  endif 
    6468#endif 
    6569#else 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy