From: Wichert Akkerman Date: Tue, 11 Jan 2000 19:41:53 +0000 (+0000) Subject: Bunch of changes to make dpkg compile on HP-UX X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a98b54799ca6c42fdff47fc1c585926e2379dc1d;p=dpkg Bunch of changes to make dpkg compile on HP-UX --- diff --git a/ChangeLog b/ChangeLog index f7e576e9..00fbb087 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,15 @@ -Mon Jan 10 20:55:45 CET 2000 Wichert Akkerman - - * Update Swedish and Russian translation +Tue Jan 11 18:32:52 CET 2000 Wichert Akkerman + + * 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 @@ -13,6 +22,10 @@ Tue Jan 11 02:02:00 CET 2000 Wichert Akkerman * 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 + + * Update Swedish and Russian translation + Sun Jan 9 16:11:39 CET 2000 Wichert Akkerman * Merge patches from Josip Rodin: diff --git a/Makefile.in b/Makefile.in index 446c852f..5120232a 100644 --- a/Makefile.in +++ b/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 diff --git a/configure.in b/configure.in index 1320e1f3..73c938f1 100644 --- a/configure.in +++ b/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 -#include +#include ], alphasort, AC_DEFINE(HAVE_ALPHASORT_DECLARATION)) AC_TRY_COMPILE(,[ diff --git a/dpkg-deb/Makefile.in b/dpkg-deb/Makefile.in index f3d9c6cf..12fc0393 100644 --- a/dpkg-deb/Makefile.in +++ b/dpkg-deb/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +top_builddir = .. include ../Makefile.conf diff --git a/dselect/Makefile.in b/dselect/Makefile.in index 3eefba7a..4b428e6d 100644 --- a/dselect/Makefile.in +++ b/dselect/Makefile.in @@ -1,6 +1,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +top_builddir = .. include ../Makefile.conf diff --git a/include/dpkg.h.in b/include/dpkg.h.in index 00444f49..b053969d 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -26,7 +26,6 @@ #include #include #include -#include #define ARCHIVEVERSION "2.0" #define SPLITVERSION "2.1" diff --git a/lib/compat.c b/lib/compat.c index b5cd17cb..77fa21a5 100644 --- a/lib/compat.c +++ b/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*); diff --git a/main/Makefile.in b/main/Makefile.in index 9d4f3a03..2ad03719 100644 --- a/main/Makefile.in +++ b/main/Makefile.in @@ -1,6 +1,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +top_builddir = .. include ../Makefile.conf diff --git a/split/Makefile.in b/split/Makefile.in index fcdf95f3..27f55ba2 100644 --- a/split/Makefile.in +++ b/split/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +top_builddir = .. include ../Makefile.conf