[asterisk-commits] tilghman: trunk r214863 - in /trunk: include/asterisk.h main/poll.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Aug 30 13:37:22 CDT 2009
Author: tilghman
Date: Sun Aug 30 13:37:17 2009
New Revision: 214863
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214863
Log:
Various patches, to enable Asterisk to once again compile on Mac OS X.
One note on defining _POSIX_C_SOURCE: while this feature test macro
works to require certain behaviors on Linux, it works differently on *BSD
platforms to REMOVE certain API calls that are not in the POSIX specification,
such as vasprintf(3). Thus, defining it while depending upon vasprintf (and
other extensions to the POSIX standard) to be defined is a recipe to ensure
that Asterisk is only buildable on Linux.
Hence, this define which was meant to INCREASE portability, effectively
ensures the opposite.
Modified:
trunk/include/asterisk.h
trunk/main/poll.c
Modified: trunk/include/asterisk.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk.h?view=diff&rev=214863&r1=214862&r2=214863
==============================================================================
--- trunk/include/asterisk.h (original)
+++ trunk/include/asterisk.h Sun Aug 30 13:37:17 2009
@@ -19,6 +19,8 @@
#define _ASTERISK_H
#include "asterisk/autoconfig.h"
+
+#ifndef __Darwin__
#define _POSIX_C_SOURCE 200112L
#define _XOPEN_SOURCE 600
@@ -34,6 +36,8 @@
#error System does not support XOPEN version 600.
#endif
*/
+
+#endif /* __Darwin__ */
#if !defined(NO_MALLOC_DEBUG) && !defined(STANDALONE) && defined(MALLOC_DEBUG)
#include "asterisk/astmm.h"
Modified: trunk/main/poll.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/poll.c?view=diff&rev=214863&r1=214862&r2=214863
==============================================================================
--- trunk/main/poll.c (original)
+++ trunk/main/poll.c Sun Aug 30 13:37:17 2009
@@ -82,6 +82,10 @@
#include "asterisk/poll-compat.h" /* this package */
#ifdef AST_POLL_COMPAT
+
+#ifndef MAX
+#define MAX(a,b) a > b ? a : b
+#endif
/*---------------------------------------------------------------------------*\
Private Functions
More information about the asterisk-commits
mailing list