Various fixes for OS X

This patch addresses compilation errors on OS X. It's been a while, so
there's quite a few things.

 * Fixed __attribute__ decls in route.h to be portable.
 * Fixed htonll and ntohll to work when they are defined as macros.
 * Replaced sem_t usage with our ast_sem wrapper.
 * Added ast_sem_timedwait to our ast_sem wrapper.
 * Fixed some GCC 4.9 warnings using sig*set() functions.
 * Fixed some format strings for portability.
 * Fixed compilation issues with res_timing_kqueue (although tests still fail
   on OS X).
 * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue
   on OS X).

ASTERISK-24539 #close
Reported by: George Joseph

ASTERISK-24544 #close
Reported by: George Joseph

Review: https://reviewboard.asterisk.org/r/4327/
........

Merged revisions 431092 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
David M. Lee
2015-01-26 14:50:40 +00:00
parent a8ae5a7bcb
commit 965777ccfc
12 changed files with 1380 additions and 1311 deletions

View File

@@ -324,7 +324,7 @@
/* Define to 1 if you have the Hoard Memory Allocator library. */
#undef HAVE_HOARD
/* Define to 1 if you have the `htonll' function. */
/* Define to 1 if arpa/inet.h includes a htonll definition. */
#undef HAVE_HTONLL
/* Define to 1 if you have the iCal library. */
@@ -524,7 +524,7 @@
/* Define to 1 if you have the newt library. */
#undef HAVE_NEWT
/* Define to 1 if you have the `ntohll' function. */
/* Define to 1 if arpa/inet.h includes a ntohll definition. */
#undef HAVE_NTOHLL
/* Define to 1 if your C library can safely print NULL to string formats. */
@@ -1299,6 +1299,11 @@
/* Define to 1 if running on Darwin. */
#undef _DARWIN_UNLIMITED_SELECT
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS