From 3b38c5fe68cd1b94830be032d183f236888c9fe2 Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Tue, 22 Jan 2008 10:36:07 +0000 Subject: [PATCH] Using defined(__OSX__) || defined(__APPLE__) instead of just defined(__OSX__) in the code. Thanks to Ingo Hofmann and Chris Pickel. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@291 119443c7-1b9e-41f8-b6fc-b9c35fce742c --- ChangeLog | 19 ++++++++++++------- threadutil/src/LinkedList.c | 2 +- threadutil/src/ThreadPool.c | 4 ++-- upnp/src/genlib/net/uri/uri.c | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04e6447..7a65d0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,18 @@ Version 1.6.4 ******************************************************************************* +2008-01-22 Marcelo Jimenez + * Using defined(__OSX__) || defined(__APPLE__) instead of just + defined(__OSX__) in the code. Thanks to Ingo Hofmann and Chris + Pickel. + +2008-01-21 Marcelo Jimenez + * Fix for isFileInVirtualDir. Thanks to Peter Hartley for the patch. + +2008-01-07 Marcelo Jimenez + * Putting back a "defined(__OSX__)" that has been removed in the + previous *BSD patch. Thanks to Chris Pickel for pointing it out. + 2008-01-07 Marcelo Jimenez * SF Patches Tracker [ 1865812 ] typo in docs comment Submitted By: Hartmut Holzgraefe - hholzgra @@ -10,13 +22,6 @@ Version 1.6.4 Also, the documentation file name was mispelled and was corrected in the Makefile.am. -2008-01-07 Marcelo Jimenez - * Putting back a "defined(__OSX__)" that has been removed in the - previous *BSD patch. Thanks to Chris Pickel for pointing it out. - -2008-01-21 Marcelo Jimenez - * Fix for isFileInVirtualDir. Thanks to Peter Hartley for the patch. - ******************************************************************************* Version 1.6.3 ******************************************************************************* diff --git a/threadutil/src/LinkedList.c b/threadutil/src/LinkedList.c index 675c4f1..a67330f 100644 --- a/threadutil/src/LinkedList.c +++ b/threadutil/src/LinkedList.c @@ -31,7 +31,7 @@ #include "LinkedList.h" #include -#if (defined(BSD) && BSD >= 199306) || defined(__OSX__) +#if (defined(BSD) && BSD >= 199306) || defined(__OSX__) || defined(__APPLE__) #include #else #include diff --git a/threadutil/src/ThreadPool.c b/threadutil/src/ThreadPool.c index ed48cec..0085c89 100644 --- a/threadutil/src/ThreadPool.c +++ b/threadutil/src/ThreadPool.c @@ -229,7 +229,7 @@ static int SetPolicyType( PolicyType in ) #ifdef __CYGWIN__ /* TODO not currently working... */ return 0; -#elif defined(__OSX__) +#elif defined(__OSX__) || defined(__APPLE__) setpriority( PRIO_PROCESS, 0, 0 ); return 0; #elif defined(WIN32) @@ -389,7 +389,7 @@ static void SetSeed() gettimeofday(&t, NULL); #if defined(WIN32) srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p ); -#elif defined(__FreeBSD__) || defined(__OSX__) +#elif defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() ); #elif defined(__linux__) srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() ); diff --git a/upnp/src/genlib/net/uri/uri.c b/upnp/src/genlib/net/uri/uri.c index 0dee1ce..a11cf19 100644 --- a/upnp/src/genlib/net/uri/uri.c +++ b/upnp/src/genlib/net/uri/uri.c @@ -555,7 +555,7 @@ parse_hostport( const char *in, int begin_port; int hostport_size = 0; int host_size = 0; -#if !defined(WIN32) && !defined(__OSX__) +#if !defined(WIN32) && !(defined(__OSX__) || defined(__APPLE__)) char temp_hostbyname_buff[BUFFER_SIZE]; struct hostent h_buf; #endif @@ -642,7 +642,7 @@ parse_hostport( const char *in, if ( h == NULL ) { errCode = 1; } -#elif defined(__OSX__) +#elif defined(__OSX__) || defined(__APPLE__) h = gethostbyname(temp_host_name); if ( h == NULL ) { errCode = 1;