This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=a4dfcc1ef09b9460a65c797bdab696d40b7078b8

commit a4dfcc1ef09b9460a65c797bdab696d40b7078b8
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Jun 27 04:14:52 2021 +0200

    libdpkg: Add missing DPKG_{BEGIN,END}_DECLS in header files
    
    We need those so that the code can be used from non-C, such as C++,
    for example.
    
    Changelog: internal
---
 lib/dpkg/db-ctrl.h   | 4 ++++
 lib/dpkg/db-fsys.h   | 4 ++++
 lib/dpkg/fsys.h      | 4 ++++
 lib/dpkg/parsedump.h | 4 ++++
 lib/dpkg/perf.h      | 4 ++++
 lib/dpkg/tarfn.h     | 4 ++++
 lib/dpkg/test.h      | 4 ++++
 7 files changed, 28 insertions(+)

diff --git a/lib/dpkg/db-ctrl.h b/lib/dpkg/db-ctrl.h
index e4dccd285..d21bb7c66 100644
--- a/lib/dpkg/db-ctrl.h
+++ b/lib/dpkg/db-ctrl.h
@@ -25,6 +25,8 @@
 
 #include <dpkg/dpkg-db.h>
 
+DPKG_BEGIN_DECLS
+
 enum pkg_infodb_format {
        PKG_INFODB_FORMAT_UNKNOWN = -1,
        PKG_INFODB_FORMAT_LEGACY = 0,
@@ -49,4 +51,6 @@ typedef void pkg_infodb_file_func(const char *filename, const 
char *filetype);
 void pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin,
                         pkg_infodb_file_func *func);
 
+DPKG_END_DECLS
+
 #endif /* LIBDPKG_DB_CTRL_H */
diff --git a/lib/dpkg/db-fsys.h b/lib/dpkg/db-fsys.h
index 339a0fb45..cd9abefaf 100644
--- a/lib/dpkg/db-fsys.h
+++ b/lib/dpkg/db-fsys.h
@@ -25,6 +25,8 @@
 #include <dpkg/file.h>
 #include <dpkg/fsys.h>
 
+DPKG_BEGIN_DECLS
+
 /*
  * Data structure here is as follows:
  *
@@ -72,4 +74,6 @@ void write_filelist_except(struct pkginfo *pkg, struct pkgbin 
*pkgbin,
 void write_filehash_except(struct pkginfo *pkg, struct pkgbin *pkgbin,
                            struct fsys_namenode_list *list, enum 
fsys_namenode_flags mask);
 
+DPKG_END_DECLS
+
 #endif /* LIBDPKG_DB_FSYS_H */
diff --git a/lib/dpkg/fsys.h b/lib/dpkg/fsys.h
index 65b8d76e4..6bb0d09d4 100644
--- a/lib/dpkg/fsys.h
+++ b/lib/dpkg/fsys.h
@@ -26,6 +26,8 @@
 
 #include <dpkg/file.h>
 
+DPKG_BEGIN_DECLS
+
 /*
  * Data structure here is as follows:
  *
@@ -203,4 +205,6 @@ const char *dpkg_fsys_set_dir(const char *dir);
 const char *dpkg_fsys_get_dir(void);
 char *dpkg_fsys_get_path(const char *pathpart);
 
+DPKG_END_DECLS
+
 #endif /* LIBDPKG_FSYS_H */
diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h
index 73331bca5..316cd1b51 100644
--- a/lib/dpkg/parsedump.h
+++ b/lib/dpkg/parsedump.h
@@ -27,6 +27,8 @@
 
 #include <dpkg/error.h>
 
+DPKG_BEGIN_DECLS
+
 /**
  * @defgroup parsedump In-core package database parsing and reading
  * @ingroup dpkg-public
@@ -163,4 +165,6 @@ extern const struct fieldinfo fieldinfos[];
 
 /** @} */
 
+DPKG_END_DECLS
+
 #endif /* LIBDPKG_PARSEDUMP_H */
diff --git a/lib/dpkg/perf.h b/lib/dpkg/perf.h
index 6b5d0befd..a46792a43 100644
--- a/lib/dpkg/perf.h
+++ b/lib/dpkg/perf.h
@@ -30,6 +30,8 @@
 #define TEST_OMIT_VARIABLES
 #include <dpkg/test.h>
 
+DPKG_BEGIN_DECLS
+
 struct perf_slot {
        struct timespec t_ini, t_end;
 };
@@ -70,4 +72,6 @@ perf_ts_slot_print(struct perf_slot *ps, const char *str)
 #define perf_ts_slot_start(ps) clock_gettime(CLOCK_MONOTONIC, &((ps)->t_ini))
 #define perf_ts_slot_stop(ps) clock_gettime(CLOCK_MONOTONIC, &((ps)->t_end))
 
+DPKG_END_DECLS
+
 #endif
diff --git a/lib/dpkg/tarfn.h b/lib/dpkg/tarfn.h
index 4d5917cfc..c03a59310 100644
--- a/lib/dpkg/tarfn.h
+++ b/lib/dpkg/tarfn.h
@@ -29,6 +29,8 @@
 #include <dpkg/error.h>
 #include <dpkg/file.h>
 
+DPKG_BEGIN_DECLS
+
 /**
  * @defgroup tar Tar archive handling
  * @ingroup dpkg-public
@@ -127,4 +129,6 @@ tar_extractor(struct tar_archive *tar);
 
 /** @} */
 
+DPKG_END_DECLS
+
 #endif
diff --git a/lib/dpkg/test.h b/lib/dpkg/test.h
index ff99fe9d0..bdf634a0e 100644
--- a/lib/dpkg/test.h
+++ b/lib/dpkg/test.h
@@ -33,6 +33,8 @@
 #define TEST_MAIN_DTOR pop_error_context(ehflag_normaltidy)
 #endif
 
+DPKG_BEGIN_DECLS
+
 /**
  * @defgroup dpkg_test Test suite support
  * @ingroup dpkg-internal
@@ -155,6 +157,8 @@ static const char *test_skip_reason;
 
 /** @} */
 
+DPKG_END_DECLS
+
 #define TEST_ENTRY(name) \
 static void name(void); \
 int \

-- 
Dpkg.Org's dpkg

Reply via email to