defs.h 979 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* $Id$
  2. *
  3. * Copyright 2001-2003, Meiosys (www.meiosys.com). All rights reserved.
  4. *
  5. * See the COPYING file for the terms of usage and distribution.
  6. */
  7. #ifndef __log4c_defs_h
  8. #define __log4c_defs_h
  9. /**
  10. * @file defs.h
  11. *
  12. * @brief types and declarations enclosures for C++.
  13. *
  14. **/
  15. #ifdef __cplusplus
  16. # define __LOG4C_BEGIN_DECLS extern "C" {
  17. # define __LOG4C_END_DECLS }
  18. #else
  19. # define __LOG4C_BEGIN_DECLS
  20. # define __LOG4C_END_DECLS
  21. #endif
  22. #define LOG4C_INLINE inline
  23. #define LOG4C_API extern
  24. #define LOG4C_DATA extern
  25. #ifdef __HP_cc
  26. #define inline __inline
  27. #endif
  28. #ifdef _WIN32
  29. # include <log4c/config-win32.h>
  30. #endif
  31. #ifndef GCC_VERSION
  32. #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
  33. #endif /* GCC_VERSION */
  34. #if GCC_VERSION < 2009
  35. #define OLD_VARIADIC_MACRO 1
  36. #endif
  37. /* GNU C attribute feature for public API */
  38. #ifdef __GNUC__
  39. #define LOG4C_ATTRIBUTE(X) __attribute__(X)
  40. #else
  41. #define LOG4C_ATTRIBUTE(X)
  42. #endif
  43. #endif /* __log4c_defs_h */