The following commit has been merged in the master branch:
commit e80064ff8dad81dd310dedbf41419087998236f2
Author: Guillem Jover <guil...@debian.org>
Date:   Sun Jan 4 18:33:16 2009 +0200

    libdpkg: Move macros from dpkg.h to more specialized headers

diff --git a/ChangeLog b/ChangeLog
index f43df77..afa8b7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2009-01-04  Guillem Jover  <guil...@debian.org>
 
+       * lib/dpkg.h (LOCALLIBDIR): Move macro to ...
+       * dselect/Makefile.am (INCLUDES): ... here, as a -D argument.
+
+       * lib/dpkg.h (DSELECT): Move macro to ...
+       * dselect/dselect.h: ... here.
+
+       * lib/dpkg.h (SPLITVERSION, SPLITPARTDEFMAX): Move macros to ...
+       * dpkg-split/dpkg-split.h: ... here.
+
+       * lib/dpkg.h (ARCHIVEVERSION, BUILDCONTROLDIR, EXTRACTCONTROLDIR)
+       (BUILDOLDPKGFORMAT, OLDARCHIVEVERSION, OLDDEBDIR, OLDOLDDEBDIR)
+       (MAXFIELDNAME, INTERPRETER_MAX): Move macros to ...
+       * dpkg-deb/dpkg-deb.h: ... here.
+
+2009-01-04  Guillem Jover  <guil...@debian.org>
+
        * lib/dpkg.h (printforhelp): Move declaration to ...
        * lib/myopt.h: ... here.
 
diff --git a/dpkg-deb/dpkg-deb.h b/dpkg-deb/dpkg-deb.h
index 6cad804..79d3f82 100644
--- a/dpkg-deb/dpkg-deb.h
+++ b/dpkg-deb/dpkg-deb.h
@@ -38,6 +38,21 @@ extern const char *compression;
 extern const char* showformat;
 extern enum compress_type compress_type;
 
+#define ARCHIVEVERSION         "2.0"
+
+#define BUILDCONTROLDIR                "DEBIAN"
+#define EXTRACTCONTROLDIR      BUILDCONTROLDIR
+
+/* Set BUILDOLDPKGFORMAT to 1 to build old-format archives by default. */
+#ifndef BUILDOLDPKGFORMAT
+#define BUILDOLDPKGFORMAT 0
+#endif
+
+#define OLDARCHIVEVERSION      "0.939000"
+
+#define OLDDEBDIR              "DEBIAN"
+#define OLDOLDDEBDIR           ".DEBIAN"
+
 #define DEBMAGIC     "!<arch>\ndebian-binary   "
 #define ADMINMEMBER            "control.tar.gz  "
 #define ADMINMEMBER_COMPAT     "control.tar.gz/ "
@@ -51,5 +66,12 @@ extern enum compress_type compress_type;
 #define DATAMEMBER_COMPAT_CAT          "data.tar/       "
 
 #define MAXFILENAME 2048
+#define MAXFIELDNAME 200
+
+#ifdef PATH_MAX
+# define INTERPRETER_MAX PATH_MAX
+#else
+# define INTERPRETER_MAX 1024
+#endif
 
 #endif /* DPKG_DEB_H */
diff --git a/dpkg-split/dpkg-split.h b/dpkg-split/dpkg-split.h
index aa27c4c..db30caa 100644
--- a/dpkg-split/dpkg-split.h
+++ b/dpkg-split/dpkg-split.h
@@ -67,7 +67,11 @@ void reassemble(struct partinfo **partlist, const char 
*outputfile);
 void mustgetpartinfo(const char *filename, struct partinfo *ri);
 void addtopartlist(struct partinfo**, struct partinfo*, struct partinfo *refi);
 
+#define SPLITVERSION       "2.1"
+
 #define PARTMAGIC         "!<arch>\ndebian-split    "
 #define HEADERALLOWANCE    1024
 
+#define SPLITPARTDEFMAX    (450 * 1024)
+
 #endif /* DPKG_SPLIT_H */
diff --git a/dselect/Makefile.am b/dselect/Makefile.am
index 87e9b37..40c0b16 100644
--- a/dselect/Makefile.am
+++ b/dselect/Makefile.am
@@ -6,6 +6,7 @@ localedir = $(datadir)/locale
 INCLUDES = \
        -DLOCALEDIR=\"$(localedir)\" \
        -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \
+       -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \
        -idirafter $(top_srcdir)/libcompat \
        -I$(top_srcdir)/lib
 
diff --git a/dselect/dselect.h b/dselect/dselect.h
index c8e7006..3faa1fa 100644
--- a/dselect/dselect.h
+++ b/dselect/dselect.h
@@ -23,6 +23,8 @@
 #ifndef DSELECT_H
 #define DSELECT_H
 
+#define DSELECT                "dselect"
+
 #define TOTAL_LIST_WIDTH 180
 #define MAX_DISPLAY_INFO 120
 
diff --git a/lib/dpkg.h b/lib/dpkg.h
index 1db4e1f..f72164b 100644
--- a/lib/dpkg.h
+++ b/lib/dpkg.h
@@ -40,27 +40,12 @@ DPKG_BEGIN_DECLS
 #include <stddef.h>
 #endif
 
-#ifdef PATH_MAX
-# define INTERPRETER_MAX PATH_MAX
-#else
-# define INTERPRETER_MAX 1024
-#endif
-
-#define ARCHIVEVERSION     "2.0"
-#define SPLITVERSION       "2.1"
-#define OLDARCHIVEVERSION  "0.939000"
-#define SPLITPARTDEFMAX    (450*1024)
-#define MAXFIELDNAME        200
 #define MAXCONFFILENAME     1000
 #define MAXDIVERTFILENAME   1024
 #define MAXCONTROLFILENAME  100
-#define BUILDCONTROLDIR    "DEBIAN"
-#define EXTRACTCONTROLDIR   BUILDCONTROLDIR
 #define DEBEXT             ".deb"
 #define OLDDBEXT           "-old"
 #define NEWDBEXT           "-new"
-#define OLDOLDDEBDIR       ".DEBIAN"
-#define OLDDEBDIR          "DEBIAN"
 #define REMOVECONFFEXTS    "~", ".bak", "%", \
                            DPKGTEMPEXT, DPKGNEWEXT, DPKGOLDEXT, DPKGDISTEXT
 
@@ -105,8 +90,6 @@ DPKG_BEGIN_DECLS
 #define MAINTSCRIPTPKGENVVAR "DPKG_MAINTSCRIPT_PACKAGE"
 #define MAINTSCRIPTDPKGENVVAR "DPKG_RUNNING_VERSION"
 
-#define LOCALLIBDIR         "/usr/local/lib/dpkg"
-
 #define NOJOBCTRLSTOPENV    "DPKG_NO_TSTP"
 #define SHELLENV            "SHELL"
 #define DEFAULTSHELL        "sh"
@@ -128,7 +111,6 @@ DPKG_BEGIN_DECLS
 #define BACKEND                "dpkg-deb"
 #define DPKGQUERY      "dpkg-query"
 #define SPLITTER       "dpkg-split"
-#define DSELECT                "dselect"
 #define DPKG           "dpkg"
 #define DEBSIGVERIFY   "/usr/bin/debsig-verify"
 
@@ -387,12 +369,6 @@ void compress_cat(enum compress_type type, int fd_in, int 
fd_out,
                   const char *compression, char *desc, ...)
                   NONRETURNING PRINTFFORMAT(5, 6);
 
-/* Set BUILDOLDPKGFORMAT to 1 to build old-format archives by default.
- *  */
-#ifndef BUILDOLDPKGFORMAT
-#define BUILDOLDPKGFORMAT 0
-#endif
-
 DPKG_END_DECLS
 
 #endif /* DPKG_H */

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to