Hide symbols with gcc.
[platform/upstream/flac.git] / include / FLAC++ / export.h
index bf915fa..d3bd136 100644 (file)
@@ -1,5 +1,5 @@
 /* libFLAC++ - Free Lossless Audio Codec library
- * Copyright (C) 2002,2003,2004,2005  Josh Coalson
+ * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009  Josh Coalson
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #ifndef FLACPP__EXPORT_H
 #define FLACPP__EXPORT_H
 
-#if defined(FLAC__NO_DLL) || !defined(_MSC_VER)
-#define FLACPP_API
+/** \file include/FLAC++/export.h
+ *
+ *  \brief
+ *  This module contains #defines and symbols for exporting function
+ *  calls, and providing version information and compiled-in features.
+ *
+ *  See the \link flacpp_export export \endlink module.
+ */
 
-#else
+/** \defgroup flacpp_export FLAC++/export.h: export symbols
+ *  \ingroup flacpp
+ *
+ *  \brief
+ *  This module contains #defines and symbols for exporting function
+ *  calls, and providing version information and compiled-in features.
+ *
+ *  If you are compiling with MSVC and will link to the static library
+ *  (libFLAC++.lib) you should define FLAC__NO_DLL in your project to
+ *  make sure the symbols are exported properly.
+ *
+ * \{
+ */
+
+#if defined(FLAC__NO_DLL)
+#define FLACPP_API
 
+#elif defined(_MSC_VER)
 #ifdef FLACPP_API_EXPORTS
 #define        FLACPP_API      _declspec(dllexport)
 #else
 #define FLACPP_API     _declspec(dllimport)
-
 #endif
+
+#elif defined(FLAC__USE_VISIBILITY_ATTR)
+#define FLACPP_API __attribute__ ((visibility ("default")))
+
+#else
+#define FLACPP_API
+
 #endif
+
+/* These #defines will mirror the libtool-based library version number, see
+ * http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
+ */
+#define FLACPP_API_VERSION_CURRENT 8
+#define FLACPP_API_VERSION_REVISION 0
+#define FLACPP_API_VERSION_AGE 2
+
+/* \} */
+
 #endif