VirtualBox

Changeset 39826 in vbox


Ignore:
Timestamp:
Jan 22, 2012 11:12:24 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75830
Message:

Runtume/linux: build linux-3.3.0-rc1 (please review).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/types.h

    r39138 r39826  
    110110#   endif
    111111#  endif
     112#  if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) \
     113    || !defined(__cplusplus) \
     114    || !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) \
     115    || !defined(CONFIG_OPTIMIZE_INLINING)
     116   /* compiler-gcc.h redefines inline macrodefenitions when CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING and CONFIG_OPTIMIZED_INLINING
     117    * are defined appeding __attribute__((no_instrument_function)) which isn't supported by g++. inline used in linux/posix_types.h that
     118    * why we need include linux/type.h after compiler-gcc.h
     119    */
    112120#  include <linux/types.h>
     121#  endif
    113122#  include <linux/stddef.h>
    114123#  undef uintptr_t
     
    124133#    define __inline__ __inline__
    125134#   endif
     135#  if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) \
     136    && defined(__cplusplus) \
     137    && defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) \
     138    && defined(CONFIG_OPTIMIZE_INLINING)
     139    /*
     140     * <linux/compiler-gcc.h> does when CONFIG_OPTIMIZE_INLINING and CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING
     141     * are defined and affects VBox c++ sources,
     142     *
     143     * define inline            inline          notrace
     144     * define __inline__        __inline__      notrace
     145     * define __inline          __inline        notrace
     146     *
     147     * upper in <linux/compiler-gcc.h>
     148     * #define notrace __attribute__((no_instrument_function))
     149     */
     150#   undef inline
     151#   define inline inline
     152#   undef __inline__
     153#   define __inline__ __inline__
     154#   undef __inline
     155#  define __inline __inline
     156#  undef __always_inline
     157#  define __always_inline __attribute__((always_inline))
     158#  include <linux/types.h>
     159#  endif /* KERNEL_VERSION(3.3.0)< */
    126160#  endif
    127161#  undef false
Note: See TracChangeset for help on using the changeset viewer.

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