DragonFlyBSD support, from Joerg Sonnenberger.

This commit is contained in:
wiz 2005-07-13 13:10:27 +00:00
parent 9f9e4ac0a1
commit 21ae07902a
3 changed files with 85 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.24 2005/06/26 16:52:14 jmmv Exp $
$NetBSD: distinfo,v 1.25 2005/07/13 13:10:27 wiz Exp $
SHA1 (gdm-2.8.0.0.tar.bz2) = d97e2e489e84094151a795b6e4c3631b3a69deb9
RMD160 (gdm-2.8.0.0.tar.bz2) = 97927daf7914b830b0fabd8569bfa4084530fd14
@ -16,3 +16,5 @@ SHA1 (patch-ae) = 55b66f0f32701f6911db88c0b7da29758a7b2b95
SHA1 (patch-af) = 467afc3ee4d555fac4d5d26e49c3ff8b098e7369
SHA1 (patch-ag) = 467552a6da5c83fcc3a37e59d1f4cd63241dee0d
SHA1 (patch-ah) = bbd92c7051479e54cce1182e54aca165c43e5ca4
SHA1 (patch-ai) = 263b4a326574bdbf03a350028e157427b36144f4
SHA1 (patch-aj) = 4aa63ab6e190dc80c298e6317e7f7882f5a319f9

60
x11/gdm/patches/patch-ai Normal file
View file

@ -0,0 +1,60 @@
$NetBSD: patch-ai,v 1.3 2005/07/13 13:10:27 wiz Exp $
--- daemon/getvt.c.orig 2005-07-10 09:22:22.000000000 +0000
+++ daemon/getvt.c
@@ -18,16 +18,16 @@
extern int GdmFirstVT;
extern gboolean GdmVTAllocation;
-#if defined (__linux__) || defined (__FreeBSD__)
+#if defined (__linux__) || defined (__FreeBSD__) || defined(__DragonFly__)
#ifdef __linux__
#include <sys/vt.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/consio.h>
#endif
-#ifdef __FreeBSD__
+#if defined( __FreeBSD__) || defined(__DragonFly__)
static const char*
__itovty(int val)
{
@@ -51,7 +51,7 @@ open_vt (int vtno)
#if defined (__linux__)
vtname = g_strdup_printf ("/dev/tty%d", vtno);
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
vtname = g_strdup_printf ("/dev/ttyv%s", __itovty(vtno - 1));
#endif
do {
@@ -104,7 +104,7 @@ get_free_vt (int *vtfd)
#if defined (__linux__)
if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) || (vtno == -1)) {
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
if (ioctl(fd, VT_OPENQRY, &vtno) == -1) {
#endif
vtno = -1;
@@ -177,7 +177,7 @@ gdm_get_cur_vt (void)
{
#if defined (__linux__)
struct vt_stat s;
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
int vtno;
#endif
int fd;
@@ -203,7 +203,7 @@ gdm_get_cur_vt (void)
*/
return s.v_active;
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
if (ioctl (fd, VT_GETACTIVE, &vtno) == -1) {
VE_IGNORE_EINTR (close (fd));
return -1;

22
x11/gdm/patches/patch-aj Normal file
View file

@ -0,0 +1,22 @@
$NetBSD: patch-aj,v 1.1 2005/07/13 13:10:27 wiz Exp $
--- daemon/gdm.c.orig 2005-07-10 09:24:31.000000000 +0000
+++ daemon/gdm.c
@@ -4249,7 +4249,7 @@ gdm_handle_user_message (GdmConnection *
return;
}
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
gdm_connection_printf (conn, "OK %d\n", gdm_get_cur_vt ());
#else
gdm_connection_write (conn, "ERROR 8 Virtual terminals not supported\n");
@@ -4275,7 +4275,7 @@ gdm_handle_user_message (GdmConnection *
return;
}
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
gdm_change_vt (vt);
for (li = displays; li != NULL; li = li->next) {
GdmDisplay *disp = li->data;