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 2002/09/17 18:21:16 UTC
cvs commit: jakarta-commons-sandbox/daemon/src/native/unix/support apfunctions.m4 apsupport.m4
jfclere 2002/09/17 09:21:15
Modified: daemon/src/native/unix Makedefs.in configure.in
daemon/src/native/unix/native Makefile.in dso-dlfcn.c
dso-dyld.c java.c jsvc-unix.c location.c
daemon/src/native/unix/support apfunctions.m4 apsupport.m4
Log:
Add support for ReliantUnix and probably other sysv4 machines.
Add printing of the message from dlerror() when the dlopen() failed.
Revision Changes Path
1.3 +2 -1 jakarta-commons-sandbox/daemon/src/native/unix/Makedefs.in
Index: Makedefs.in
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/Makedefs.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makedefs.in 17 Sep 2002 12:54:31 -0000 1.2
+++ Makedefs.in 17 Sep 2002 16:21:14 -0000 1.3
@@ -64,6 +64,7 @@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
JAVACFLAGS = @JAVACFLAGS@
+RANLIB = @RANLIB@
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
1.3 +10 -1 jakarta-commons-sandbox/daemon/src/native/unix/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- configure.in 19 Feb 2002 02:44:14 -0000 1.2
+++ configure.in 17 Sep 2002 16:21:14 -0000 1.3
@@ -82,6 +82,7 @@
dnl -------------------------------------------------------------------------
AP_MSG_HEADER([C-Language compilation tools])
AC_PROG_CC()
+AC_CHECK_TOOL(RANLIB, ranlib, :)
dnl -------------------------------------------------------------------------
dnl Check JAVA environment
@@ -117,6 +118,14 @@
LDFLAGS="$LDFLAGS -lthread"
fi
+dnl -------------------------------------------------------------------------
+dnl Add gcc specific CFLAGS.
+dnl -------------------------------------------------------------------------
+if test "$GCC" = "yes"
+then
+ CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
+ AC_MSG_RESULT([gcc flags added])
+fi
dnl -------------------------------------------------------------------------
dnl Random programs we need to compile locally
1.4 +2 -2 jakarta-commons-sandbox/daemon/src/native/unix/native/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/native/Makefile.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.in 26 Feb 2002 21:31:48 -0000 1.3
+++ Makefile.in 17 Sep 2002 16:21:14 -0000 1.4
@@ -75,7 +75,7 @@
libservice.a: $(OBJS)
ar cr libservice.a $(OBJS)
- ranlib libservice.a
+ $(RANLIB) libservice.a
jsvc: jsvc-unix.o libservice.a
mkdir -p ../../../../dist
1.2 +6 -1 jakarta-commons-sandbox/daemon/src/native/unix/native/dso-dlfcn.c
Index: dso-dlfcn.c
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/native/dso-dlfcn.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dso-dlfcn.c 18 Feb 2002 21:15:42 -0000 1.1
+++ dso-dlfcn.c 17 Sep 2002 16:21:14 -0000 1.2
@@ -89,4 +89,9 @@
return(dlsym(hdl,nam));
}
+/* Return the error message from dlopen */
+char *dso_error() {
+ return(dlerror());
+}
+
#endif /* ifdef DSO_DLFCN */
1.2 +5 -1 jakarta-commons-sandbox/daemon/src/native/unix/native/dso-dyld.c
Index: dso-dyld.c
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/native/dso-dyld.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dso-dyld.c 18 Feb 2002 21:15:42 -0000 1.1
+++ dso-dyld.c 17 Sep 2002 16:21:14 -0000 1.2
@@ -165,5 +165,9 @@
/* We want to return the address of the symbol */
return(add);
}
+/* Return the error message from dlopen: Well we already print it */
+char *dso_error() {
+ return("no additional message");
+}
#endif /* ifdef DSO_DYLD */
1.3 +2 -1 jakarta-commons-sandbox/daemon/src/native/unix/native/java.c
Index: java.c
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/native/java.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- java.c 19 Feb 2002 02:44:14 -0000 1.2
+++ java.c 17 Sep 2002 16:21:14 -0000 1.3
@@ -139,6 +139,7 @@
libh=dso_link(libf);
if (libh==NULL) {
log_error("Cannot dynamically link to %s",libf);
+ log_error("%s",dso_error());
return(false);
}
log_debug("JVM library %s loaded",libf);
1.4 +2 -2 jakarta-commons-sandbox/daemon/src/native/unix/native/jsvc-unix.c
Index: jsvc-unix.c
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/native/jsvc-unix.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- jsvc-unix.c 2 Mar 2002 16:07:09 -0000 1.3
+++ jsvc-unix.c 17 Sep 2002 16:21:14 -0000 1.4
@@ -349,7 +349,7 @@
handler_trm=signal_set(SIGINT,handler);
controlled = getpid();
log_debug("Waiting for a signal to be delivered");
- while (!stopping) pause();
+ while (!stopping) sleep(60); /* pause() not threadsafe */
log_debug("Shutdown or reload requested: exiting");
/* Start the service */
1.3 +6 -1 jakarta-commons-sandbox/daemon/src/native/unix/native/location.c
Index: location.c
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/native/location.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- location.c 17 Sep 2002 12:25:50 -0000 1.2
+++ location.c 17 Sep 2002 16:21:14 -0000 1.3
@@ -138,6 +138,11 @@
#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD)
"$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)
+ "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/dce_threads/libjvm.so",
+ "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/green_threads/libjvm.so",
+ "$JAVA_HOME/lib/" CPU "/$VM_NAME/dce_threads/libjvm.so",
+ "$JAVA_HOME/lib/" CPU "/$VM_NAME/green_threads/libjvm.so",
#endif
NULL,
};
1.3 +2 -2 jakarta-commons-sandbox/daemon/src/native/unix/support/apfunctions.m4
Index: apfunctions.m4
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/support/apfunctions.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apfunctions.m4 17 Sep 2002 09:27:06 -0000 1.2
+++ apfunctions.m4 17 Sep 2002 16:21:15 -0000 1.3
@@ -61,7 +61,7 @@
dnl -------------------------------------------------------------------------
AC_DEFUN(AP_MSG_HEADER,[
- printf "*** %s ***" "$1" 1>&2
+ printf "*** %s ***\n" "$1" 1>&2
AC_PROVIDE([$0])
])
1.3 +3 -2 jakarta-commons-sandbox/daemon/src/native/unix/support/apsupport.m4
Index: apsupport.m4
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/unix/support/apsupport.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apsupport.m4 17 Sep 2002 12:24:14 -0000 1.2
+++ apsupport.m4 17 Sep 2002 16:21:15 -0000 1.3
@@ -103,7 +103,8 @@
CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN"
;;
sysv4)
- CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN"
+ CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread"
+ LDFLAGS="-Kthread $LDFLAGS"
;;
*)
AC_MSG_RESULT([failed])
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>