Просмотр исходного кода

Bunch of changes to make dpkg compile on HP-UX

Wichert Akkerman лет назад: 26
Родитель
Сommit
a98b54799c
9 измененных файлов с 76 добавлено и 7 удалено
  1. 16 3
      ChangeLog
  2. 1 1
      Makefile.in
  3. 4 2
      configure.in
  4. 1 0
      dpkg-deb/Makefile.in
  5. 1 0
      dselect/Makefile.in
  6. 0 1
      include/dpkg.h.in
  7. 51 0
      lib/compat.c
  8. 1 0
      main/Makefile.in
  9. 1 0
      split/Makefile.in

+ 16 - 3
ChangeLog

@@ -1,6 +1,15 @@
-Mon Jan 10 20:55:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
-
-  * Update Swedish and Russian translation
+Tue Jan 11 18:32:52 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * configure.in: Fix include in test for alphasort 
+  * Makefile.in: add intl to subdirectory-list
+  * dpkg-deb/Makefile.in: set top_builddir
+  * dselect/Makefile.in: set top_builddir
+  * main/Makefile.in: set top_builddir
+  * lib/compat.c: add really simple snprintf (doesn't do range-checking)
+  * lib/compat.c: add sys_siglist
+  * configure.in: add tests for snprintf and sys_siglist
+  * include/dpkg.h.in: don't include sys/sysinfo.h, filesdb.c is the only
+    thing that needs it and it has its own include.
 
 Tue Jan 11 02:02:00 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
@@ -13,6 +22,10 @@ Tue Jan 11 02:02:00 CET 2000 Wichert Akkerman <wakkerma@debian.org>
   * dselect/method.cc: switch to using fcntl for lock since that is more
     portable, and revamp lockingcode to reduce code duplication
 
+Mon Jan 10 20:55:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * Update Swedish and Russian translation
+
 Sun Jan  9 16:11:39 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
   * Merge patches from Josip Rodin:

+ 1 - 1
Makefile.in

@@ -8,7 +8,7 @@ GENFILES	= version.h
 
 include Makefile.conf
 
-SUBDIRS		= include lib optlib dpkg-deb split scripts utils main \
+SUBDIRS		= include lib optlib intl dpkg-deb split scripts utils main \
 		  utils @DSELECTDIR@ po methods doc
 
 all: version.h all-recursive

+ 4 - 2
configure.in

@@ -98,9 +98,11 @@ AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(unsigned long)
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_TYPE(ptrdiff_t,int)
-AC_CHECK_FUNCS(unsetenv alphasort scandir strerror strsignal strtoul vsnprintf lchown)
+AC_CHECK_FUNCS(unsetenv alphasort scandir strerror strsignal strtoul)
+AC_CHECK_FUNCS(vsnprintf lchown snprintf)
 AC_CHECK_HEADERS(sys/cdefs.h sys/sysinfo.h syslog.h stddef.h)
 AC_CHECK_HEADERS(error.h hurd.h ps.h hurd/ihash.h)
+AC_SYS_SIGLIST_DECLARED
 
 AC_CHECK_LIB(shouldbeinlibc, fmt_past_time)
 AC_CHECK_LIB(ps, proc_stat_list_pid_proc_stat)
@@ -120,7 +122,7 @@ fi
 
 AC_TRY_COMPILE([
 #include <sys/types.h>
-#include <sys/dir.h>
+#include <dirent.h>
 ], alphasort, AC_DEFINE(HAVE_ALPHASORT_DECLARATION))
 
 AC_TRY_COMPILE(,[

+ 1 - 0
dpkg-deb/Makefile.in

@@ -2,6 +2,7 @@
 VPATH		= @srcdir@
 srcdir		= @srcdir@
 top_srcdir	= @top_srcdir@
+top_builddir	= ..
 
 include ../Makefile.conf
 

+ 1 - 0
dselect/Makefile.in

@@ -1,6 +1,7 @@
 VPATH		= @srcdir@
 srcdir		= @srcdir@
 top_srcdir	= @top_srcdir@
+top_builddir	= ..
 
 include ../Makefile.conf
 

+ 0 - 1
include/dpkg.h.in

@@ -26,7 +26,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <sys/types.h>
-#include <sys/sysinfo.h>
 
 #define ARCHIVEVERSION     "2.0"
 #define SPLITVERSION       "2.1"

+ 51 - 0
lib/compat.c

@@ -66,6 +66,20 @@ int vsnprintf (char *buf, size_t maxsize, const char *fmt, va_list al) {
 }
 #endif
 
+#ifndef HAVE_SNPRINTF
+int
+snprintf (char *str, size_t n, char const *format, ...)
+{
+  va_list ap;
+  int i;
+  (void)n;
+  va_start (ap, format);
+  i = vsprintf (str, format, ap);
+  va_end (ap);
+  return i;
+}
+#endif
+
 #ifndef HAVE_STRERROR
 extern const char *const sys_errlist[];
 extern const int sys_nerr;
@@ -87,6 +101,43 @@ const char *strsignal(int e) {
 }
 #endif
 
+#ifndef SYS_SIGLIST_DECLARED
+const char *const sys_siglist[32] = {
+  "SIGHUP",      /*1*/
+  "SIGINT",      /*2*/
+  "SIGQUIT",     /*3*/
+  "SIGILL",      /*4*/
+  "SIGTRAP",     /*5*/
+  "SIGABRT",     /*6*/
+  "SIGEMT",      /*7*/
+  "SIGFPE",      /*8*/
+  "SIGKILL",     /*9*/
+  "SIGUSR1",     /*10*/
+  "SIGSEGV",     /*11*/
+  "SIGUSR2",     /*12*/
+  "SIGPIPE",     /*13*/
+  "SIGALRM",     /*14*/
+  "SIGTERM",     /*15*/
+  "SIGSTKFLT",   /*16*/
+  "SIGCHLD",     /*17*/
+  "SIGCONT",     /*18*/
+  "SIGSTOP",     /*19*/
+  "SIGTSTP",     /*20*/
+  "SIGTTIN",     /*21*/
+  "SIGTTOU",     /*22*/
+  "SIGXXX",      /*23*/
+  "SIGXXX",      /*24*/
+  "SIGXXX",      /*25*/
+  "SIGXXX",      /*26*/
+  "SIGXXX",      /*27*/
+  "SIGXXX",      /*28*/
+  "SIGXXX",      /*29*/
+  "SIGXXX",      /*30*/
+  "SIGXXX",      /*31*/
+  "SIGXXX"       /*32*/
+};
+#endif
+
 #ifndef HAVE_SCANDIR
 
 static int (*scandir_comparfn)(const void*, const void*);

+ 1 - 0
main/Makefile.in

@@ -1,6 +1,7 @@
 VPATH		= @srcdir@
 srcdir		= @srcdir@
 top_srcdir	= @top_srcdir@
+top_builddir	= ..
 
 include ../Makefile.conf
 

+ 1 - 0
split/Makefile.in

@@ -2,6 +2,7 @@
 VPATH		= @srcdir@
 srcdir		= @srcdir@
 top_srcdir	= @top_srcdir@
+top_builddir = ..
 
 include ../Makefile.conf