]> andersk Git - test.git/commitdiff
Some changes to improve compatibility with MacOS X.
authorMarkus Gutschke <markus@shellinabox.com>
Wed, 29 Sep 2010 06:28:58 +0000 (06:28 +0000)
committerMarkus Gutschke <markus@shellinabox.com>
Wed, 29 Sep 2010 06:28:58 +0000 (06:28 +0000)
18 files changed:
config.h
config.h.in
configure
configure.ac
demo/vt100.js
libhttp/httpconnection.c
libhttp/server.c
libhttp/ssl.c
libhttp/url.c
shellinabox/launcher.c
shellinabox/privileges.c
shellinabox/privileges.h
shellinabox/service.c
shellinabox/session.c
shellinabox/shell_in_a_box.js
shellinabox/shellinaboxd.c
shellinabox/usercss.c
shellinabox/vt100.js

index c338884e1138f082b39c1980436cd89bc98f9201..1d7dbe510f20d7780abb23ab1ff226e4af207420 100644 (file)
--- a/config.h
+++ b/config.h
@@ -4,6 +4,9 @@
 /* Define to 1 if you have support for symbol aliasing */
 #define HAVE_ATTRIBUTE_ALIAS 1
 
+/* Define to 1 if you have support for the "unused" attribute */
+#define HAVE_ATTRIBUTE_UNUSED 1
+
 /* Set if you want support for calling /bin/login */
 #define HAVE_BIN_LOGIN 1
 
 /* Define to 1 if you have the `getpwuid_r' function. */
 #define HAVE_GETPWUID_R 1
 
+/* Define to 1 if you have the `getresgid' function. */
+#define HAVE_GETRESGID 1
+
+/* Define to 1 if you have the `getresuid' function. */
+#define HAVE_GETRESUID 1
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
 
 /* Define to 1 if you have the <security/pam_misc.h> header file. */
 #define HAVE_SECURITY_PAM_MISC_H 1
 
+/* Define to 1 if you have the `setresgid' function. */
+#define HAVE_SETRESGID 1
+
+/* Define to 1 if you have the `setresuid' function. */
+#define HAVE_SETRESUID 1
+
 /* Define to 1 if you have a working sigwait */
 #define HAVE_SIGWAIT 1
 
 #define STDC_HEADERS 1
 
 /* Most recent revision number in the version control system */
-#define VCS_REVISION "230"
+#define VCS_REVISION "231"
 
 /* Version number of package */
 #define VERSION "2.10"
index 9d5e516c2496c67164dc11987453d953d7b9533e..94f67379438c0fbbbff209562ddbd7d7333e250a 100644 (file)
@@ -3,6 +3,9 @@
 /* Define to 1 if you have support for symbol aliasing */
 #undef HAVE_ATTRIBUTE_ALIAS
 
+/* Define to 1 if you have support for the "unused" attribute */
+#undef HAVE_ATTRIBUTE_UNUSED
+
 /* Set if you want support for calling /bin/login */
 #undef HAVE_BIN_LOGIN
 
 /* Define to 1 if you have the `getpwuid_r' function. */
 #undef HAVE_GETPWUID_R
 
+/* Define to 1 if you have the `getresgid' function. */
+#undef HAVE_GETRESGID
+
+/* Define to 1 if you have the `getresuid' function. */
+#undef HAVE_GETRESUID
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
 /* Define to 1 if you have the <security/pam_misc.h> header file. */
 #undef HAVE_SECURITY_PAM_MISC_H
 
+/* Define to 1 if you have the `setresgid' function. */
+#undef HAVE_SETRESGID
+
+/* Define to 1 if you have the `setresuid' function. */
+#undef HAVE_SETRESUID
+
 /* Define to 1 if you have a working sigwait */
 #undef HAVE_SIGWAIT
 
index 5b22ad2537b0aa3a07818efae9ab532122f6ebe5..78d38d841478fe6fa1378c26ad6d5d8ffbed6aea 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=230
+VCS_REVISION=231
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10655,7 +10655,7 @@ done
 
 
 for ac_func in getgrgid_r getgrnam_r gethostbyname_r getpwnam_r getpwuid_r  \
-                openpty strcasestr
+                openpty strcasestr getresuid getresgid setresuid setresgid
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -10786,6 +10786,25 @@ if ac_fn_c_try_link "$LINENO"; then :
 
 $as_echo "#define HAVE_ATTRIBUTE_ALIAS 1" >>confdefs.h
 
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+void x(int i __attribute__((unused))) __attribute__((unused));
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
+
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
index 994966243607eb60a17e0bb9df100ec69ff65b26..b7e56b80889619f9950a15944ffe2afaf49bbea8 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=230
+VCS_REVISION=231
 AC_SUBST(VCS_REVISION)
 AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
                    [Most recent revision number in the version control system])
@@ -34,7 +34,7 @@ AC_CHECK_FUNCS([strlcat])
 
 dnl Prefer thread-safe functions, if available
 AC_CHECK_FUNCS([getgrgid_r getgrnam_r gethostbyname_r getpwnam_r getpwuid_r  \
-                openpty strcasestr ])
+                openpty strcasestr getresuid getresgid setresuid setresgid ])
 
 dnl We prefer ptsname_r(), but will settle for ptsname() if necessary
 AC_TRY_LINK([#ifndef _XOPEN_SOURCE
@@ -78,6 +78,12 @@ AC_TRY_LINK([void x(void) { };
             [AC_DEFINE(HAVE_ATTRIBUTE_ALIAS, 1,
                        Define to 1 if you have support for symbol aliasing)])
 
+dnl Check if the compiler has support to mark parameters as unused
+AC_TRY_LINK([void x(int i __attribute__((unused))) __attribute__((unused));],
+            [],
+            [AC_DEFINE(HAVE_ATTRIBUTE_UNUSED, 1,
+                  Define to 1 if you have support for the "unused" attribute)])
+
 dnl On some systems, calling /bin/login does not work. Disable the LOGIN
 dnl feature, if the user tells us that it does not do the right thing.
 AC_ARG_ENABLE(login,
index c29d0f807df1cb883e2d6d8f375cce0d7da224b2..46ebcf04941329b5eedf4a60abecafb46bde33c8 100644 (file)
@@ -2402,7 +2402,7 @@ VT100.prototype.toggleCursorBlinking = function() {
 };
 
 VT100.prototype.about = function() {
-  alert("VT100 Terminal Emulator " + "2.10 (revision 230)" +
+  alert("VT100 Terminal Emulator " + "2.10 (revision 231)" +
         "\nCopyright 2008-2010 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com");
 };
index ea1a0eb1e7fd8d599c23fbfbe6eee0adf53f0f88..fc42558550a1a00337f019d2eea5bbe972a2791f 100644 (file)
 #endif
 #define max(a, b) ({ typeof(a) _a = (a); typeof(b) _b = (b);                  \
                      _a > _b ? _a : _b; })
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
 
 #include "libhttp/httpconnection.h"
 #include "logging/logging.h"
@@ -270,8 +277,8 @@ static int httpFinishCommand(struct HttpConnection *http) {
   return rc;
 }
 
-static void httpDestroyHeaders(void *arg, char *key, char *value) {
-  (void)arg;
+static void httpDestroyHeaders(void *arg ATTR_UNUSED, char *key, char *value) {
+  UNUSED(arg);
   free(key);
   free(value);
 }
index 3b115869c5167e1449fa5d4c78f6e9c3ba60f0f8..d0ab1c7b0b87443804845cc596fb802b8656d0a9 100644 (file)
 #include "libhttp/ssl.h"
 #include "logging/logging.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 #define INITIAL_TIMEOUT    (10*60)
 
 // Maximum amount of payload (e.g. form values that have been POST'd) that we
@@ -128,8 +136,8 @@ static int serverCollectHandler(struct HttpConnection *http, void *handler_) {
 
 }
 
-static void serverDestroyHandlers(void *arg, char *value) {
-  (void)arg;
+static void serverDestroyHandlers(void *arg ATTR_UNUSED, char *value) {
+  UNUSED(arg);
   free(value);
 }
 
@@ -183,8 +191,9 @@ void serverRegisterWebSocketHandler(struct Server *server, const char *url,
   }
 }
 
-static int serverQuitHandler(struct HttpConnection *http, void *arg) {
-  (void)arg;
+static int serverQuitHandler(struct HttpConnection *http ATTR_UNUSED,
+                             void *arg) {
+  UNUSED(arg);
   httpSendReply(http, 200, "Good Bye", NO_MSG);
   httpExitLoop(http, 1);
   return HTTP_DONE;
index 987a990feead0d29f8a2dc626e3455aafb0df31c..aec3e0b856138a92e4f940c5727d654e900d4f6a 100644 (file)
 #include "libhttp/httpconnection.h"
 #include "logging/logging.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 #undef pthread_once
 #undef pthread_sigmask
 
@@ -541,8 +549,9 @@ static int sslSetCertificateFromFile(SSL_CTX *context,
 #endif
 
 #ifdef HAVE_TLSEXT
-static int sslSNICallback(SSL *sslHndl, int *al, struct SSLSupport *ssl) {
-  (void)al;
+static int sslSNICallback(SSL *sslHndl, int *al ATTR_UNUSED,
+                          struct SSLSupport *ssl) {
+  UNUSED(al);
   check(!ERR_peek_error());
   const char *name        = SSL_get_servername(sslHndl,
                                                TLSEXT_NAMETYPE_host_name);
@@ -615,10 +624,10 @@ static int sslSNICallback(SSL *sslHndl, int *al, struct SSLSupport *ssl) {
 // This is a not-thread-safe replacement for gethostbyname_r()
 #define gethostbyname_r x_gethostbyname_r
 static int gethostbyname_r(const char *name, struct hostent *ret,
-                           char *buf, size_t buflen,
+                           char *buf ATTR_UNUSED, size_t buflen ATTR_UNUSED,
                            struct hostent **result, int *h_errnop) {
-  (void)buf;
-  (void)buflen;
+  UNUSED(buf);
+  UNUSED(buflen);
   if (result) {
     *result          = NULL;
   }
index 088eea73d760b54cc4424f62f2f7fedf15622d98..dd410bb4fdaf81e5698d7cdf49a3f3b828d5aa34 100644 (file)
 
 #include "logging/logging.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 static char *urlUnescape(char *s) {
   int warned    = 0;
   char *r       = s;
@@ -86,8 +94,9 @@ static char *urlUnescape(char *s) {
   return r;
 }
 
-static void urlDestroyHashMapEntry(void *arg, char *key, char *value) {
-  (void)arg;
+static void urlDestroyHashMapEntry(void *arg ATTR_UNUSED, char *key,
+                                   char *value) {
+  UNUSED(arg);
   free(key);
   free(value);
 }
index 6bf5e34ed9873622cdfa68618a12b496069983e2..2065e12b039339e8dd0fcb2c7b2b20ff85d3f65c 100644 (file)
 #if defined(HAVE_SECURITY_PAM_MISC_H)
 #include <security/pam_misc.h>
 #endif
+
+#ifndef PAM_DATA_SILENT
+#define PAM_DATA_SILENT 0
+#endif
 #else
 struct pam_message;
 struct pam_response;
@@ -116,6 +120,14 @@ typedef struct pam_handle pam_handle_t;
 #include "libhttp/hashmap.h"
 #include "logging/logging.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 #undef pthread_once
 #undef execle
 int execle(const char *, const char *, ...);
@@ -562,9 +574,10 @@ void deleteUtmp(struct Utmp *utmp) {
   free(utmp);
 }
 
-static void destroyUtmpHashEntry(void *arg, char *key, char *value) {
-  (void)arg;
-  (void)key;
+static void destroyUtmpHashEntry(void *arg ATTR_UNUSED, char *key ATTR_UNUSED,
+                                 char *value) {
+  UNUSED(arg);
+  UNUSED(key);
   deleteUtmp((struct Utmp *)value);
 }
 
@@ -791,10 +804,11 @@ static const struct passwd *getPWEnt(uid_t uid) {
   return passwd;
 }
 
-static void sigAlrmHandler(int sig, siginfo_t *info, void *unused) {
-  (void)sig;
-  (void)info;
-  (void)unused;
+static void sigAlrmHandler(int sig ATTR_UNUSED, siginfo_t *info ATTR_UNUSED,
+                           void *unused ATTR_UNUSED) {
+  UNUSED(sig);
+  UNUSED(info);
+  UNUSED(unused);
   puts("\nLogin timed out after 60 seconds.");
   _exit(1);
 }
@@ -1079,17 +1093,18 @@ static pam_handle_t *internalLogin(struct Service *service, struct Utmp *utmp,
   return pam;
 }
 
-static void destroyVariableHashEntry(void *arg, char *key, char *value) {
-  (void)arg;
+static void destroyVariableHashEntry(void *arg ATTR_UNUSED, char *key,
+                                     char *value) {
+  UNUSED(arg);
   free(key);
   free(value);
 }
 
-static void execService(int width, int height, struct Service *service,
-                        const char *peerName, char **environment,
-                        const char *url) {
-  (void)width;
-  (void)height;
+static void execService(int width ATTR_UNUSED, int height ATTR_UNUSED,
+                        struct Service *service, const char *peerName,
+                        char **environment, const char *url) {
+  UNUSED(width);
+  UNUSED(height);
 
   // Create a hash table with all the variables that we can expand. This
   // includes all environment variables being passed to the child.
@@ -1450,10 +1465,11 @@ static void childProcess(struct Service *service, int width, int height,
   _exit(1);
 }
 
-static void sigChildHandler(int sig, siginfo_t *info, void *unused) {
-  (void)sig;
-  (void)info;
-  (void)unused;
+static void sigChildHandler(int sig ATTR_UNUSED, siginfo_t *info ATTR_UNUSED,
+                            void *unused ATTR_UNUSED) {
+  UNUSED(sig);
+  UNUSED(info);
+  UNUSED(unused);
 }
 
 static void launcherDaemon(int fd) {
index b7a9f6bbd9b012064fe84efcf8eba9f5447b81da..87ccfe51750a1fddeb9cb2b105b5850b8f78cc83 100644 (file)
@@ -63,6 +63,36 @@ int   runAsUser  = -1;
 int   runAsGroup = -1;
 
 
+#ifndef HAVE_GETRESUID
+int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid) {
+  *ruid = getuid();
+  *euid = geteuid();
+  *suid = -1;
+  return 0;
+}
+#endif
+
+#ifndef HAVE_GETRESGID
+int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid) {
+  *rgid = getgid();
+  *egid = getegid();
+  *sgid = -1;
+  return 0;
+}
+#endif
+
+#ifndef HAVE_SETRESUID
+int setresuid(uid_t ruid, uid_t euid, uid_t suid) {
+  return setreuid(ruid, euid);
+}
+#endif
+
+#ifndef HAVE_SETRESGID
+int setresgid(gid_t rgid, gid_t egid, gid_t sgid) {
+  return setregid(rgid, egid);
+}
+#endif
+
 static void removeGroupPrivileges(int showError) {
   gid_t rg, eg, sg;
   check(!getresgid(&rg, &eg, &sg));
index fe31e39f59c392ec0ba95665c116c56e2edfff7f..21711674343fd70f6b378c8322db0855b92cffac 100644 (file)
@@ -1,5 +1,5 @@
 // privileges.h -- Manage process privileges
-// Copyright (C) 2008-2009 Markus Gutschke <markus@shellinabox.com>
+// Copyright (C) 2008-2010 Markus Gutschke <markus@shellinabox.com>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License version 2 as
@@ -60,4 +60,17 @@ const char *getGroupName(gid_t gid);
 gid_t getGroupId(const char *name);
 gid_t parseGroup(const char *arg, const char **name);
 
+#ifndef HAVE_GETRESUID
+int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+#endif
+#ifndef HAVE_GETRESGID
+int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+#endif
+#ifndef HAVE_SETRESUID
+int setresuid(uid_t ruid, uid_t euid, uid_t suid);
+#endif
+#ifndef HAVE_SETRESGID
+int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
+#endif
+
 #endif
index a9e9b4cf8900c904250711faf86145127b96a4ae..7f83028d6a41901109637d16c2cbbb756e450891 100644 (file)
 #include "shellinabox/privileges.h"
 #include "shellinabox/service.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
 
 struct Service **services;
 int            numServices;
@@ -242,15 +249,17 @@ void deleteService(struct Service *service) {
   free(service);
 }
 
-void destroyServiceHashEntry(void *arg, char *key, char *value) {
-  (void)arg;
-  (void)key;
-  (void)value;
+void destroyServiceHashEntry(void *arg ATTR_UNUSED, char *key ATTR_UNUSED,
+                             char *value ATTR_UNUSED) {
+  UNUSED(arg);
+  UNUSED(key);
+  UNUSED(value);
 }
 
-static int enumerateServicesHelper(void *arg, const char *key, char **value) {
-  (void)arg;
-  (void)key;
+static int enumerateServicesHelper(void *arg ATTR_UNUSED,
+                                   const char *key ATTR_UNUSED, char **value) {
+  UNUSED(arg);
+  UNUSED(key);
 
   check(services              = realloc(services,
                                     ++numServices * sizeof(struct Service *)));
index 6644f2953a4747eab957f9c65d0d7dc8dde10499..f18203f7ffcffeacc7e60b04ef80ad1e6f94e508 100644 (file)
 #include "shellinabox/session.h"
 #include "logging/logging.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 static HashMap *sessions;
 
 
@@ -152,9 +160,10 @@ void finishAllSessions(void) {
   deleteHashMap(sessions);
 }
 
-static void destroySessionHashEntry(void *arg, char *key, char *value) {
-  (void)arg;
-  (void)key;
+static void destroySessionHashEntry(void *arg ATTR_UNUSED,
+                                    char *key ATTR_UNUSED, char *value) {
+  UNUSED(arg);
+  UNUSED(key);
 
   deleteSession((struct Session *)value);
 }
index 1fbda750cf7a62f6330fde0d61a99de5530827cb..0db22d2a60cdcf7492aaf4c3d864c6fdf9c1cf9e 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 230)" +
+  alert("Shell In A Box version " + "2.10 (revision 231)" +
         "\nCopyright 2008-2010 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com" +
         (typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
index 382d495e3e4e933088d57d5bd712c61adacdda91..d864b572256cd87797585600d8f5b21223d01f38 100644 (file)
 #include "shellinabox/styles.h"
 #include "shellinabox/vt100.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
 
 #define PORTNUM           4200
 #define MAX_RESPONSE      2048
@@ -275,8 +282,8 @@ static void sessionDone(void *arg) {
 }
 
 static int handleSession(struct ServerConnection *connection, void *arg,
-                         short *events, short revents) {
-  (void)events;
+                         short *events ATTR_UNUSED, short revents) {
+  UNUSED(events);
   struct Session *session       = (struct Session *)arg;
   session->connection           = connection;
   int len                       = MAX_RESPONSE - session->len;
@@ -330,8 +337,8 @@ static int invalidatePendingHttpSession(void *arg, const char *key,
 }
 
 static int dataHandler(HttpConnection *http, struct Service *service,
-                       const char *buf, int len, URL *url) {
-  (void)len;
+                       const char *buf, int len ATTR_UNUSED, URL *url) {
+  UNUSED(len);
   if (!buf) {
     // Somebody unexpectedly closed our http connection (e.g. because of a
     // timeout). This is the last notification that we will get.
@@ -815,8 +822,9 @@ static void usage(void) {
   free((char *)group);
 }
 
-static void destroyExternalFileHashEntry(void *arg, char *key, char *value) {
-  (void)arg;
+static void destroyExternalFileHashEntry(void *arg ATTR_UNUSED, char *key,
+                                         char *value) {
+  UNUSED(arg);
   free(key);
   free(value);
 }
index 09da5eefeeedf6c82afdf64ea777dd23385f0ad5..9620cdd02bbd26b00b0fbef89c1a35743e94ed01 100644 (file)
 #include "shellinabox/usercss.h"
 #include "libhttp/hashmap.h"
 
+#ifdef HAVE_UNUSED
+#defined ATTR_UNUSED __attribute__((unused))
+#defined UNUSED(x)   do { } while (0)
+#else
+#define ATTR_UNUSED
+#define UNUSED(x)    do { (void)(x); } while (0)
+#endif
+
 static struct HashMap *defines;
 
-static void definesDestructor(void *arg, char *key, char *value) {
-  (void)arg;
-  (void)value;
+static void definesDestructor(void *arg ATTR_UNUSED, char *key,
+                              char *value ATTR_UNUSED) {
+  UNUSED(arg);
+  UNUSED(value);
 
   free(key);
 }
index c29d0f807df1cb883e2d6d8f375cce0d7da224b2..46ebcf04941329b5eedf4a60abecafb46bde33c8 100644 (file)
@@ -2402,7 +2402,7 @@ VT100.prototype.toggleCursorBlinking = function() {
 };
 
 VT100.prototype.about = function() {
-  alert("VT100 Terminal Emulator " + "2.10 (revision 230)" +
+  alert("VT100 Terminal Emulator " + "2.10 (revision 231)" +
         "\nCopyright 2008-2010 by Markus Gutschke\n" +
         "For more information check http://shellinabox.com");
 };
This page took 0.067478 seconds and 5 git commands to generate.