Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfunley committed May 5, 2010
1 parent c947aae commit d3bd768
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 12 deletions.
2 changes: 1 addition & 1 deletion com/etsy/net/JUDS.java
Expand Up @@ -38,7 +38,7 @@ public static Object safeSocket(int type, String socketFile, int socketType)
InvocationTargetException {

String name = (type == SERVER) ? "Server" : "Client";
Class c = Class.forName("com.google.code.juds.UnixDomainSocket"+name,
Class c = Class.forName("com.etsy.net.UnixDomainSocket"+name,
true, judsCl);

Constructor ctor = c.getConstructor(new Class[] {
Expand Down
12 changes: 3 additions & 9 deletions com/etsy/net/UnixDomainSocket.java
Expand Up @@ -14,6 +14,7 @@
import java.io.FileOutputStream;
import java.net.URISyntaxException;


/**
*
* This class provides a means of using Unix domain socket client/server
Expand All @@ -26,15 +27,8 @@ public abstract class UnixDomainSocket {
private static File jarFile;
static {
// Load the Unix domain socket C library
if(!isLoaded()) {
getJarPath();
loadNativeLib();
System.setProperty("juds.loaded", "true");
}
}

private static Boolean isLoaded() {
return "true".equals(System.getProperty("juds.loaded"));
getJarPath();
loadNativeLib();
}

private static void getJarPath() {
Expand Down
53 changes: 51 additions & 2 deletions configure
Expand Up @@ -659,6 +659,7 @@ CPPFLAGS
ac_ct_CC
EXEEXT
OBJEXT
JAVA_PATH_NAME
JAVA_HOME
JAVAC
PLATFORM
Expand Down Expand Up @@ -2614,7 +2615,54 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test x$JAVA_HOME = x; then
AX_CHECK_JAVA_HOME
TRY_JAVA_HOME=`ls -dr /usr/java/* 2> /dev/null | head -n 1`
if test x$TRY_JAVA_HOME != x; then
PATH=$PATH:$TRY_JAVA_HOME/bin
fi
# Extract the first word of "java", so it can be a program name with args.
set dummy java; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVA_PATH_NAME+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $JAVA_PATH_NAME in
[\\/]* | ?:[\\/]*)
ac_cv_path_JAVA_PATH_NAME="$JAVA_PATH_NAME" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_JAVA_PATH_NAME="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
JAVA_PATH_NAME=$ac_cv_path_JAVA_PATH_NAME
if test -n "$JAVA_PATH_NAME"; then
{ echo "$as_me:$LINENO: result: $JAVA_PATH_NAME" >&5
echo "${ECHO_T}$JAVA_PATH_NAME" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
if test x$JAVA_PATH_NAME != x; then
JAVA_HOME=`echo $JAVA_PATH_NAME | sed "s/\(.*\)[/]bin[/]java.*/\1/"`
fi;
fi
JAVAC=$JAVA_HOME/bin/javac
Expand Down Expand Up @@ -4370,6 +4418,7 @@ CPPFLAGS!$CPPFLAGS$ac_delim
ac_ct_CC!$ac_ct_CC$ac_delim
EXEEXT!$EXEEXT$ac_delim
OBJEXT!$OBJEXT$ac_delim
JAVA_PATH_NAME!$JAVA_PATH_NAME$ac_delim
JAVA_HOME!$JAVA_HOME$ac_delim
JAVAC!$JAVAC$ac_delim
PLATFORM!$PLATFORM$ac_delim
Expand All @@ -4384,7 +4433,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 57; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Expand Down

0 comments on commit d3bd768

Please sign in to comment.