Merge pull request #82 from tweenk/egl_emscripten

Add support for Emscripten in EGL/eglplatform.h.
diff --git a/api/KHR/khrplatform.h b/api/KHR/khrplatform.h
index 975bbff..5b55ea2 100644
--- a/api/KHR/khrplatform.h
+++ b/api/KHR/khrplatform.h
@@ -90,12 +90,20 @@
  *                                  int arg2) KHRONOS_APIATTRIBUTES;
  */
 
+#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
+#   define KHRONOS_STATIC 1
+#endif
+
 /*-------------------------------------------------------------------------
  * Definition of KHRONOS_APICALL
  *-------------------------------------------------------------------------
  * This precedes the return type of the function in the function prototype.
  */
-#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+#if defined(KHRONOS_STATIC)
+    /* If the preprocessor constant KHRONOS_STATIC is defined, make the
+     * header compatible with static linking. */
+#   define KHRONOS_APICALL
+#elif defined(_WIN32)
 #   define KHRONOS_APICALL __declspec(dllimport)
 #elif defined (__SYMBIAN32__)
 #   define KHRONOS_APICALL IMPORT_C
@@ -111,7 +119,7 @@
  * This follows the return type of the function  and precedes the function
  * name in the function prototype.
  */
-#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(KHRONOS_STATIC)
     /* Win32 but not WinCE */
 #   define KHRONOS_APIENTRY __stdcall
 #else
diff --git a/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt b/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt
index 2b470c7..41b91c0 100644
--- a/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt
+++ b/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt
@@ -24,7 +24,7 @@
 
 Version
 
-    Version 4, October 20, 2016
+    Version 5, March 12, 2019
 
 Number
 
@@ -111,8 +111,10 @@
     attribute values may be given. These attribute values together form an
     unsigned 64-bit value called a format modifier. Format modifiers are
     specified by drm_fourcc.h and used as the modifier parameter of the
-    drm_mode_fb_cmd2 ioctl. If neither of the two attributes are given, the
-    format modifier is assumed to be zero. The two attributes are:
+    drm_mode_fb_cmd2 ioctl. If neither of the two attributes are given, or
+    if the modifier is explicitly declared to be DRM_FORMAT_MOD_INVALID, the
+    effective format modifier is implementation-defined. The two attributes
+    are:
 
         * EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT: The lowest 32 bits of the
           64-bit format modifier.
@@ -220,6 +222,10 @@
 
 Revision History
 
+#5 (Daniel Stone, March 12, 2019)
+   - Correct description of behaviour when a modifier is not explicitly given;
+     zero is not correct as it is an explicit modifier itself (linear).
+
 #4 (Daniel Stone, October 20, 2016)
    - Switch to EGLuint64KHR for modifier types.