VirtualBox

Changeset 3092 in vbox


Ignore:
Timestamp:
Jun 11, 2007 2:37:02 PM (18 years ago)
Author:
vboxsync
Message:

Work in the linux kernel env. too.

File:
1 edited

Legend:

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

    r2981 r3092  
    2727 * specific #ifdefs. But for now we'll just include the headers
    2828 * which normally contains the alloca() prototype.
     29 * When we're in kernel territory it starts getting a bit more
     30 * interesting of course...
    2931 */
    30 #include <stdlib.h>
    31 #if !defined(__DARWIN__) && !defined(__FREEBSD__)
    32 # include <malloc.h>
     32#if defined(IN_RING0) && defined(__LINUX__)
     33/* ASSUMES GNU C */
     34# define alloca(cb) __builtin_alloca(cb)
     35#else
     36# include <stdlib.h>
     37# if !defined(__DARWIN__) && !defined(__FREEBSD__)
     38#  include <malloc.h>
     39# endif
     40# ifdef __SOLARIS__
     41#  include <alloca.h>
     42# endif
    3343#endif
    34 #ifdef __SOLARIS__
    35 # include <alloca.h>
    36 #endif
    37 
    3844
    3945#endif
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