瀏覽代碼

wrap config in extern "C" for C++ interop

Julius Pfrommer 8 年之前
父節點
當前提交
c539903821
共有 1 個文件被更改,包括 23 次插入0 次删除
  1. 23 0
      include/ua_config.h.in

+ 23 - 0
include/ua_config.h.in

@@ -1,6 +1,25 @@
+/*
+ * Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
+ *
+ * This file is part of open62541. open62541 is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU Lesser General
+ * Public License, version 3 (as published by the Free Software Foundation) with
+ * a static linking exception as stated in the LICENSE file provided with
+ * open62541.
+ *
+ * open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
 #ifndef UA_CONFIG_H_
 #define UA_CONFIG_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef _XOPEN_SOURCE
 # define _XOPEN_SOURCE 500
 # define _DEFAULT_SOURCE
@@ -173,4 +192,8 @@
 # include <string.h>
 #endif
 
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
 #endif /* UA_CONFIG_H_ */