[xiph-cvs] cvs commit: icecast/src main.c

Brendan brendan at xiph.org
Wed Jul 23 22:32:37 PDT 2003



brendan     03/07/24 01:32:37

  Modified:    .        configure.in
               src      main.c
  Log:
  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

Revision  Changes    Path
1.37      +10 -11    icecast/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/icecast/configure.in,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -u -r1.36 -r1.37
--- configure.in	24 Jul 2003 02:31:36 -0000	1.36
+++ configure.in	24 Jul 2003 05:32:36 -0000	1.37
@@ -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]),,)
 

<p><p>1.32      +1 -1      icecast/src/main.c

Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/main.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -u -r1.31 -r1.32
--- main.c	24 Jul 2003 05:24:00 -0000	1.31
+++ main.c	24 Jul 2003 05:32:37 -0000	1.32
@@ -19,7 +19,7 @@
 #include <errno.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
+#ifdef CHROOT
 #include <unistd.h>
 #endif
 

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list