Cygwin build support

This commit is contained in:
Thomas Ries
2005-01-08 10:25:52 +00:00
parent 0f246be8b4
commit 80cdba4081
3 changed files with 17 additions and 0 deletions
+6
View File
@@ -220,6 +220,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* target platform */
#undef UNAME
/* Version number of package */
#undef VERSION
@@ -229,6 +232,9 @@
/* building on BSD/OS platform */
#undef _BSDOS
/* building on Cygwin (Windows) platform */
#undef _CYGWIN
/* building on FreeBSD platform */
#undef _FREEBSD
+6
View File
@@ -31,6 +31,7 @@ dnl 18-Aug-2004 tries fli4l-uclibc -> fli4l-21-uclibc, fli4l-22-uclibc
dnl 2.1.x has no pthread support, link -static
dnl 2.2.x has (maybe) pthread support
dnl 08-Jan-2005 tries FreeBSD: check for libgnugetopt before using it
dnl Cygwin build support
dnl
dnl
@@ -117,6 +118,7 @@ dnl --enable-dmalloc
dnl
dnl target platform specific stuff
dnl
AC_DEFINE_UNQUOTED(UNAME,"$target",[target platform])
AC_MSG_CHECKING(target platform)
case "$target" in
*-*-linux*)
@@ -161,6 +163,10 @@ case "$target" in
AC_MSG_RESULT(Mac OS X)
AC_DEFINE(_MACOSX,,[building on Mac OSX platform])
;;
*-*-cygwin*)
AC_MSG_RESULT(Cygwin)
AC_DEFINE(_CYGWIN,,[building on Cygwin (Windows) platform])
;;
*)
AC_MSG_RESULT(Unknown Platform)
AC_DEFINE(_UNKNOWN,,[building on unknown platform])
+5
View File
@@ -111,12 +111,15 @@ int rtp_relay_init( void ) {
int uid,euid;
struct sched_param schedparam;
#ifndef _CYGWIN
uid=getuid();
euid=geteuid();
DEBUGC(DBCLASS_RTP,"uid=%i, euid=%i", uid, euid);
if (uid != euid) seteuid(0);
if (geteuid()==0) {
#endif
#if defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_GET_PRIORITY_MIN)
int pmin, pmax;
/* place ourself at 1/3 of the available priority space */
@@ -134,11 +137,13 @@ int rtp_relay_init( void ) {
if (sts != 0) {
ERROR("pthread_setschedparam failed: %s", strerror(errno));
}
#ifndef _CYGWIN
} else {
INFO("Unable to use realtime scheduling for RTP proxy");
INFO("You may want to start siproxd as root and switch UID afterwards");
}
if (uid != euid) seteuid(euid);
#endif
}
#endif