From c5f5e0b9c07db08003dd54494ad91ec380194632 Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Sun, 26 Sep 2010 17:36:47 +0200 Subject: [PATCH] More precise information on unknown systems Signed-off-by: Tamas TEVESZ --- configure.ac | 1 - src/osdep_stub.c | 25 +++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 7cd56a97..9afae793 100644 --- a/configure.ac +++ b/configure.ac @@ -105,7 +105,6 @@ case "${host}" in ;; *) WM_OSDEP="stub" - CFLAGS="-DSTUB_HINT=\\\"${host}\\\"" ;; esac AC_SUBST(WM_OSDEP) diff --git a/src/osdep_stub.c b/src/osdep_stub.c index 187ca928..79fe9c16 100644 --- a/src/osdep_stub.c +++ b/src/osdep_stub.c @@ -1,24 +1,29 @@ +#include + #include #include "wconfig.h" -#ifndef STUB_HINT -#define STUB_HINT "(unknown)" -#endif - Bool GetCommandForPid(int pid, char ***argv, int *argc) { - *argv = NULL; - *argc = 0; static int notified = 0; if (!notified) { - wwarning(_("%s is not implemented on this platform; " - "tell wmaker-dev@lists.windowmaker.info you are running \"%s\""), - __FUNCTION__, STUB_HINT); - notified = 1; + struct utsname un; + + if (uname(&un) != -1) { + wwarning(_("%s is not implemented on this platform; " + "tell wmaker-dev@windowmaker.org you are running " + "%s release %s version %s"), __FUNCTION__, + un.sysname, un.release, un.version); + notified = 1; + } + } + *argv = NULL; + *argc = 0; + return False; } -- 2.11.4.GIT