by getgrouplist(). Added a few more UNUSED() macros.
/* Define to 1 if you have the `getgrnam_r' function. */
#define HAVE_GETGRNAM_R 1
+/* Define to 1 if getgrouplist() takes ints as arguments */
+/* #undef HAVE_GETGROUPLIST_TAKES_INTS */
+
/* Define to 1 if you have the `gethostbyname_r' function. */
#define HAVE_GETHOSTBYNAME_R 1
#define STDC_HEADERS 1
/* Most recent revision number in the version control system */
-#define VCS_REVISION "232"
+#define VCS_REVISION "233"
/* Version number of package */
#define VERSION "2.10"
/* Define to 1 if you have the `getgrnam_r' function. */
#undef HAVE_GETGRNAM_R
+/* Define to 1 if getgrouplist() takes ints as arguments */
+#undef HAVE_GETGROUPLIST_TAKES_INTS
+
/* Define to 1 if you have the `gethostbyname_r' function. */
#undef HAVE_GETHOSTBYNAME_R
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-VCS_REVISION=232
+VCS_REVISION=233
cat >>confdefs.h <<_ACEOF
$as_echo "#define HAVE_ATTRIBUTE_UNUSED 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. */
+#define _BSD_SOURCE
+ #include <grp.h>
+ #include <unistd.h>
+int
+main ()
+{
+int (*f)(const char *, int, int *, int *) = getgrouplist;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_GETGROUPLIST_TAKES_INTS 1" >>confdefs.h
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
dnl This is the one location where the authoritative version number is stored
AC_INIT(shellinabox, 2.10, markus@shellinabox.com)
-VCS_REVISION=232
+VCS_REVISION=233
AC_SUBST(VCS_REVISION)
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
[Most recent revision number in the version control system])
[AC_DEFINE(HAVE_ATTRIBUTE_UNUSED, 1,
Define to 1 if you have support for the "unused" attribute)])
+dnl Check the function signature of getgrouplist()
+AC_TRY_LINK([#define _BSD_SOURCE
+ #include <grp.h>
+ #include <unistd.h>],
+ [int (*f)(const char *, int, int *, int *) = getgrouplist;],
+ [AC_DEFINE(HAVE_GETGROUPLIST_TAKES_INTS, 1,
+ Define to 1 if getgrouplist() takes ints as arguments)])
+
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,
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.10 (revision 232)" +
+ alert("VT100 Terminal Emulator " + "2.10 (revision 233)" +
"\nCopyright 2008-2010 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};
#endif
// MacOS X has a somewhat unusual definition of getgrouplist() which can
-// trigger a compile warning. Unfortunately, there is no good feature test
-// for this particular problem.
-#if defined(__APPLE__) && defined(__MACH__)
+// trigger a compile warning.
+#if defined(HAVE_GETGROUPLIST_TAKES_INTS)
static int x_getgrouplist(const char *user, gid_t group,
gid_t *groups, int *ngroups) {
return getgrouplist(user, (int)group, (int *)groups, ngroups);
};
ShellInABox.prototype.about = function() {
- alert("Shell In A Box version " + "2.10 (revision 232)" +
+ alert("Shell In A Box version " + "2.10 (revision 233)" +
"\nCopyright 2008-2010 by Markus Gutschke\n" +
"For more information check http://shellinabox.com" +
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
// client session.
return dataHandler(http, arg, buf, len, url);
}
+ UNUSED(rootPageSize);
char *html = stringPrintf(NULL, rootPageStart,
enableSSL ? "true" : "false");
serveStaticFile(http, "text/html", html, strrchr(html, '\000'));
int verbosity = MSG_DEFAULT;
externalFiles = newHashMap(destroyExternalFileHashEntry, NULL);
HashMap *serviceTable = newHashMap(destroyServiceHashEntry, NULL);
+ UNUSED(stylesSize);
check(cssStyleSheet = strdup(stylesStart));
for (;;) {
"X-ShellInABox-Pid: %d\r\n"
"Content-type: text/html; charset=utf-8\r\n\r\n",
port, getpid());
+ UNUSED(cgiRootSize);
printfUnchecked(cgiRootStart, port, cgiSessionKey);
fflush(stdout);
check(!NOINTR(close(fds[1])));
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.10 (revision 232)" +
+ alert("VT100 Terminal Emulator " + "2.10 (revision 233)" +
"\nCopyright 2008-2010 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};