Commit f14dcdc0 authored by brendan's avatar brendan

use _GNU_SOURCE where possible

guard unistd.h with CHROOT rather than HAVE_UNISTD_H, since that's how it's
tested in configure.in

svn path=/trunk/icecast/; revision=5171
parent a434767c
......@@ -11,12 +11,6 @@ AM_PROG_LIBTOOL
dnl Set some options based on environment
case "$host" in
*openbsd* | *irix*)
;;
*) AC_DEFINE(_XOPEN_SOURCE, 600, [Define if you have POSIX and XPG specifications])
;;
esac
DEBUG="-g"
if test -z "$GCC"; then
XIPH_CPPFLAGS="-D_REENTRANT"
......@@ -35,14 +29,18 @@ if test -z "$GCC"; then
PROFILE="-g -p"
;;
esac
case "$host" in
*openbsd* | *irix*)
;;
*) AC_DEFINE([_XOPEN_SOURCE], 600, [Define if you have POSIX and XPG specifications])
;;
esac
else
XIPH_CPPFLAGS="-Wall -ffast-math -fsigned-char"
PROFILE="-pg -g"
case $host in
*-solaris*)
AC_DEFINE(__EXTENSIONS__, 1, [define to 1 to get resolve header problem on solaris])
;;
esac
AC_DEFINE([_GNU_SOURCE], 1, [Define to include GNU extensions to POSIX])
fi
dnl Checks for programs.
......@@ -52,6 +50,7 @@ dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([alloca.h])
AC_CHECK_HEADER(pwd.h, AC_DEFINE(CHUID, 1, [Define if you have pwd.h]),,)
AC_CHECK_HEADER(unistd.h, AC_DEFINE(CHROOT, 1, [Define if you have unistd.h]),,)
......
......@@ -19,7 +19,7 @@
#include <errno.h>
#endif
#ifdef HAVE_UNISTD_H
#ifdef CHROOT
#include <unistd.h>
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment