rtl-sdr_export.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * rtl-sdr, turns your Realtek RTL2832 based DVB dongle into a SDR receiver
  3. * Copyright (C) 2012 by Hoernchen <la@tfc-server.de>
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef RTLSDR_EXPORT_H
  19. #define RTLSDR_EXPORT_H
  20. #if defined __GNUC__
  21. # if __GNUC__ >= 4
  22. # define __SDR_EXPORT __attribute__((visibility("default")))
  23. # define __SDR_IMPORT __attribute__((visibility("default")))
  24. # else
  25. # define __SDR_EXPORT
  26. # define __SDR_IMPORT
  27. # endif
  28. #elif _MSC_VER
  29. # define __SDR_EXPORT __declspec(dllexport)
  30. # define __SDR_IMPORT __declspec(dllimport)
  31. #else
  32. # define __SDR_EXPORT
  33. # define __SDR_IMPORT
  34. #endif
  35. #ifndef rtlsdr_STATIC
  36. # ifdef rtlsdr_EXPORTS
  37. # define RTLSDR_API __SDR_EXPORT
  38. # else
  39. # define RTLSDR_API __SDR_IMPORT
  40. # endif
  41. #else
  42. #define RTLSDR_API
  43. #endif
  44. #endif /* RTLSDR_EXPORT_H */