idle sunday afternoon...
>From 25c0f7caa1c0cc82533cbf112f7deed9fb0ecf9d Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Sun, 26 Sep 2010 17:36:47 +0200
Subject: [PATCH] More precise information on unknown systems
Signed-off-by: Tamas TEVESZ <[email protected]>
---
configure.ac | 1 -
src/osdep_stub.c | 25 +++++++++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 53b81c1..d8ce1ce 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 187ca92..79fe9c1 100644
--- a/src/osdep_stub.c
+++ b/src/osdep_stub.c
@@ -1,24 +1,29 @@
+#include <sys/utsname.h>
+
#include <WINGs/WUtil.h>
#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 [email protected] 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 [email protected] you are
running "
+ "%s release %s version %s"), __FUNCTION__,
+ un.sysname, un.release, un.version);
+ notified = 1;
+ }
+
}
+ *argv = NULL;
+ *argc = 0;
+
return False;
}
--
1.7.0.4
--
[-]
mkdir /nonexistentFrom 25c0f7caa1c0cc82533cbf112f7deed9fb0ecf9d Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Sun, 26 Sep 2010 17:36:47 +0200
Subject: [PATCH] More precise information on unknown systems
Signed-off-by: Tamas TEVESZ <[email protected]>
---
configure.ac | 1 -
src/osdep_stub.c | 25 +++++++++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 53b81c1..d8ce1ce 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 187ca92..79fe9c1 100644
--- a/src/osdep_stub.c
+++ b/src/osdep_stub.c
@@ -1,24 +1,29 @@
+#include <sys/utsname.h>
+
#include <WINGs/WUtil.h>
#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 [email protected] 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 [email protected] you are running "
+ "%s release %s version %s"), __FUNCTION__,
+ un.sysname, un.release, un.version);
+ notified = 1;
+ }
+
}
+ *argv = NULL;
+ *argc = 0;
+
return False;
}
--
1.7.0.4