MQTTExportDeclarations.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*******************************************************************************
  2. * Copyright (c) 2020, 2020 Andreas Walter
  3. *
  4. * All rights reserved. This program and the accompanying materials
  5. * are made available under the terms of the Eclipse Public License v2.0
  6. * and Eclipse Distribution License v1.0 which accompany this distribution.
  7. *
  8. * The Eclipse Public License is available at
  9. * https://www.eclipse.org/legal/epl-2.0/
  10. * and the Eclipse Distribution License is available at
  11. * http://www.eclipse.org/org/documents/edl-v10.php.
  12. *
  13. * Contributors:
  14. * Andreas Walter - initially moved export declarations into separate fle
  15. *******************************************************************************/
  16. #if !defined(EXPORTDECLARATIONS_H)
  17. #define EXPORTDECLARATIONS_H
  18. #if defined(_WIN32) || defined(_WIN64)
  19. # if defined(PAHO_MQTT_EXPORTS)
  20. # define LIBMQTT_API __declspec(dllexport)
  21. # elif defined(PAHO_MQTT_IMPORTS)
  22. # define LIBMQTT_API __declspec(dllimport)
  23. # else
  24. # define LIBMQTT_API
  25. # endif
  26. #else
  27. # if defined(PAHO_MQTT_EXPORTS)
  28. # define LIBMQTT_API __attribute__ ((visibility ("default")))
  29. # else
  30. # define LIBMQTT_API extern
  31. # endif
  32. #endif
  33. #endif