cdecl.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef foocdeclhfoo
  2. #define foocdeclhfoo
  3. /***
  4. This file is part of avahi.
  5. avahi is free software; you can redistribute it and/or modify it
  6. under the terms of the GNU Lesser General Public License as
  7. published by the Free Software Foundation; either version 2.1 of the
  8. License, or (at your option) any later version.
  9. avahi is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
  12. Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with avahi; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  16. USA.
  17. ***/
  18. /** \file cdecl.h C++ compatibility */
  19. #ifdef __cplusplus
  20. /** If using C++ this macro enables C mode, otherwise does nothing */
  21. #define AVAHI_C_DECL_BEGIN extern "C" {
  22. /** If using C++ this macro switches back to C++ mode, otherwise does nothing */
  23. #define AVAHI_C_DECL_END }
  24. #else
  25. /** If using C++ this macro enables C mode, otherwise does nothing */
  26. #define AVAHI_C_DECL_BEGIN
  27. /** If using C++ this macro switches back to C++ mode, otherwise does nothing */
  28. #define AVAHI_C_DECL_END
  29. #endif
  30. #endif