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 17 #if !defined(EXPORTDECLARATIONS_H) 18 #define EXPORTDECLARATIONS_H 19 20 #if defined(_WIN32) || defined(_WIN64) 21 # if defined(PAHO_MQTT_EXPORTS) 22 # define LIBMQTT_API __declspec(dllexport) 23 # elif defined(PAHO_MQTT_IMPORTS) 24 # define LIBMQTT_API __declspec(dllimport) 25 # else 26 # define LIBMQTT_API 27 # endif 28 #else 29 # if defined(PAHO_MQTT_EXPORTS) 30 # define LIBMQTT_API __attribute__ ((visibility ("default"))) 31 # else 32 # define LIBMQTT_API extern 33 # endif 34 #endif 35 36 #endif 37