though this probably means Debian will take us in, ick .. Can't we pull
a new fight with debian-legal again?)
- Made m_tkl use NULL instead of TOK_NONE
+- #0001438 reported by Mouse, to use uname() syscall on ircd start instead of
+ uname tool at Config/configure to fill in MYOSNAME. As with the #0003363 patch
+ this will make binary packages a bit more reasonable. As a side effect, the
+ amount of information in /version has been reduced to just the OS name (eg: Linux,
+ FreeBSD, etc) and release (2.6.17, 6.0-RELEASE, etc), which is about the same amount
+ of information given by Win32 IRCds. If for some reason uname() can't get this
+ info, we just config_warn and set MYOSNAME to "POSIX" as this data is only ever
+ used in /version.
AC_DEFINE_UNQUOTED(MAXSENDQLENGTH,$withval),AC_DEFINE(MAXSENDQLENGTH,3000000))
AC_ARG_WITH(bufferpool, [AC_HELP_STRING([--with-bufferpool=size],[Specify the size of the buffer pool])],
AC_DEFINE_UNQUOTED(BUFFERPOOL,[($withval * MAXSENDQLENGTH)]),AC_DEFINE(BUFFERPOOL,[(18 * MAXSENDQLENGTH)]))
-AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`")
AC_ARG_WITH(permissions, [AC_HELP_STRING([--with-permissions=permissions],[Specify the default permissions for
configuration files])], AC_DEFINE_UNQUOTED(DEFAULT_PERMISSIONS,$withval), AC_DEFINE(DEFAULT_PERMISSIONS, 0600))
AC_ARG_WITH(dpath, [AC_HELP_STRING([--with-dpath=path],[Specify the path where configuration files are stored])],
_ACEOF
fi;
-cat >>confdefs.h <<_ACEOF
-#define MYOSNAME "`uname -a`"
-_ACEOF
-
# Check whether --with-permissions or --without-permissions was given.
if test "${with_permissions+set}" = set; then
/* Define if you have crypt */
#undef HAVE_CRYPT
-/* The OS name and version of the server */
-#undef MYOSNAME
-
/* The default permissions for configuration files */
#undef DEFAULT_PERMISSIONS
typedef unsigned int u_int;
#endif
-#ifdef _WIN32
#define MYOSNAME OSName
extern char OSName[256];
+#ifdef _WIN32
#define PATH_MAX MAX_PATH
#endif
#ifdef DEBUGMODE
#ifdef USE_LIBCURL
#include <curl/curl.h>
#endif
+#ifndef _WIN32
+#include <sys/utsname.h>
+#endif
ID_Copyright
("(C) 1988 University of Oulu, Computing Center and Jarkko Oikarinen");
ID_Notes("2.48 3/9/94");
}
#endif
+#ifndef _WIN32
+char OSName[256]; /* Defined in win32/ stuff under _WIN32. */
+/* Fill in OSName from uname() */
+void GetOSName()
+{
+ struct utsname un;
+ int ret;
+ ret = uname(&un);
+ if (ret)
+ {
+ config_warn("Failed to get OSName: %s", strerror(errno));
+ strcpy(OSName, "POSIX");
+ }
+ else
+ {
+ snprintf(OSName, 256, "%s %s", un.sysname, un.release);
+ }
+}
+#endif
+
#ifndef _WIN32
int main(int argc, char *argv[])
#else
(void)signal(SIGUSR1, s_monitor);
# endif
#endif
+#ifndef _WIN32
+ GetOSName();
+#endif
#ifdef CHROOTDIR
if (chdir(dpath))
{