Changeset 21916 for trunk/include/odin.h


Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/include/odin.h

    r21597 r21916  
    8181  #endif
    8282  #define CDECL     _cdecl
    83   #define EXPORT    _export
     83  #define EXPORT    __attribute__ ((dllexport))
    8484  #define WIN32API  __stdcall
    8585  #define WINAPI    __stdcall
     
    9393  #ifdef __INNOTEK_LIBC__
    9494  #define SYSTEM    _System
     95  #define _LNK_CONV
    9596  #else
    9697  #define SYSTEM    CDECL
    9798  #endif
     99
     100  #define min(a,b) \
     101    ({ __typeof__ (a) _a = (a); \
     102      __typeof__ (b) _b = (b); \
     103      _a < _b ? _a : _b; })
     104  #define max(a,b) \
     105    ({ __typeof__ (a) _a = (a); \
     106      __typeof__ (b) _b = (b); \
     107      _a > _b ? _a : _b; })
     108
     109  #define _interrupt(n) __asm__ __volatile__ ("int" #n "\n\tnop")
    98110
    99111#else
     
    160172#endif
    161173
    162 
     174#ifdef __GNUC__
     175// __stdcall in GCC for OS/2 incorrectly mangles vararg functions; according to
     176// MSDN, they should be equal to __cdecl instead of getting the @N suffix
     177#define WIN32API_VA __cdecl
     178#else
     179#define WIN32API_VA WIN32API
     180#endif
    163181
    164182#endif /* _ODIN_H_*/
Note: See TracChangeset for help on using the changeset viewer.