Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h

Issue 960183004: Upgrade openjpeg to revision 2997. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
index b1e1c294c8f4ef3cc3b7a5cdf7d18e01c67eee35..4a8e75ce5a7f3025c2593e33633c084cd8fca9c8 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
@@ -76,10 +76,36 @@ Most compilers implement their own version of this keyword ...
#define OPJ_DEPRECATED(func) func
#endif
-// PDFium doesn't need to export any of these methods.
-#define OPJ_API
-#define OPJ_LOCAL
-#define OPJ_CALLCONV
+#if defined(OPJ_STATIC) || !defined(_WIN32)
+/* http://gcc.gnu.org/wiki/Visibility */
+# if __GNUC__ >= 4
+# if defined(OPJ_STATIC) /* static library uses "hidden" */
+# define OPJ_API __attribute__ ((visibility ("hidden")))
+# else
+# define OPJ_API __attribute__ ((visibility ("default")))
+# endif
+# define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
+# else
+# define OPJ_API
+# define OPJ_LOCAL
+# endif
+# define OPJ_CALLCONV
+#else
+# define OPJ_CALLCONV __stdcall
+/*
+The following ifdef block is the standard way of creating macros which make exporting
+from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
+symbol defined on the command line. this symbol should not be defined on any project
+that uses this DLL. This way any other project whose source files include this file see
+OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
+defined with this macro as being exported.
+*/
+# if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
+# define OPJ_API __declspec(dllexport)
+# else
+# define OPJ_API __declspec(dllimport)
+# endif /* OPJ_EXPORTS */
+#endif /* !OPJ_STATIC || !_WIN32 */
typedef int OPJ_BOOL;
#define OPJ_TRUE 1

Powered by Google App Engine
This is Rietveld 408576698