]> andersk Git - test.git/commitdiff
Fixed assertion failure, when loading empty style files and using a more modern
authorMarkus Gutschke <markus@shellinabox.com>
Fri, 9 Jul 2010 16:10:21 +0000 (16:10 +0000)
committerMarkus Gutschke <markus@shellinabox.com>
Fri, 9 Jul 2010 16:10:21 +0000 (16:10 +0000)
version of glibc.

Fixed incorrect autoconf detection of isnan() support when using glibc and more
recent versions of gcc.

config.h
configure
configure.ac
demo/vt100.js
shellinabox/shell_in_a_box.js
shellinabox/usercss.c
shellinabox/vt100.js

index 31c1dcc07b62a6fa63cdf179448a962910f0e89f..d4dc1d120f57c40c39cca329856d879b9a27f2b2 100644 (file)
--- a/config.h
+++ b/config.h
 #define STDC_HEADERS 1
 
 /* Most recent revision number in the version control system */
-#define VCS_REVISION "208"
+#define VCS_REVISION "209"
 
 /* Version number of package */
 #define VERSION "2.10"
index 47f3cabab20ce9a52e03fb258e89bcd67a763bb9..f7f45de7d03b1558095d91bf6ea620d59ad2374a 100755 (executable)
--- a/configure
+++ b/configure
@@ -2328,7 +2328,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-VCS_REVISION=208
+VCS_REVISION=209
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10720,7 +10720,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 int
 main ()
 {
-isnan(0.0);
+if (isnan(0.0)) return 1;
   ;
   return 0;
 }
index 511cc3212a8b210a3f8a119415ffaf0d0cb1bac6..0e20240ba7d7c75bec8790c1ad9a9c04987a9a47 100644 (file)
@@ -2,7 +2,7 @@ AC_PREREQ(2.57)
 
 dnl This is the one location where the authoritative version number is stored
 AC_INIT(shellinabox, 2.10, markus@shellinabox.com)
-VCS_REVISION=208
+VCS_REVISION=209
 AC_SUBST(VCS_REVISION)
 AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
                    [Most recent revision number in the version control system])
@@ -57,7 +57,7 @@ AC_TRY_LINK([#include <pthread.h>
 
 dnl Not every system has support for isnan()
 AC_TRY_LINK([#include <math.h>],
-            [isnan(0.0);],
+            [if (isnan(0.0)) return 1;],
             [AC_DEFINE(HAVE_ISNAN, 1,
                        Define to 1 if you have support for isnan)])
 
index 0e83bb61a53b743fcdb2e1a24ac1edfb7163081a..4976ddb6712da14ca860c5b7dca23b2f1f5691ad 100644 (file)
@@ -1955,7 +1955,7 @@ VT100.prototype.toggleBell = function() {
 };
 
 VT100.prototype.about = function() {
-  alert("VT100 Terminal Emulator " + "2.10 (revision 208)" +
+  alert("VT100 Terminal Emulator " + "2.10 (revision 209)" +
         "\nCopyright 2008-2010 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com");
 };
index ddf5c6314d813513183ad3b14a69100981f56aca..f34d87ee8433ed6b92673b19d2d3f7448cad09ec 100644 (file)
@@ -358,7 +358,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
 };
 
 ShellInABox.prototype.about = function() {
-  alert("Shell In A Box version " + "2.10 (revision 208)" +
+  alert("Shell In A Box version " + "2.10 (revision 209)" +
         "\nCopyright 2008-2010 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com" +
         (typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
index 6be9b3e700253b6a0c2170c1d801e0dce015e573..09da5eefeeedf6c82afdf64ea777dd23385f0ad5 100644 (file)
@@ -76,7 +76,9 @@ static void readStylesheet(struct UserCSS *userCSS, const char *filename,
   FILE *fp;
   check(fp                = fdopen(fd, "r"));
   check(*style            = malloc(st.st_size + 1));
-  check(fread(*style, st.st_size, 1, fp) == 1);
+  if (st.st_size > 0) {
+    check(fread(*style, st.st_size, 1, fp) == 1);
+  }
   (*style)[st.st_size]    = '\000';
   *len                    = st.st_size;
   fclose(fp);
index 0e83bb61a53b743fcdb2e1a24ac1edfb7163081a..4976ddb6712da14ca860c5b7dca23b2f1f5691ad 100644 (file)
@@ -1955,7 +1955,7 @@ VT100.prototype.toggleBell = function() {
 };
 
 VT100.prototype.about = function() {
-  alert("VT100 Terminal Emulator " + "2.10 (revision 208)" +
+  alert("VT100 Terminal Emulator " + "2.10 (revision 209)" +
         "\nCopyright 2008-2010 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com");
 };
This page took 0.051354 seconds and 5 git commands to generate.