[Spread-cvs] commit: r312 - in trunk/stdutil: . src
jonathan at spread.org
jonathan at spread.org
Mon Feb 20 21:34:24 EST 2006
Author: jonathan
Date: 2006-02-20 21:34:23 -0500 (Mon, 20 Feb 2006)
New Revision: 312
Added:
trunk/stdutil/Makefile
trunk/stdutil/buildtools/
Removed:
trunk/stdutil/Makefile.in
trunk/stdutil/src/stdtest/
Modified:
trunk/stdutil/STDUTIL_LICENSE
trunk/stdutil/configure
trunk/stdutil/configure.in
trunk/stdutil/src/Makefile.in
trunk/stdutil/src/stdthread.c
Log:
Update to stdutil-1.0.0beta4-2006-02-20.
Merged src/Makefile.in spread specific changes to build with VPATH
Copied: trunk/stdutil/Makefile (from rev 311, vendor/stdutil/current/Makefile)
===================================================================
--- trunk/stdutil/Makefile (rev 0)
+++ trunk/stdutil/Makefile 2006-02-21 02:34:23 UTC (rev 312)
@@ -0,0 +1,17 @@
+all:
+ cd src; $(MAKE)
+
+clean:
+ rm -f *~ core*
+ cd src; $(MAKE) clean
+
+distclean:
+ rm -f *~ core* config.*
+ rm -rf autom4te.cache
+ cd src; $(MAKE) distclean
+
+uberclean:
+ rm -f *~ core* config.*
+ rm -rf autom4te.cache
+ rm -f configure
+ cd src; $(MAKE) uberclean
Deleted: trunk/stdutil/Makefile.in
===================================================================
--- trunk/stdutil/Makefile.in 2006-02-21 01:46:24 UTC (rev 311)
+++ trunk/stdutil/Makefile.in 2006-02-21 02:34:23 UTC (rev 312)
@@ -1,18 +0,0 @@
-all:
- cd src; $(MAKE)
-
-clean:
- cd src; $(MAKE) clean
- rm -rf *~ core*
- rm -rf autom4te.cache
-
-distclean:
- cd src; $(MAKE) distclean
- rm -f config.* Makefile *~ core*
- rm -rf autom4te.cache
-
-veryclean: distclean
- rm -f configure
-
-install:
- cd src; $(MAKE) install
Modified: trunk/stdutil/STDUTIL_LICENSE
===================================================================
--- trunk/stdutil/STDUTIL_LICENSE 2006-02-21 01:46:24 UTC (rev 311)
+++ trunk/stdutil/STDUTIL_LICENSE 2006-02-21 02:34:23 UTC (rev 312)
@@ -31,7 +31,7 @@
* The Johns Hopkins University
* 3400 N. Charles St., MD 21218
*
- * or email director at cnds.jhu.edu.
+ * or email director [at] cnds.jhu.edu.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Copied: trunk/stdutil/buildtools (from rev 311, vendor/stdutil/current/buildtools)
Modified: trunk/stdutil/configure
===================================================================
--- trunk/stdutil/configure 2006-02-21 01:46:24 UTC (rev 311)
+++ trunk/stdutil/configure 2006-02-21 02:34:23 UTC (rev 312)
@@ -309,7 +309,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR CPP EGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT AR LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA THLDFLAGS THLIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SHCC SHCFLAGS SHCPPFLAGS SHLD SHLDFLAGS SHLIBS DYNLIBEXT STANDARD_LIBS SHARED_LIBS CPP EGREP LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -830,6 +830,10 @@
_ACEOF
cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
@@ -1284,13 +1288,47 @@
+
+ac_aux_dir=
+for ac_dir in buildtools $srcdir/buildtools; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in buildtools $srcdir/buildtools" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in buildtools $srcdir/buildtools" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
ac_config_headers="$ac_config_headers src/stdutil/private/stdarch.h"
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
@@ -2216,35 +2254,37 @@
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-for ac_prog in ar
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+# Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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_prog_AR+set}" = set; then
+if test "${ac_cv_path_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ case $AR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_AR="$AR" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="$ac_prog"
+ ac_cv_path_AR="$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
+ ;;
+esac
fi
-fi
-AR=$ac_cv_prog_AR
+AR=$ac_cv_path_AR
+
if test -n "$AR"; then
echo "$as_me:$LINENO: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
@@ -2253,16 +2293,195 @@
echo "${ECHO_T}no" >&6
fi
- test -n "$AR" && break
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
done
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
-echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+if test -z "$AR" ; then
+ { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
+echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test -z "$LD" ; then
+ LD=$CC
+fi
+
+CFLAGS=""
+
+if test "$GCC" = "yes"; then
+ CFLAGS="-Wall"
+fi
+
+# Check for threading parameters (store temporarily into main vars then put into specific ones)
+
+OLDLDFLAGS=$LDFLAGS
+LDFLAGS=
+
+echo "$as_me:$LINENO: checking if we need -pthread for threads" >&5
+echo $ECHO_N "checking if we need -pthread for threads... $ECHO_C" >&6
+ if test "${ac_ldflag_pthread+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ ac_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-pthread $LDFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+char pthread_create();
+int
+main ()
+{
+pthread_create();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "ac_ldflag_pthread=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "ac_ldflag_pthread=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext,
+ LIBS="$ac_save_LDFLAGS"
+
+fi
+
+ if eval "test \"`echo $ac_ldflag_pthread`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+
+THLDFLAGS=$LDFLAGS
+
+LDFLAGS=$OLDLDFLAGS
+
+OLDLIBS=$LIBS
+LIBS=
+
+echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
@@ -2278,11 +2497,11 @@
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char pthread_mutex_init ();
+char pthread_create ();
int
main ()
{
-pthread_mutex_init ();
+pthread_create ();
;
return 0;
}
@@ -2309,20 +2528,20 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_pthread_pthread_mutex_init=yes
+ ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_pthread_pthread_mutex_init=no
+ac_cv_lib_pthread_pthread_create=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
+if test $ac_cv_lib_pthread_pthread_create = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
@@ -2331,13 +2550,259 @@
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
+echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
+if test "${ac_cv_lib_thread_thr_create+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lthread $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char thr_create ();
+int
+main ()
+{
+thr_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_thread_thr_create=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_thread_thr_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
+echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
+if test $ac_cv_lib_thread_thr_create = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTHREAD 1
+_ACEOF
+
+ LIBS="-lthread $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for sem_wait in -lposix4" >&5
+echo $ECHO_N "checking for sem_wait in -lposix4... $ECHO_C" >&6
+if test "${ac_cv_lib_posix4_sem_wait+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sem_wait ();
+int
+main ()
+{
+sem_wait ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_posix4_sem_wait=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_posix4_sem_wait=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_posix4_sem_wait" >&5
+echo "${ECHO_T}$ac_cv_lib_posix4_sem_wait" >&6
+if test $ac_cv_lib_posix4_sem_wait = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPOSIX4 1
+_ACEOF
+
+ LIBS="-lposix4 $LIBS"
+
+fi
+
+THLIBS=$LIBS
+
+LIBS=$OLDLIBS
+
+# Check on host for dynamic library building rules
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+case "$host" in
+*-*-darwin*)
+ SHCC=$CC
+ SHCFLAGS="$CFLAGS -fPIC"
+ SHCPPFLAGS="$CPPFLAGS"
+ SHLD="$CC -dynamiclib"
+ SHLDFLAGS="$SHLDFLAGS $LDFLAGS"
+ SHLIBS=$LIBS
+ DYNLIBEXT=dylib
+ STANDARD_LIBS="\$(STATIC_THREADED_RELEASE_LIB) \$(SHARED_THREADED_RELEASE_LIB)"
+ SHARED_LIBS="\$(SHARED_LIBS)"
+ ;;
+mips-sgi-irix*)
+ CC=cc
+ CFLAGS="-n32 -signed"
+ DYNLIBEXT=
+ STANDARD_LIBS="\$(STATIC_THREADED_RELEASE_LIB)"
+ SHARED_LIBS=
+ ;;
+*-*-*)
+ SHCC=$CC
+ SHCFLAGS="$CFLAGS -fPIC"
+ SHCPPFLAGS="$CPPFLAGS"
+ SHLD="$CC -shared"
+ SHLDFLAGS="$SHLDFLAGS $LDFLAGS"
+ SHLIBS=$LIBS
+ DYNLIBEXT=so
+ STANDARD_LIBS="\$(STATIC_THREADED_RELEASE_LIB) \$(SHARED_THREADED_RELEASE_LIB)"
+ SHARED_LIBS="\$(SHARED_LIBS)"
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+# Check sizeof basic types and figure out endianness
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7038,7 +7503,7 @@
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
- ac_config_files="$ac_config_files Makefile src/Makefile"
+ ac_config_files="$ac_config_files src/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -7469,6 +7934,7 @@
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
+INSTALL="$INSTALL"
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -7563,7 +8029,6 @@
do
case "$ac_config_target" in
# Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/stdutil/private/stdarch.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/stdutil/private/stdarch.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -7658,6 +8123,29 @@
s, at EXEEXT@,$EXEEXT,;t t
s, at OBJEXT@,$OBJEXT,;t t
s, at AR@,$AR,;t t
+s, at LN_S@,$LN_S,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at THLDFLAGS@,$THLDFLAGS,;t t
+s, at THLIBS@,$THLIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at SHCC@,$SHCC,;t t
+s, at SHCFLAGS@,$SHCFLAGS,;t t
+s, at SHCPPFLAGS@,$SHCPPFLAGS,;t t
+s, at SHLD@,$SHLD,;t t
+s, at SHLDFLAGS@,$SHLDFLAGS,;t t
+s, at SHLIBS@,$SHLIBS,;t t
+s, at DYNLIBEXT@,$DYNLIBEXT,;t t
+s, at STANDARD_LIBS@,$STANDARD_LIBS,;t t
+s, at SHARED_LIBS@,$SHARED_LIBS,;t t
s, at CPP@,$CPP,;t t
s, at EGREP@,$EGREP,;t t
s, at LIBOBJS@,$LIBOBJS,;t t
@@ -7823,6 +8311,10 @@
esac
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
@@ -7884,6 +8376,7 @@
s, at abs_builddir@,$ac_abs_builddir,;t t
s, at top_builddir@,$ac_top_builddir,;t t
s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
Modified: trunk/stdutil/configure.in
===================================================================
--- trunk/stdutil/configure.in 2006-02-21 01:46:24 UTC (rev 311)
+++ trunk/stdutil/configure.in 2006-02-21 02:34:23 UTC (rev 312)
@@ -1,10 +1,95 @@
AC_INIT(src/stdutil/stddefines.h)
+
+AC_CONFIG_AUX_DIR(buildtools)
AC_CONFIG_HEADER(src/stdutil/private/stdarch.h)
-AC_PROG_CC
-AC_CHECK_PROGS(AR, ar)
-AC_CHECK_LIB(pthread, pthread_mutex_init)
+
AC_LANG_C
+AC_PROG_CC
+AC_PATH_PROG(AR, ar)
+AC_PROG_LN_S
+AC_PROG_INSTALL
+
+if test -z "$AR" ; then
+ AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
+fi
+
+if test -z "$LD" ; then
+ LD=$CC
+fi
+
+CFLAGS=""
+
+if test "$GCC" = "yes"; then
+ CFLAGS="-Wall"
+fi
+
+# Check for threading parameters (store temporarily into main vars then put into specific ones)
+
+OLDLDFLAGS=$LDFLAGS
+LDFLAGS=
+AC_PTHREAD_FREEBSD
+THLDFLAGS=$LDFLAGS
+AC_SUBST(THLDFLAGS)
+LDFLAGS=$OLDLDFLAGS
+
+OLDLIBS=$LIBS
+LIBS=
+AC_CHECK_LIB(pthread, pthread_create)
+AC_CHECK_LIB(thread, thr_create)
+AC_CHECK_LIB(posix4, sem_wait)
+THLIBS=$LIBS
+AC_SUBST(THLIBS)
+LIBS=$OLDLIBS
+
+# Check on host for dynamic library building rules
+
+AC_CANONICAL_HOST
+
+case "$host" in
+*-*-darwin*)
+ SHCC=$CC
+ SHCFLAGS="$CFLAGS -fPIC"
+ SHCPPFLAGS="$CPPFLAGS"
+ SHLD="$CC -dynamiclib"
+ SHLDFLAGS="$SHLDFLAGS $LDFLAGS"
+ SHLIBS=$LIBS
+ DYNLIBEXT=dylib
+ STANDARD_LIBS="\$(STATIC_THREADED_RELEASE_LIB) \$(SHARED_THREADED_RELEASE_LIB)"
+ SHARED_LIBS="\$(SHARED_LIBS)"
+ ;;
+mips-sgi-irix*)
+ CC=cc
+ CFLAGS="-n32 -signed"
+ DYNLIBEXT=
+ STANDARD_LIBS="\$(STATIC_THREADED_RELEASE_LIB)"
+ SHARED_LIBS=
+ ;;
+*-*-*)
+ SHCC=$CC
+ SHCFLAGS="$CFLAGS -fPIC"
+ SHCPPFLAGS="$CPPFLAGS"
+ SHLD="$CC -shared"
+ SHLDFLAGS="$SHLDFLAGS $LDFLAGS"
+ SHLIBS=$LIBS
+ DYNLIBEXT=so
+ STANDARD_LIBS="\$(STATIC_THREADED_RELEASE_LIB) \$(SHARED_THREADED_RELEASE_LIB)"
+ SHARED_LIBS="\$(SHARED_LIBS)"
+ ;;
+esac
+
+AC_SUBST(SHCC)
+AC_SUBST(SHCFLAGS)
+AC_SUBST(SHCPPFLAGS)
+AC_SUBST(SHLD)
+AC_SUBST(SHLDFLAGS)
+AC_SUBST(SHLIBS)
+AC_SUBST(DYNLIBEXT)
+AC_SUBST(STANDARD_LIBS)
+AC_SUBST(SHARED_LIBS)
+
+# Check sizeof basic types and figure out endianness
+
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
@@ -629,4 +714,4 @@
],
[AC_DEFINE_UNQUOTED(STDENDIAN64_NET7_FROM_HOST, 0) AC_DEFINE_UNQUOTED(STDENDIAN64_HOST0_FROM_NET, 7) AC_MSG_WARN([[Unable to check due to cross compiling! ASSUMING LITTLE ENDIAN ARCHITECTURE! To change please fix stdutil/private/stdarch.h!]])])
-AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(src/Makefile)
Modified: trunk/stdutil/src/Makefile.in
===================================================================
--- trunk/stdutil/src/Makefile.in 2006-02-21 01:46:24 UTC (rev 311)
+++ trunk/stdutil/src/Makefile.in 2006-02-21 02:34:23 UTC (rev 312)
@@ -1,75 +1,134 @@
+.SUFFIXES: .do .to .tdo .lo .ldo .lto .ltdo
+
+LIBVERSION=1.0
+
+############################################ PROGRAMS #########################################
+
CC=@CC@
+LD=@LD@
+SHCC=@SHCC@
+SHLD=@SHLD@
+
AR=@AR@
+SOFTLINK=@LN_S@
+INSTALL=@INSTALL@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
VPATH=@srcdir@
-buildtoolsdir=$(top_srcdir)/../buildtools
+buildtoolsdir=$(top_srcdir)/buildtools
-# where to put libraries and test/example programs
-TARGET_DIR = ../lib
-APP_DIR = ../bin
+############################################# FLAGS ###########################################
-############################################# OPTIONS #########################################
+CFLAGS=@CFLAGS@
+CPPFLAGS=@CPPFLAGS@ -I./ -I$(srcdir)
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
-# build thread safe library and enable std locking mechanisms (stdthreads.h)
-CFLAGS += -D_REENTRANT
+SHCFLAGS=@SHCFLAGS@
+SHCPPFLAGS=@SHCPPFLAGS@ -I./ -I$(srcdir)
+SHLDFLAGS=@SHLDFLAGS@
+SHLIBS=@SHLIBS@
-# SAFETY_CHECKS - check and be sure some condition that should be true is true (sanity checks)
-CFLAGS += -DSTDSAFETY_CHECKS
+THLIBS=@THLIBS@
+THLDFLAGS=@THLDFLAGS@
-# BOUNDS_CHECKS - try to check that the user is using the DS's properly (doesn't check all uses)
-CFLAGS += -DSTDBOUNDS_CHECKS
+RELEASEFLAGS=-DNDEBUG -O2
+DEBUGFLAGS=-g -DSTDSAFETY_CHECKS -DSTDBOUNDS_CHECKS
+THREADFLAGS=-D_REENTRANT
-# other flags
-CFLAGS += -fPIC -g -Wall -O2 -I. -I$(srcdir)
+############################################# OBJECTS #########################################
-# add pthreads library if necessary
-LIBS = @LIBS@
+STATIC_NOTHREAD_RELEASE_OBJS=stdutil.o stderror.o stdthread.o stdtime.o stdfd.o stdit.o stdarr.o stdcarr.o stddll.o stdhash.o stdskl.o
+STATIC_NOTHREAD_DEBUG_OBJS=stdutil.do stderror.do stdthread.do stdtime.do stdfd.do stdit.do stdarr.do stdcarr.do stddll.do stdhash.do stdskl.do
+STATIC_THREADED_RELEASE_OBJS=stdutil.to stderror.to stdthread.to stdtime.to stdfd.to stdit.to stdarr.to stdcarr.to stddll.to stdhash.to stdskl.to
+STATIC_THREADED_DEBUG_OBJS=stdutil.tdo stderror.tdo stdthread.tdo stdtime.tdo stdfd.tdo stdit.tdo stdarr.tdo stdcarr.tdo stddll.tdo stdhash.tdo stdskl.tdo
+SHARED_NOTHREAD_RELEASE_OBJS=stdutil.lo stderror.lo stdthread.lo stdtime.lo stdfd.lo stdit.lo stdarr.lo stdcarr.lo stddll.lo stdhash.lo stdskl.lo
+SHARED_NOTHREAD_DEBUG_OBJS=stdutil.ldo stderror.ldo stdthread.ldo stdtime.ldo stdfd.ldo stdit.ldo stdarr.ldo stdcarr.ldo stddll.ldo stdhash.ldo stdskl.ldo
+SHARED_THREADED_RELEASE_OBJS=stdutil.lto stderror.lto stdthread.lto stdtime.lto stdfd.lto stdit.lto stdarr.lto stdcarr.lto stddll.lto stdhash.lto stdskl.lto
+SHARED_THREADED_DEBUG_OBJS=stdutil.ltdo stderror.ltdo stdthread.ltdo stdtime.ltdo stdfd.ltdo stdit.ltdo stdarr.ltdo stdcarr.ltdo stddll.ltdo stdhash.ltdo stdskl.ltdo
############################################# TARGETS #########################################
-# stdutil library object files
-OBJS = stdutil.o stderror.o stdthread.o stdtime.o stdfd.o stdit.o stdarr.o stdcarr.o stddll.o stdhash.o stdskl.o
+BINDIR=../bin
+LIBDIR=../lib
-# targets
-LIBSTDUTIL = $(TARGET_DIR)/libstdutil.a
-TESTS = $(APP_DIR)/stddll_test $(APP_DIR)/stdarr_test $(APP_DIR)/stdcarr_test $(APP_DIR)/stdhash_test
-TARGETS = $(LIBSTDUTIL) $(TESTS)
+STATIC_NOTHREAD_RELEASE_LIB=$(LIBDIR)/libstdutil-nothread-release.a
+STATIC_NOTHREAD_DEBUG_LIB=$(LIBDIR)/libstdutil-nothread-debug.a
+STATIC_THREADED_RELEASE_LIB=$(LIBDIR)/libstdutil-threaded-release.a
+STATIC_THREADED_DEBUG_LIB=$(LIBDIR)/libstdutil-threaded-debug.a
+SHARED_NOTHREAD_RELEASE_LIB=$(LIBDIR)/libstdutil-nothread-release.$(LIBVERSION). at DYNLIBEXT@
+SHARED_NOTHREAD_DEBUG_LIB=$(LIBDIR)/libstdutil-nothread-debug.$(LIBVERSION). at DYNLIBEXT@
+SHARED_THREADED_RELEASE_LIB=$(LIBDIR)/libstdutil-threaded-release.$(LIBVERSION). at DYNLIBEXT@
+SHARED_THREADED_DEBUG_LIB=$(LIBDIR)/libstdutil-threaded-debug.$(LIBVERSION). at DYNLIBEXT@
-############################################# RULES ###########################################
+STATIC_LIBS=$(STATIC_NOTHREAD_RELEASE_LIB) $(STATIC_NOTHREAD_DEBUG_LIB) $(STATIC_THREADED_RELEASE_LIB) $(STATIC_THREADED_DEBUG_LIB)
+SHARED_LIBS=$(SHARED_NOTHREAD_RELEASE_LIB) $(SHARED_NOTHREAD_DEBUG_LIB) $(SHARED_THREADED_RELEASE_LIB) $(SHARED_THREADED_DEBUG_LIB)
-all: $(LIBSTDUTIL)
+ALLTARGETS=$(STATIC_LIBS) @SHARED_LIBS@
-$(LIBSTDUTIL): $(OBJS)
- $(buildtoolsdir)/mkinstalldirs $(TARGET_DIR)
- $(AR) -rs $(LIBSTDUTIL) $(OBJS)
+########################################### BUILD RULES ########################################
+standard: $(LIB_DIR) @STANDARD_LIBS@
-$(APP_DIR):
- $(buildtoolsdir)/mkinstalldirs $(APP_DIR)
+all: $(LIB_DIR) $(ALLTARGETS)
+$(LIB_DIR):
+ $(buildtoolsdir)/mkinstalldirs $(LIB_DIR)
+
+$(STATIC_NOTHREAD_RELEASE_LIB): $(STATIC_NOTHREAD_RELEASE_OBJS)
+ $(AR) rvs $@ $(STATIC_NOTHREAD_RELEASE_OBJS)
+
+$(STATIC_NOTHREAD_DEBUG_LIB): $(STATIC_NOTHREAD_DEBUG_OBJS)
+ $(AR) rvs $@ $(STATIC_NOTHREAD_DEBUG_OBJS)
+
+$(STATIC_THREADED_RELEASE_LIB): $(STATIC_THREADED_RELEASE_OBJS)
+ $(AR) rvs $@ $(STATIC_THREADED_RELEASE_OBJS)
+ $(SOFTLINK) -f $@ $(LIBDIR)/libstdutil.a
+
+$(STATIC_THREADED_DEBUG_LIB): $(STATIC_THREADED_DEBUG_OBJS)
+ $(AR) rvs $@ $(STATIC_THREADED_DEBUG_OBJS)
+
+$(SHARED_NOTHREAD_RELEASE_LIB): $(SHARED_NOTHREAD_RELEASE_OBJS)
+ $(SHLD) $(SHLDFLAGS) -o $@ $(SHARED_NOTHREAD_RELEASE_OBJS) $(SHLIBS)
+
+$(SHARED_NOTHREAD_DEBUG_LIB): $(SHARED_NOTHREAD_DEBUG_OBJS)
+ $(SHLD) $(SHLDFLAGS) -o $@ $(SHARED_NOTHREAD_DEBUG_OBJS) $(SHLIBS)
+
+$(SHARED_THREADED_RELEASE_LIB): $(SHARED_THREADED_RELEASE_OBJS)
+ $(SHLD) $(SHLDFLAGS) -o $@ $(SHARED_THREADED_RELEASE_OBJS) $(SHLIBS) $(THLIBS)
+ $(SOFTLINK) -f $@ $(LIBDIR)/libstdutil. at DYNLIBEXT@
+
+$(SHARED_THREADED_DEBUG_LIB): $(SHARED_THREADED_DEBUG_OBJS)
+ $(SHLD) $(SHLDFLAGS) -o $@ $(SHARED_THREADED_DEBUG_OBJS) $(SHLIBS) $(THLIBS)
+
clean:
- rm -f *.o core* *~ stdutil/*~ stdutil/private/*~ stdtest/*~ $(TARGETS)
+ rm -f *.o *.do *.to *.tdo *.lo *.ldo *.lto *.ltdo core* *~ $(ALLTARGETS) $(LIBDIR)/stdutil.a $(LIBDIR)/stdutil. at DYNLIBEXT@
distclean: clean
rm -f Makefile
-veryclean: distclean
+uberclean: distclean
-tests: $(TESTS)
- $(APP_DIR)/stddll_test
- $(APP_DIR)/stdarr_test
- $(APP_DIR)/stdcarr_test
- $(APP_DIR)/stdhash_test
+.c.o:
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(RELEASEFLAGS) -c $<
-$(APP_DIR)/stddll_test: $(LIBSTDUTIL) $(APP_DIR) stdtest/stddll_test.c
- $(CC) $(CFLAGS) -o $(APP_DIR)/stddll_test stdtest/stddll_test.c $(LIBSTDUTIL) $(LIBS)
+.c.do:
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) -c $< -o $*.do
-$(APP_DIR)/stdarr_test: $(APP_DIR)/stddll_test $(APP_DIR) stdtest/stdarr_test.c
- $(CC) $(CFLAGS) -o $(APP_DIR)/stdarr_test stdtest/stdarr_test.c $(LIBSTDUTIL) $(LIBS)
+.c.to:
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(RELEASEFLAGS) $(THREADFLAGS) -c $< -o $*.to
-$(APP_DIR)/stdcarr_test: $(APP_DIR)/stddll_test $(APP_DIR) stdtest/stdcarr_test.c
- $(CC) $(CFLAGS) -o $(APP_DIR)/stdcarr_test stdtest/stdcarr_test.c $(LIBSTDUTIL) $(LIBS)
+.c.tdo:
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(THREADFLAGS) -c $< -o $*.tdo
-$(APP_DIR)/stdhash_test: $(LIBSTDUTIL) $(APP_DIR) stdtest/stdhash_test.c
- $(CC) $(CFLAGS) -o $(APP_DIR)/stdhash_test stdtest/stdhash_test.c $(LIBSTDUTIL) $(LIBS)
+.c.lo:
+ $(SHCC) $(SHCFLAGS) $(SHCPPFLAGS) $(RELEASEFLAGS) -c $< -o $*.lo
+
+.c.ldo:
+ $(SHCC) $(SHCFLAGS) $(SHCPPFLAGS) $(DEBUGFLAGS) -c $< -o $*.ldo
+
+.c.lto:
+ $(SHCC) $(SHCFLAGS) $(SHCPPFLAGS) $(RELEASEFLAGS) $(THREADFLAGS) -c $< -o $*.lto
+
+.c.ltdo:
+ $(SHCC) $(SHCFLAGS) $(SHCPPFLAGS) $(DEBUGFLAGS) $(THREADFLAGS) -c $< -o $*.ltdo
Modified: trunk/stdutil/src/stdthread.c
===================================================================
--- trunk/stdutil/src/stdthread.c 2006-02-21 01:46:24 UTC (rev 311)
+++ trunk/stdutil/src/stdthread.c 2006-02-21 02:34:23 UTC (rev 312)
@@ -108,7 +108,7 @@
stdcode ret = STDESUCCESS;
DWORD term_status;
- if ((tmp = WaitForSingleObject(thr, INFINITE)) != WAIT_OBJECT_0) {
+ if (WaitForSingleObject(thr, INFINITE) != WAIT_OBJECT_0) {
goto stdthread_join_fail;
}
@@ -248,9 +248,15 @@
if (hardgrab) {
EnterCriticalSection(mut);
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
} else if (!TryEnterCriticalSection(mut)) {
ret = STDEBUSY;
}
+# else
+ } else {
+ ret = STDENOSYS;
+ }
+# endif
} __except ((GetExceptionCode() == STATUS_NO_MEMORY ||
GetExceptionCode() == STATUS_INVALID_HANDLE) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
More information about the Spread-cvs
mailing list