+Tue Apr 15 11:32:22 CDT 2003 Adam Heath <doogie@debian.org>
+
+ * archtable, utils/start-stop-daemon.c, scripts/dpkg-architecture.pl:
+ Add netbsd support.
+ * scripts/dpkg-architecture.pl: Support hypenated values.
+
Tue Apr 15 01:05:04 CDT 2003 Adam Heath <doogie@debian.org>
* config.sub, config.guess: Updated.
'ia64', 'ia64-linux',
'openbsd-i386', 'i386-openbsd',
'freebsd-i386', 'i386-freebsd',
+ 'netbsd-i386', 'i386-netbsdelf-gnu',
'darwin-powerpc', 'powerpc-darwin',
'darwin-i386', 'i386-darwin');
}
chomp $deb_build_arch;
$deb_build_gnu_type = $archtable{$deb_build_arch};
-$deb_build_gnu_cpu = $deb_build_gnu_type;
-$deb_build_gnu_system = $deb_build_gnu_type;
-$deb_build_gnu_cpu =~ s/-.*$//;
-$deb_build_gnu_system =~ s/^.*-//;
+@deb_build_gnu_triple = split(/-/, $deb_build_gnu_type, 2);
+$deb_build_gnu_cpu = $deb_build_gnu_triple[0];
+$deb_build_gnu_system = $deb_build_gnu_triple[1];
# Default host: Current gcc.
$gcc = `\${CC:-gcc} --print-libgcc-file-name`;
$gcc=$archtable{$list[0]};
$deb_host_arch = $list[0];
$deb_host_gnu_type = $gcc;
- ($deb_host_gnu_system = $gcc) =~ s/^.*-//;
- ($deb_host_gnu_cpu = $gcc ) =~ s/-.*$//;
+ @deb_host_gnu_triple = split(/-/, $deb_host_gnu_type, 2);
+ $deb_host_gnu_cpu = $deb_host_gnu_triple[0];
+ $deb_host_gnu_system = $deb_host_gnu_triple[1];
}
}
if (!defined($deb_host_arch)) {
$deb_host_arch = $req_host_arch if $req_host_arch ne '';
if ($req_host_gnu_type ne '') {
- $deb_host_gnu_cpu = $deb_host_gnu_system = $deb_host_gnu_type = $req_host_gnu_type;
- $deb_host_gnu_cpu =~ s/-.*$//;
- $deb_host_gnu_system =~ s/^.*-//;
+ $deb_host_gnu_type = $req_host_gnu_type;
+ @deb_host_gnu_triple = split(/-/, $deb_host_gnu_type, 2);
+ $deb_host_gnu_cpu = $deb_host_gnu_triple[0];
+ $deb_host_gnu_system = $deb_host_gnu_triple[1];
}
#$gcc = `\${CC:-gcc} --print-libgcc-file-name`;
# define OShpux
#elif defined(__FreeBSD__)
# define OSFreeBSD
+#elif defined(__NetBSD__)
+# define OSNetBSD
#else
# error Unknown architecture - cannot build start-stop-daemon
#endif
# include <ps.h>
#endif
-#if defined(OSOpenBSD) || defined(OSFreeBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
{
#if defined(OSLinux) || defined(OShpux)
if (execname && !pid_is_exec(pid, &exec_stat))
-#elif defined(OSHURD) || defined(OSFreeBSD)
+#elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD)
/* I will try this to see if it works */
if (execname && !pid_is_cmd(pid, execname))
#endif
#endif /* OSHURD */
-#if defined(OSOpenBSD) || defined(OSFreeBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
static int
pid_is_cmd(pid_t pid, const char *name)
{