Prefer C linkage
diff --git a/src/hb-common.h b/src/hb-common.h
index 74d8512..85906c5 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
@@ -27,6 +27,17 @@
 #ifndef HB_COMMON_H
 #define HB_COMMON_H
 
+# ifdef __cplusplus
+#  define HB_BEGIN_DECLS	extern "C" {
+#  define HB_END_DECLS		}
+# else /* !__cplusplus */
+#  define HB_BEGIN_DECLS
+#  define HB_END_DECLS
+# endif /* !__cplusplus */
+
+HB_BEGIN_DECLS
+
+
 #ifdef _MSC_VER
 #define _HB__STR2__(x) #x
 #define _HB__STR1__(x) _HB__STR2__(x)
@@ -47,14 +58,6 @@
 #include <stdint.h>
 #endif
 
-# ifdef __cplusplus
-#  define HB_BEGIN_DECLS	extern "C" {
-#  define HB_END_DECLS		}
-# else /* !__cplusplus */
-#  define HB_BEGIN_DECLS
-#  define HB_END_DECLS
-# endif /* !__cplusplus */
-
 typedef int hb_bool_t;
 
 typedef uint32_t hb_tag_t;
@@ -88,4 +91,6 @@
 #define HB_DIRECTION_REVERSE(dir)	((hb_direction_t) (((unsigned int) (dir)) ^ 1))
 
 
+HB_END_DECLS
+
 #endif /* HB_COMMON_H */