summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth/auth.c12
-rw-r--r--configure.in8
-rw-r--r--console-client/xkb/compose.c6
3 files changed, 21 insertions, 5 deletions
diff --git a/auth/auth.c b/auth/auth.c
index ec738ce2..ba02b963 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -342,7 +342,11 @@ S_auth_user_authenticate (struct authhandle *userauth,
/* We were interrupted; remove our record. */
{
hurd_ihash_locp_remove (&pending_users, u.locp);
- err = EINTR;
+
+ /* Was it a normal interruption or did RENDEZVOUS die? */
+ mach_port_type_t type;
+ mach_port_type (mach_task_self (), rendezvous, &type);
+ err = type & MACH_PORT_TYPE_DEAD_NAME ? EINVAL : EINTR;
}
mutex_unlock (&pending_lock);
@@ -403,7 +407,11 @@ S_auth_server_authenticate (struct authhandle *serverauth,
/* We were interrupted; remove our record. */
{
hurd_ihash_locp_remove (&pending_servers, s.locp);
- err = EINTR;
+
+ /* Was it a normal interruption or did RENDEZVOUS die? */
+ mach_port_type_t type;
+ mach_port_type (mach_task_self (), rendezvous, &type);
+ err = type & MACH_PORT_TYPE_DEAD_NAME ? EINVAL : EINTR;
}
else
{
diff --git a/configure.in b/configure.in
index 0891aecc..73598cfc 100644
--- a/configure.in
+++ b/configure.in
@@ -248,6 +248,13 @@ PKG_CHECK_MODULES([X11], [x11 xproto],
AC_MSG_RESULT([$XKB_BASE])],
[XKB_BASE="$datadir/X11/xkb"
AC_MSG_RESULT([(default) $XKB_BASE])])
+ AC_MSG_CHECKING([for X11 prefix])
+ _PKG_CONFIG([X11_PREFIX], [variable=prefix], [x11])
+ AS_IF([test $pkg_failed = no],
+ [X11_PREFIX="$pkg_cv_X11_PREFIX"
+ AC_MSG_RESULT([$X11_PREFIX])],
+ [X11_PREFIX="$prefix"
+ AC_MSG_RESULT([(default) $X11_PREFIX])])
have_keysymdef_h=no
AC_CHECK_HEADER([X11/keysymdef.h],
@@ -269,6 +276,7 @@ PKG_CHECK_MODULES([X11], [x11 xproto],
])
AC_SUBST([have_x11])
AC_SUBST([XKB_BASE])
+AC_DEFINE_UNQUOTED([X11_PREFIX], "$X11_PREFIX")
AC_SUBST([X11_KEYSYMDEF_H])
# Check for Sun RPC headers and library.
diff --git a/console-client/xkb/compose.c b/console-client/xkb/compose.c
index 65854e14..78bce7ff 100644
--- a/console-client/xkb/compose.c
+++ b/console-client/xkb/compose.c
@@ -548,7 +548,7 @@ get_compose_file_for_locale()
}
context.value = setlocale (LC_ALL, NULL);
- map_iterate (DATADIR "/X11/locale/locale.alias", match_left_set_right, &context);
+ map_iterate (X11_PREFIX "/share/X11/locale/locale.alias", match_left_set_right, &context);
to_be_freed = context.result;
if (context.result != NULL)
@@ -557,12 +557,12 @@ get_compose_file_for_locale()
context.value = context.result;
}
context.result = NULL;
- map_iterate (DATADIR "/X11/locale/compose.dir", match_right_set_left, &context);
+ map_iterate (X11_PREFIX "/share/X11/locale/compose.dir", match_right_set_left, &context);
free (to_be_freed);
/* compose.dir contains relative paths to compose files. */
to_be_freed = context.result;
- err = asprintf (&context.result, DATADIR "/X11/locale/%s", context.result);
+ err = asprintf (&context.result, X11_PREFIX "/share/X11/locale/%s", context.result);
if (err == -1)
context.result = NULL;