harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r538716 - in /harmony/enhanced/classlib/trunk: depends/build/platform/ make/ modules/awt/src/main/native/linuxfont/unix/ modules/awt/src/main/native/x11wrapper/unix/ modules/luni/src/main/native/launcher/shared/ modules/luni/src/main/native...
Date Wed, 16 May 2007 20:27:45 GMT
Author: hindessm
Date: Wed May 16 13:27:43 2007
New Revision: 538716

URL: http://svn.apache.org/viewvc?view=rev&rev=538716
Log:
Minor tweaks to get things to compile on Mac OS/X.

Modified:
    harmony/enhanced/classlib/trunk/depends/build/platform/macosx.ppc32.mk
    harmony/enhanced/classlib/trunk/make/properties.xml
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/makefile
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/hyenv.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hycomp.h
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/unix/hysock.h
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysysinfo.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysiglinux.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysigunix.c

Modified: harmony/enhanced/classlib/trunk/depends/build/platform/macosx.ppc32.mk
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/depends/build/platform/macosx.ppc32.mk?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/depends/build/platform/macosx.ppc32.mk (original)
+++ harmony/enhanced/classlib/trunk/depends/build/platform/macosx.ppc32.mk Wed May 16 13:27:43
2007
@@ -16,6 +16,8 @@
 DEFINES += -DMACOSX -DMACOSX_PPC32 -DPPC32
 OPT += -fno-common
 OSLIBS = -lc -lm -ldl -liconv
+XLIBS = -L/usr/X11R6/lib -lX11 -lXft -lXext -lXrender -lexpat \
+        -L/sw/lib/freetype2/lib -lfreetype -lfontconfig
 MDLLIBPREFIX =
 MDLLIBSUFFIX =
 EXERPATHPREFIX = 

Modified: harmony/enhanced/classlib/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/make/properties.xml?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/make/properties.xml (original)
+++ harmony/enhanced/classlib/trunk/make/properties.xml Wed May 16 13:27:43 2007
@@ -206,6 +206,9 @@
     <condition property="linklib.suffix" value=".x">
         <isset property="is.zos" />
     </condition>
+    <condition property="linklib.suffix" value=".dylib">
+        <isset property="is.macosx"/>
+    </condition>
     <property name="linklib.suffix" value=".so" />
 
     <property name="manifest.suffix" value=".manifest" />

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/makefile?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/makefile Wed
May 16 13:27:43 2007
@@ -21,6 +21,9 @@
 ifeq ($(HY_OS),freebsd)
 INCLUDES += -I/usr/local/include -I/usr/local/include/freetype2
 endif
+ifeq ($(HY_OS),macosx)
+INCLUDES += -I/sw/lib/freetype2/include/freetype2 -I/sw/lib/freetype2/include
+endif
 
 BUILDFILES = LinuxNativeFont.o
 

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/unix/nativelib_common.h
Wed May 16 13:27:43 2007
@@ -21,7 +21,7 @@
 #ifndef NATIVELIB_COMMON_H
 #define NATIVELIB_COMMON_H
 
-#if defined(LINUX) || defined(FREEBSD) || defined(AIX)
+#if defined(LINUX) || defined(FREEBSD) || defined(AIX) || defined(MACOSX)
 // common linux section--------------------------------
 #include <dlfcn.h>
 #include <stdint.h>

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Wed
May 16 13:27:43 2007
@@ -46,7 +46,7 @@
 #define PLATFORM_STRNICMP strnicmp
 #endif
 
-#if defined(LINUX) || defined(FREEBSD) || defined(AIX)
+#if defined(LINUX) || defined(FREEBSD) || defined(AIX) || defined(MACOSX)
 #define PLATFORM_STRNICMP strncasecmp
 #endif
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemory.c Wed
May 16 13:27:43 2007
@@ -19,6 +19,9 @@
  * Common natives supporting the memory system interface.
  */
 
+#if defined(MACOSX)
+#include <sys/types.h>
+#endif
 #include <sys/mman.h>
 #include <string.h>
 #include "vmi.h"

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
Wed May 16 13:27:43 2007
@@ -20,6 +20,9 @@
  */
 
 #include <string.h>
+#if defined(MACOSX)
+#include <sys/types.h>
+#endif
 #include <sys/mman.h>
 #include <errno.h>
 #include <unistd.h>

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
Wed May 16 13:27:43 2007
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-#if defined(FREEBSD) || defined(AIX)
+#if defined(FREEBSD) || defined(AIX) || defined(MACOSX)
 #include <sys/types.h>
 #include <netinet/in.h>
 #endif

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/hyenv.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/hyenv.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/hyenv.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/hyenv.c Wed May
16 13:27:43 2007
@@ -17,10 +17,15 @@
 #include <vmi.h>
 #include "hyenv.h"
 #include <stdlib.h>
+#if defined(MACOSX)
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
+extern char** environ;
+#endif
 
 JNIEXPORT jbyteArray JNICALL Java_org_apache_harmony_luni_platform_Environment_getEnvBytes
   (JNIEnv *env, jclass obj){
-  extern char** environ;
   jbyteArray byteArray;
   int bufsize=0,i=0,start=0,len=0;
   for(i=0;*(environ+i);i++){

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c Wed
May 16 13:27:43 2007
@@ -25,7 +25,12 @@
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <unistd.h>
+#if defined(MACOSX)
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
 extern char **environ;
+#endif
 
 #include <sys/wait.h>
 

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hycomp.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hycomp.h?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hycomp.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hycomp.h
Wed May 16 13:27:43 2007
@@ -88,7 +88,7 @@
  * </ul>
  */
 
-#if defined(LINUX) || defined(FREEBSD) || defined(AIX)
+#if defined(LINUX) || defined(FREEBSD) || defined(AIX) || defined(MACOSX)
 
 #define DATA_TYPES_DEFINED
 
@@ -132,9 +132,17 @@
 #if defined(AIX)
 #define LIBPATH_ENV_VAR "LIBPATH"
 #else
+#if defined(MACOSX)
+#define LIBPATH_ENV_VAR "DYLD_LIBRARY_PATH"
+#else
 #define LIBPATH_ENV_VAR "LD_LIBRARY_PATH"
 #endif
+#endif
+#if defined(MACOSX)
+#define PLATFORM_DLL_EXTENSION ".dylib"
+#else
 #define PLATFORM_DLL_EXTENSION ".so"
+#endif
 
 /**
  * No priorities on Linux

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/unix/hysock.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/unix/hysock.h?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/unix/hysock.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/unix/hysock.h
Wed May 16 13:27:43 2007
@@ -57,7 +57,7 @@
  *   the getaddrinfo(3) family of functions, instead.
  */
 /* NO_R: gethostby*_r calls do not exist and the normal gethostby* calls are not threadsafe
*/
-#define NO_R (defined(false))
+#define NO_R (defined(MACOSX))
 /* OTHER_R: everything else */
 #define OTHER_R ((!HOSTENT_DATA_R)&&(!GLIBC_R)&&(!ORIGINAL_R)&&(!NO_R))
 /* os types */
@@ -112,12 +112,12 @@
 #define OS_MCAST_LOOP IP_MULTICAST_LOOP
 #if defined(IPv6_FUNCTION_SUPPORT)
 #define OS_MCAST_INTERFACE_2 IPV6_MULTICAST_IF
-#if !defined(FREEBSD)
-#define OS_IPV6_ADD_MEMBERSHIP IPV6_ADD_MEMBERSHIP
-#define OS_IPV6_DROP_MEMBERSHIP IPV6_DROP_MEMBERSHIP
-#else
+#if defined(FREEBSD) || defined(MACOSX)
 #define OS_IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
 #define OS_IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
+#else
+#define OS_IPV6_ADD_MEMBERSHIP IPV6_ADD_MEMBERSHIP
+#define OS_IPV6_DROP_MEMBERSHIP IPV6_DROP_MEMBERSHIP
 #endif
 #endif
 /* defines for the unix error constants.  These may be overriden for specific platforms.
*/

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysysinfo.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysysinfo.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysysinfo.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysysinfo.c
Wed May 16 13:27:43 2007
@@ -38,7 +38,7 @@
 #if defined(LINUX)
 #include <sys/sysinfo.h>
 #endif
-#if defined(FREEBSD)
+#if defined(FREEBSD) || defined(MACOSX)
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #endif
@@ -652,8 +652,21 @@
   /* returns number of online(_SC_NPROCESSORS_ONLN) processors, number configured(_SC_NPROCESSORS_CONF)
may  be more than online */
   return sysconf (_SC_NPROCESSORS_ONLN);
 #else
+#if defined(MACOSX)
+  /* derived from examples in sysctl(3) man page */
+  int mib[2], ncpu;
+  size_t len;
+
+  mib[0] = CTL_HW;
+  mib[1] = HW_NCPU;
+  len = sizeof(ncpu);
+  sysctl(mib, 2, &ncpu, &len, NULL, 0);
+  return (UDATA)ncpu;
+
+#else
   return 0;
 #endif
+#endif
 
 }
 
@@ -671,7 +684,7 @@
 hysysinfo_get_physical_memory (struct HyPortLibrary * portLibrary)
 {
 
-#if defined(FREEBSD)
+#if defined(FREEBSD) || defined(MACOSX)
   /* derived from examples in sysctl(3) man page */
   int mib[2], mem;
   size_t len;

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysiglinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysiglinux.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysiglinux.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysiglinux.c
Wed May 16 13:27:43 2007
@@ -158,7 +158,7 @@
 /*                                                                   */
 /* Returns:                                                          */
 /*********************************************************************/
-#if defined(FREEBSD)
+#if defined(FREEBSD) || defined(MACOSX)
 int sigvec (int sig, struct sigvec *invec, struct sigvec *outvec)
 #else
 int sigvec (int sig, const struct sigvec *invec, struct sigvec *outvec)

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysigunix.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysigunix.c?view=diff&rev=538716&r1=538715&r2=538716
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysigunix.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/sig/unix/hysigunix.c Wed
May 16 13:27:43 2007
@@ -29,7 +29,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
-#if defined(FREEBSD)
+#if defined(FREEBSD) || defined(MACOSX)
 #include <sys/signalvar.h>
 #endif
 #if defined(LINUX)



Mime
View raw message