summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2012-09-11 15:27:09 -0700
committerAaron Plattner <aplattner@nvidia.com>2012-09-11 15:27:09 -0700
commita40f539487bc213b8c45273362611abdf76caac3 (patch)
tree3f124e1948edd58bf45ac10147d31c9ce9bd76cb
parent3b72dbd7809280fe38568bb32c6c0b93303d4446 (diff)
304.48304.48
-rw-r--r--Makefile1
-rw-r--r--kernel.c8
-rw-r--r--misc.c11
-rw-r--r--version.mk2
4 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 523f132..91bd04f 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,6 @@ $(MKPRECOMPILED): $(MKPRECOMPILED_OBJS)
$(MAKESELF_HELP_SCRIPT): $(MAKESELF_HELP_SCRIPT_OBJS)
$(call quiet_cmd,HOST_LINK) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
$(HOST_BIN_LDFLAGS) $(MAKESELF_HELP_SCRIPT_OBJS) -o $@
- $(call quiet_cmd,STRIP_CMD) $@
$(NVIDIA_INSTALLER): $(INSTALLER_OBJS)
$(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(PCI_LDFLAGS) \
diff --git a/kernel.c b/kernel.c
index 7bd0d74..609bd4f 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1806,7 +1806,7 @@ static char *guess_kernel_module_filename(Options *op)
/*
* get_machine_arch() - get the machine architecture, substituting
- * i386 for i586 and i686.
+ * i386 for i586 and i686 or arm for arm7l.
*/
static char __machine_arch[16];
@@ -1820,9 +1820,11 @@ char *get_machine_arch(Options *op)
strerror(errno));
return NULL;
} else {
- if ((strncmp(uname_buf.machine, "i586", 3) == 0) ||
- (strncmp(uname_buf.machine, "i686", 3) == 0)) {
+ if ((strncmp(uname_buf.machine, "i586", 4) == 0) ||
+ (strncmp(uname_buf.machine, "i686", 4) == 0)) {
strcpy(__machine_arch, "i386");
+ } else if ((strncmp(uname_buf.machine, "armv", 4) == 0)) {
+ strcpy(__machine_arch, "arm");
} else {
strncpy(__machine_arch, uname_buf.machine,
sizeof(__machine_arch));
diff --git a/misc.c b/misc.c
index f020cac..97df15f 100644
--- a/misc.c
+++ b/misc.c
@@ -243,16 +243,19 @@ char *get_next_line(char *buf, char **end, char *start, int length)
if (end) *end = NULL;
+ // Cast all char comparisons to EOF to signed char in order to
+ // allow proper sign extension on platforms like GCC ARM where
+ // char is unsigned char
if ((!buf) ||
__AT_END(start, buf, length) ||
(*buf == '\0') ||
- (*buf == EOF)) return NULL;
+ (((signed char)*buf) == EOF)) return NULL;
c = buf;
while ((!__AT_END(start, c, length)) &&
(*c != '\0') &&
- (*c != EOF) &&
+ (((signed char)*c) != EOF) &&
(*c != '\n') &&
(*c != '\r')) c++;
@@ -264,12 +267,12 @@ char *get_next_line(char *buf, char **end, char *start, int length)
if (end) {
while ((!__AT_END(start, c, length)) &&
(*c != '\0') &&
- (*c != EOF) &&
+ (((signed char)*c) != EOF) &&
(!isprint(*c))) c++;
if (__AT_END(start, c, length) ||
(*c == '\0') ||
- (*c == EOF)) *end = NULL;
+ (((signed char)*c) == EOF)) *end = NULL;
else *end = c;
}
diff --git a/version.mk b/version.mk
index 7753329..6de12aa 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 304.43
+NVIDIA_VERSION = 304.48