diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2012-09-11 15:27:09 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2012-09-11 15:27:09 -0700 |
commit | a40f539487bc213b8c45273362611abdf76caac3 (patch) | |
tree | 3f124e1948edd58bf45ac10147d31c9ce9bd76cb | |
parent | 3b72dbd7809280fe38568bb32c6c0b93303d4446 (diff) |
304.48304.48
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | kernel.c | 8 | ||||
-rw-r--r-- | misc.c | 11 | ||||
-rw-r--r-- | version.mk | 2 |
4 files changed, 13 insertions, 9 deletions
@@ -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) \ @@ -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)); @@ -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; } @@ -1 +1 @@ -NVIDIA_VERSION = 304.43 +NVIDIA_VERSION = 304.48 |