You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jf...@apache.org on 2003/09/12 11:08:51 UTC

cvs commit: jakarta-commons/daemon/src/native/unix/support apsupport.m4

jfclere     2003/09/12 02:08:51

  Modified:    daemon/src/native/unix configure.in
               daemon/src/native/unix/native jsvc-unix.c location.c
               daemon/src/native/unix/support apsupport.m4
  Log:
  Add support for FreeBSD (only for the native JVM).
  
  Revision  Changes    Path
  1.2       +1 -9      jakarta-commons/daemon/src/native/unix/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/configure.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- configure.in	4 Sep 2003 23:28:20 -0000	1.1
  +++ configure.in	12 Sep 2003 09:08:51 -0000	1.2
  @@ -108,14 +108,6 @@
     unset _prevdir
   else
     CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os"
  -  if test "$supported_os" != "win32"
  -  then
  -    LDFLAGS="$LDFLAGS -ldl"
  -  fi
  -fi
  -if test "$supported_os" = "solaris"
  -then
  -  LDFLAGS="$LDFLAGS -lthread"
   fi
   
   dnl -------------------------------------------------------------------------
  
  
  
  1.2       +5 -1      jakarta-commons/daemon/src/native/unix/native/jsvc-unix.c
  
  Index: jsvc-unix.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/jsvc-unix.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jsvc-unix.c	4 Sep 2003 23:28:20 -0000	1.1
  +++ jsvc-unix.c	12 Sep 2003 09:08:51 -0000	1.2
  @@ -302,7 +302,11 @@
       }
   
       /* create a new process group to prevent kill 0 killing the monitor process */
  +#ifdef OS_FREEBSD
  +    setpgid(0,0);
  +#else
       setpgrp();
  +#endif
   
   #ifdef OS_LINUX
       /* setuid()/setgid() only apply the current thread so we must do it now */
  
  
  
  1.2       +3 -3      jakarta-commons/daemon/src/native/unix/native/location.c
  
  Index: location.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/location.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- location.c	4 Sep 2003 23:28:20 -0000	1.1
  +++ location.c	12 Sep 2003 09:08:51 -0000	1.2
  @@ -102,7 +102,7 @@
   #elif defined(OS_CYGWIN)
       "$JAVA_HOME/jre/bin/classic/jvm.dll",           /* Sun JDK 1.3 */
       "$JAVA_HOME/jre/bin/client/jvm.dll",            /* Sun JDK 1.4 */
  -#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_SYSV)
  +#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_SYSV) || defined(OS_FREEBSD)
       "$JAVA_HOME/jre/lib/" CPU "/classic/libjvm.so", /* Sun JDK 1.2 */
       "$JAVA_HOME/jre/lib/" CPU "/client/libjvm.so",  /* Sun JDK 1.3 */
       "$JAVA_HOME/jre/lib/" CPU "/libjvm.so",         /* Sun JDK */
  @@ -140,7 +140,7 @@
       "$JAVA_HOME/../Libraries/lib$VM_NAME.dylib",
   #elif defined(OS_CYGWIN)
       "$JAVA_HOME/jre/bin/$VM_NAME/jvm.dll",          /* Sun JDK 1.3 */
  -#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD)
  +#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_FREEBSD)
       "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/libjvm.so",/* Sun JDK 1.3 */
       "$JAVA_HOME/lib/" CPU "/$VM_NAME/libjvm.so",    /* Sun JRE 1.3 */
   #elif defined(OS_SYSV)
  
  
  
  1.2       +11 -2     jakarta-commons/daemon/src/native/unix/support/apsupport.m4
  
  Index: apsupport.m4
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/support/apsupport.m4,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apsupport.m4	4 Sep 2003 23:28:20 -0000	1.1
  +++ apsupport.m4	12 Sep 2003 09:08:51 -0000	1.2
  @@ -88,14 +88,17 @@
     darwin*)
       CFLAGS="$CFLAGS -DOS_DARWIN -DDSO_DYLD"
       supported_os="darwin"
  +    LDFLAGS="$LDFLAGS -ldl"
       ;;
     solaris*)
       CFLAGS="$CFLAGS -DOS_SOLARIS -DDSO_DLFCN"
       supported_os="solaris"
  +    LDFLAGS="$LDFLAGS -ldl -lthread"
       ;;
     linux*)
       CFLAGS="$CFLAGS -DOS_LINUX -DDSO_DLFCN"
       supported_os="linux"
  +    LDFLAGS="$LDFLAGS -ldl"
       ;;
     cygwin)
       CFLAGS="$CFLAGS -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID"
  @@ -103,10 +106,16 @@
       ;;
     sysv)
       CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN"
  +    LDFLAGS="$LDFLAGS -ldl"
       ;;
     sysv4)
       CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread"
  -    LDFLAGS="-Kthread $LDFLAGS"
  +    LDFLAGS="-Kthread $LDFLAGS -ldl"
  +    ;;
  +  freebsd4.?)
  +    CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
  +    LDFLAGS="-pthread $LDFLAGS"
  +    supported_os="freebsd"
       ;;
     *)
       AC_MSG_RESULT([failed])