home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / ipsearch-1.0.tar.gz / ipsearch-1.0.tar / ipsearch-1.0 / lbl / gnuc.h
C/C++ Source or Header  |  2011-07-06  |  830b  |  52 lines

  1. /* @(#) $Id: gnuc.h 4 2011-07-06 22:22:18Z leres $ (LBL) */
  2.  
  3. /* Define __P() macro, if necessary */
  4. #ifndef __P
  5. #if __STDC__
  6. #define __P(protos) protos
  7. #else
  8. #define __P(protos) ()
  9. #endif
  10. #endif
  11.  
  12. /* inline foo */
  13. #ifndef inline
  14. #ifdef __GNUC__
  15. #define inline __inline
  16. #else
  17. #define inline
  18. #endif
  19. #endif
  20.  
  21. /*
  22.  * Handle new and old "dead" routine prototypes
  23.  *
  24.  * For example:
  25.  *
  26.  *    __dead void foo(void) __attribute__((noreturn));
  27.  *
  28.  */
  29. #ifdef __GNUC__
  30. #ifndef __dead
  31. #if __GNUC__ >= 4
  32. #define __dead
  33. #define noreturn __noreturn__
  34. #else
  35. #define __dead volatile
  36. #define noreturn volatile
  37. #endif
  38. #endif
  39. #if __GNUC__ < 2  || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
  40. #ifndef __attribute__
  41. #define __attribute__(args)
  42. #endif
  43. #endif
  44. #else
  45. #ifndef __dead
  46. #define __dead
  47. #endif
  48. #ifndef __attribute__
  49. #define __attribute__(args)
  50. #endif
  51. #endif
  52.