[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#778531: Patch



Patch for source package libdebian-installer 0.99+deb8u1.

==
Askar Safin
http://vk.com/safinaskar

diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/exec.h new/include/debian-installer/exec.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/exec.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/exec.h	2015-08-04 20:54:55.335590329 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__EXEC_H
 #define DEBIAN_INSTALLER__EXEC_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/types.h>
 
 #include <sys/types.h>
@@ -200,4 +205,9 @@
 }
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/hash.h new/include/debian-installer/hash.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/hash.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/hash.h	2015-08-04 20:54:55.339590329 +0000
@@ -21,6 +21,11 @@
 #ifndef DEBIAN_INSTALLER__HASH_H
 #define DEBIAN_INSTALLER__HASH_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/types.h>
 
 /** 
@@ -139,4 +144,9 @@
 di_ksize_t di_hash_table_size (di_hash_table *hash_table);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/list.h new/include/debian-installer/list.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/list.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/list.h	2015-08-04 20:54:55.339590329 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__LIST_H
 #define DEBIAN_INSTALLER__LIST_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/mem_chunk.h>
 
 typedef struct di_list di_list;
@@ -116,4 +121,9 @@
 void di_list_prepend_chunk (di_list *list, void *data, di_mem_chunk *mem_chunk) __attribute__ ((nonnull(1,3)));
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/log.h new/include/debian-installer/log.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/log.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/log.h	2015-08-04 20:54:55.343590329 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__LOG_H
 #define DEBIAN_INSTALLER__LOG_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <stdarg.h>
 
 /**
@@ -104,4 +109,9 @@
   di_log_handler_syslog;
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/mem.h new/include/debian-installer/mem.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/mem.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/mem.h	2015-08-04 20:54:55.351590330 +0000
@@ -21,6 +21,11 @@
 #ifndef DEBIAN_INSTALLER__MEM_H
 #define DEBIAN_INSTALLER__MEM_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/types.h>
 
 #include <stdio.h>
@@ -87,4 +92,9 @@
   ((struct_type *) di_realloc ((mem), sizeof (struct_type) * (n_structs)))
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/mem_chunk.h new/include/debian-installer/mem_chunk.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/mem_chunk.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/mem_chunk.h	2015-08-04 20:54:55.355590330 +0000
@@ -21,6 +21,11 @@
 #ifndef DEBIAN_INSTALLER__MEM_CHUNK_H
 #define DEBIAN_INSTALLER__MEM_CHUNK_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/types.h>
 
 typedef struct di_mem_chunk di_mem_chunk;
@@ -37,4 +42,9 @@
 size_t di_mem_chunk_size (di_mem_chunk *mem_chunk);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/package.h new/include/debian-installer/package.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/package.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/package.h	2015-08-04 20:54:55.359590330 +0000
@@ -20,23 +20,16 @@
 #ifndef DEBIAN_INSTALLER__PACKAGE_H
 #define DEBIAN_INSTALLER__PACKAGE_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/mem.h>
 #include <debian-installer/parser.h>
 #include <debian-installer/slist.h>
 #include <debian-installer/string.h>
 
-typedef struct di_package di_package;
-typedef struct di_package_dependency di_package_dependency;
-typedef struct di_package_version di_package_version;
-
-typedef enum di_package_dependency_type di_package_dependency_type;
-typedef enum di_package_priority di_package_priority;
-typedef enum di_package_status di_package_status;
-typedef enum di_package_status_want di_package_status_want;
-typedef enum di_package_type di_package_type;
-
-#include <debian-installer/packages.h>
-
 /**
  * @addtogroup di_package
  * @{
@@ -54,6 +47,8 @@
   di_package_priority_required,
 };
 
+typedef enum di_package_priority di_package_priority;
+
 /**
  * Status field, third part
  */
@@ -67,6 +62,8 @@
   di_package_status_config_files,
 };
 
+typedef enum di_package_status di_package_status;
+
 /**
  * Status field, first part
  */
@@ -79,6 +76,8 @@
   di_package_status_want_purge,
 };
 
+typedef enum di_package_status_want di_package_status_want;
+
 /**
  * type of package
  */
@@ -89,6 +88,8 @@
   di_package_type_real_package,                         /**< Real package */
 };
 
+typedef enum di_package_type di_package_type;
+
 /**
  * @brief Package
  */
@@ -118,6 +119,8 @@
   unsigned int resolver;                                /**< @internal */
 };
 
+typedef struct di_package di_package;
+
 /**
  * Type of dependency
  */
@@ -135,6 +138,8 @@
   di_package_dependency_type_reverse_enhances,          /**< @internal */
 };
 
+typedef enum di_package_dependency_type di_package_dependency_type;
+
 /**
  * @brief Package dependency
  */
@@ -144,6 +149,8 @@
   di_package *ptr;                                      /**< the package, may be NULL */
 };
 
+typedef struct di_package_dependency di_package_dependency;
+
 /**
  * @brief Package version
  */
@@ -154,16 +161,20 @@
   char *debian_revision;                                /**< debian revision */
 };
 
+typedef struct di_package_version di_package_version;
+
+#include <debian-installer/packages.h>
+
 void di_package_destroy (di_package *package);
 
 static inline di_package *di_package_alloc (di_packages_allocator *allocator)
 {
-  return di_mem_chunk_alloc0 (allocator->package_mem_chunk);
+  return (di_package *) di_mem_chunk_alloc0 (allocator->package_mem_chunk);
 }
 
 static inline di_package_dependency *di_package_dependency_alloc (di_packages_allocator *allocator)
 {
-  return di_mem_chunk_alloc0 (allocator->package_dependency_mem_chunk);
+  return (di_package_dependency *) di_mem_chunk_alloc0 (allocator->package_dependency_mem_chunk);
 }
 
 void di_package_version_free (di_package_version *version);
@@ -179,17 +190,17 @@
 
 static inline di_package_priority di_package_priority_text_from (const char *text)
 {
-  return di_package_array_text_from (di_package_priority_text, text);
+  return (di_package_priority) di_package_array_text_from (di_package_priority_text, text);
 }
 
 static inline di_package_status_want di_package_status_want_text_from (const char *text)
 {
-  return di_package_array_text_from (di_package_status_want_text, text);
+  return (di_package_status_want) di_package_array_text_from (di_package_status_want_text, text);
 }
 
 static inline di_package_status di_package_status_text_from (const char *text)
 {
-  return di_package_array_text_from (di_package_status_text, text);
+  return (di_package_status) di_package_array_text_from (di_package_status_text, text);
 }
 
 static inline const char *di_package_priority_text_to (const di_package_priority priority)
@@ -283,4 +294,9 @@
 }
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/packages.h new/include/debian-installer/packages.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/packages.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/packages.h	2015-08-04 20:54:55.363590330 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__PACKAGES_H
 #define DEBIAN_INSTALLER__PACKAGES_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/hash.h>
 #include <debian-installer/parser.h>
 #include <debian-installer/slist.h>
@@ -167,4 +172,9 @@
 }
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/parser.h new/include/debian-installer/parser.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/parser.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/parser.h	2015-08-04 20:54:55.367590331 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__PARSER_H
 #define DEBIAN_INSTALLER__PARSER_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/hash.h>
 #include <debian-installer/slist.h>
 #include <debian-installer/string.h>
@@ -158,4 +163,9 @@
 void di_parser_info_add (di_parser_info *info, const di_parser_fieldinfo *fieldinfo[]);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/parser_rfc822.h new/include/debian-installer/parser_rfc822.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/parser_rfc822.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/parser_rfc822.h	2015-08-04 20:54:55.371590331 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__PARSER_RFC822_H
 #define DEBIAN_INSTALLER__PARSER_RFC822_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/hash.h>
 #include <debian-installer/parser.h>
 
@@ -70,4 +75,9 @@
 int di_parser_rfc822_write_file (const char *file, di_parser_info *fieldinfo, di_parser_write_entry_next entry_next, void *user_data);
   
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/release.h new/include/debian-installer/release.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/release.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/release.h	2015-08-04 20:54:55.375590331 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__RELEASE_H
 #define DEBIAN_INSTALLER__RELEASE_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/hash.h>
 #include <debian-installer/parser.h>
 #include <debian-installer/slist.h>
@@ -82,4 +87,9 @@
 extern const di_parser_fieldinfo *di_release_parser_fieldinfo[];
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/slist.h new/include/debian-installer/slist.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/slist.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/slist.h	2015-08-04 20:54:55.379590331 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__SLIST_H
 #define DEBIAN_INSTALLER__SLIST_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/mem_chunk.h>
 
 typedef struct di_slist di_slist;
@@ -118,4 +123,9 @@
 void di_slist_prepend_chunk (di_slist *slist, void *data, di_mem_chunk *mem_chunk) __attribute__ ((nonnull(1,3)));
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/string.h new/include/debian-installer/string.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/string.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/string.h	2015-08-04 20:54:55.379590331 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__STRING_H
 #define DEBIAN_INSTALLER__STRING_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/types.h>
 
 #include <stdio.h>
@@ -64,4 +69,9 @@
 char *di_stradup (const char *s, size_t n);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/system/devfs.h new/include/debian-installer/system/devfs.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/system/devfs.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/system/devfs.h	2015-08-04 20:54:55.283590326 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__SYSTEM__DEVFS_H
 #define DEBIAN_INSTALLER__SYSTEM__DEVFS_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <sys/types.h>
 
 /**
@@ -43,4 +48,9 @@
 ssize_t di_mapdevfs (const char *path, char *ret, size_t len) __attribute__ ((deprecated));
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/system/dpkg.h new/include/debian-installer/system/dpkg.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/system/dpkg.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/system/dpkg.h	2015-08-04 20:54:55.315590327 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__SYSTEM__DPKG_H
 #define DEBIAN_INSTALLER__SYSTEM__DPKG_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/packages.h>
 
 #include <stdbool.h>
@@ -43,4 +48,9 @@
 #endif
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/system/packages.h new/include/debian-installer/system/packages.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/system/packages.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/system/packages.h	2015-08-04 20:54:55.319590328 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
 #define DEBIAN_INSTALLER__SYSTEM__PACKAGES_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/package.h>
 #include <debian-installer/packages.h>
 
@@ -115,4 +120,9 @@
 void di_system_packages_resolve_dependencies_mark_anna (di_packages *packages, const char *subarchitecture, const char *kernel);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/system/prebaseconfig.h new/include/debian-installer/system/prebaseconfig.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/system/prebaseconfig.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/system/prebaseconfig.h	2015-08-04 20:54:55.323590328 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__SYSTEM__PREBASECONFIG_H
 #define DEBIAN_INSTALLER__SYSTEM__PREBASECONFIG_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /**
  * @addtogroup di_system_prebaseconfig
  * @{
@@ -42,4 +47,9 @@
 int di_prebaseconfig_append (const char *udeb, const char *format, ...) __attribute__ ((format(printf,2,3),deprecated));
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/system/subarch.h new/include/debian-installer/system/subarch.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/system/subarch.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/system/subarch.h	2015-08-04 20:54:55.327590328 +0000
@@ -21,6 +21,11 @@
 #ifndef DEBIAN_INSTALLER__SYSTEM__SUBARCH_H
 #define DEBIAN_INSTALLER__SYSTEM__SUBARCH_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #if defined(__ARMEL__)
 #define DI_SYSTEM_SUBARCH_CAN_GUESS 1
 #endif
@@ -45,4 +50,9 @@
 const char *di_system_subarch_analyze_guess (void);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/system/utils.h new/include/debian-installer/system/utils.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/system/utils.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/system/utils.h	2015-08-04 20:54:55.331590328 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__SYSTEM__UTILS_H
 #define DEBIAN_INSTALLER__SYSTEM__UTILS_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /**
  * @addtogroup di_system_utils
  * @{
@@ -33,4 +38,9 @@
 void di_system_init (const char *progname);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/tree.h new/include/debian-installer/tree.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/tree.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/tree.h	2015-08-04 20:54:55.383590332 +0000
@@ -20,6 +20,11 @@
 #ifndef DEBIAN_INSTALLER__TREE_H
 #define DEBIAN_INSTALLER__TREE_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 #include <debian-installer/types.h>
 
 typedef struct di_tree di_tree;
@@ -116,4 +121,9 @@
 di_ksize_t di_tree_size (di_tree *tree);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif
diff -Naur libdebian-installer-0.99+deb8u1/include/debian-installer/utils.h new/include/debian-installer/utils.h
--- libdebian-installer-0.99+deb8u1/include/debian-installer/utils.h	2014-11-05 01:19:08.000000000 +0000
+++ new/include/debian-installer/utils.h	2015-08-04 20:54:55.387590332 +0000
@@ -21,6 +21,11 @@
 #ifndef DEBIAN_INSTALLER__UTILS_H
 #define DEBIAN_INSTALLER__UTILS_H
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /**
  * @addtogroup di_utils
  * @{
@@ -39,4 +44,9 @@
 const char *di_progname_get (void);
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif

Reply to: