Add some basic system details such as OS and architecture to the debug output if possible, courtesy of uname().

Original commit message from CVS:
* configure.ac:
* gst/gst.c: (init_pre):
Add some basic system details such as OS and architecture
to the debug output if possible, courtesy of uname().
This commit is contained in:
Tim-Philipp Müller 2006-12-12 13:53:04 +00:00
parent fef2cdf472
commit 6043da0aca
3 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2006-12-12 Tim-Philipp Müller <tim at centricular dot net>
* configure.ac:
* gst/gst.c: (init_pre):
Add some basic system details such as OS and architecture
to the debug output if possible, courtesy of uname().
2006-12-11 Tim-Philipp Müller <tim at centricular dot net>
* docs/gst/running.xml:

View file

@ -272,6 +272,9 @@ AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
AC_CHECK_HEADERS([process.h])
dnl Check for sys/utsname.h for uname
AC_CHECK_HEADERS([sys/utsname.h])
dnl *** checks for types/defines ***
dnl *** checks for structures ***

View file

@ -107,6 +107,9 @@
#ifdef HAVE_FORK
#include <sys/wait.h>
#endif /* HAVE_FORK */
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -542,6 +545,19 @@ init_pre (GOptionContext * context, GOptionGroup * group, gpointer data,
GST_INFO ("Initializing GStreamer Core Library version %s", VERSION);
GST_INFO ("Using library installed in %s", LIBDIR);
/* Print some basic system details if possible (OS/architecture) */
#ifdef HAVE_SYS_UTSNAME_H
{
struct utsname sys_details;
if (uname (&sys_details) == 0) {
GST_INFO ("%s %s %s %s %s", sys_details.sysname,
sys_details.nodename, sys_details.release, sys_details.version,
sys_details.machine);
}
}
#endif
return TRUE;
}