[cmucl-commit] [git] CMU Common Lisp branch master updated. snapshot-2013-03-a-2-gf51ee9d
Raymond Toy
rtoy at common-lisp.net
Sat Mar 23 03:10:34 UTC 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".
The branch, master has been updated
via f51ee9dc1f66b02f7a9a0826b70550f3bc9fb222 (commit)
from 1e8b06be53f874e64d4f687247188349388fb1b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f51ee9dc1f66b02f7a9a0826b70550f3bc9fb222
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Fri Mar 22 20:10:16 2013 -0700
Try to be careful about extracting the linux version from the (uname)
release. Some Debian versions have a release name like "3.7-trunk",
which is missing the patch version.
diff --git a/src/lisp/Linux-os.c b/src/lisp/Linux-os.c
index 296ff2a..cbd25fd 100644
--- a/src/lisp/Linux-os.c
+++ b/src/lisp/Linux-os.c
@@ -76,12 +76,26 @@ check_personality(struct utsname *name, char *const *argv, char *const *envp)
#if defined(__i386) || defined(__x86_64)
int major_version, minor_version, patch_version;
char *p;
+
p = name->release;
major_version = atoi(p);
- p = strchr(p,'.')+1;
- minor_version = atoi(p);
- p = strchr(p,'.')+1;
- patch_version = atoi(p);
+
+ /*
+ * Try to extract the minor and patch version, but if we can't
+ * just set it to zero. In particular, some Debian systems have a
+ * release like "3.7-trunk-686-pae" which is missing the patch
+ * version.
+ */
+
+ p = strchr(p,'.');
+ if (p) {
+ minor_version = atoi(p + 1);
+ p = strchr(p + 1,'.');
+ patch_version = p ? atoi(p + 1) : 0;
+ } else {
+ minor_version = 0;
+ patch_version = 0;
+ }
if ((major_version == 2
/* Some old kernels will apparently lose unsupported personality flags
-----------------------------------------------------------------------
Summary of changes:
src/lisp/Linux-os.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-commit
mailing list