Selaa lähdekoodia

libdpkg: Move subproc related declarations to subproc.h

Guillem Jover 17 vuotta sitten
vanhempi
commit
952faba871
7 muutettua tiedostoa jossa 14 lisäystä ja 6 poistoa
  1. 1 0
      dpkg-deb/build.c
  2. 1 0
      dpkg-deb/extract.c
  3. 1 0
      dpkg-deb/info.c
  4. 0 6
      lib/dpkg/dpkg.h
  5. 9 0
      lib/dpkg/subproc.h
  6. 1 0
      src/archives.c
  7. 1 0
      src/processarc.c

+ 1 - 0
dpkg-deb/build.c

@@ -46,6 +46,7 @@
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
 #include <dpkg/path.h>
+#include <dpkg/subproc.h>
 #include <dpkg/myopt.h>
 
 #include "dpkg-deb.h"

+ 1 - 0
dpkg-deb/extract.c

@@ -42,6 +42,7 @@
 #endif
 
 #include <dpkg/dpkg.h>
+#include <dpkg/subproc.h>
 #include <dpkg/myopt.h>
 
 #include "dpkg-deb.h"

+ 1 - 0
dpkg-deb/info.c

@@ -39,6 +39,7 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/subproc.h>
 #include <dpkg/myopt.h>
 
 #include "dpkg-deb.h"

+ 0 - 6
lib/dpkg/dpkg.h

@@ -206,12 +206,6 @@ int m_fork(void);
 void m_dup2(int oldfd, int newfd);
 void m_pipe(int fds[2]);
 
-#define PROCPIPE 1
-#define PROCWARN 2
-#define PROCNOERR 4
-int checksubprocerr(int status, const char *description, int flags);
-int waitsubproc(pid_t pid, const char *description, int flags);
-
 #define BUFFER_WRITE_BUF 0
 #define BUFFER_WRITE_VBUF 1
 #define BUFFER_WRITE_FD 2

+ 9 - 0
lib/dpkg/subproc.h

@@ -22,6 +22,8 @@
 #ifndef DPKG_SUBPROC_H
 #define DPKG_SUBPROC_H
 
+#include <sys/types.h>
+
 #include <dpkg/macros.h>
 
 DPKG_BEGIN_DECLS
@@ -29,6 +31,13 @@ DPKG_BEGIN_DECLS
 void setup_subproc_signals(const char *name);
 void cu_subproc_signals(int argc, void **argv);
 
+#define PROCPIPE 1
+#define PROCWARN 2
+#define PROCNOERR 4
+
+int checksubprocerr(int status, const char *desc, int flags);
+int waitsubproc(pid_t pid, const char *desc, int flags);
+
 DPKG_END_DECLS
 
 #endif /* DPKG_SUBPROC_H */

+ 1 - 0
src/archives.c

@@ -43,6 +43,7 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/subproc.h>
 #include <dpkg/tarfn.h>
 #include <dpkg/myopt.h>
 

+ 1 - 0
src/processarc.c

@@ -40,6 +40,7 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/subproc.h>
 #include <dpkg/tarfn.h>
 #include <dpkg/myopt.h>