mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
some fix
This commit is contained in:
parent
c526021f6f
commit
2d52d6d538
423
configure
vendored
423
configure
vendored
|
@ -837,7 +837,6 @@ STATIC_ONLY_TRUE
|
|||
MODULE_LIBTOOL_OPTIONS
|
||||
MS_LIB_AVAILABLE_FALSE
|
||||
MS_LIB_AVAILABLE_TRUE
|
||||
CXXCPP
|
||||
OTOOL64
|
||||
OTOOL
|
||||
LIPO
|
||||
|
@ -857,6 +856,7 @@ LIBTOOL
|
|||
OBJDUMP
|
||||
DLLTOOL
|
||||
AS
|
||||
CXXCPP
|
||||
ms_librarian
|
||||
WINDRES
|
||||
SOLARIS_FALSE
|
||||
|
@ -2180,6 +2180,134 @@ fi
|
|||
|
||||
} # ac_fn_cxx_try_compile
|
||||
|
||||
# ac_fn_cxx_try_cpp LINENO
|
||||
# ------------------------
|
||||
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_cxx_try_cpp ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if { { ac_try="$ac_cpp conftest.$ac_ext"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } > conftest.i && {
|
||||
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
as_fn_set_status $ac_retval
|
||||
|
||||
} # ac_fn_cxx_try_cpp
|
||||
|
||||
# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
|
||||
# ---------------------------------------------------------
|
||||
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
||||
# the include files in INCLUDES and setting the cache variable VAR
|
||||
# accordingly.
|
||||
ac_fn_cxx_check_header_mongrel ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if eval \${$3+:} false; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
|
||||
$as_echo_n "checking $2 usability... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
|
||||
$as_echo "$ac_header_compiler" >&6; }
|
||||
|
||||
# Is the header present?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
|
||||
$as_echo_n "checking $2 presence... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
|
||||
$as_echo "$ac_header_preproc" >&6; }
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
|
||||
yes:no: )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
;;
|
||||
no:yes:* )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
|
||||
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
|
||||
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
|
||||
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
|
||||
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
( $as_echo "## ---------------------------------------- ##
|
||||
## Report this to stefano.casazza@gmail.com ##
|
||||
## ---------------------------------------- ##"
|
||||
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
eval "$3=\$ac_header_compiler"
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_cxx_check_header_mongrel
|
||||
|
||||
# ac_fn_cxx_try_run LINENO
|
||||
# ------------------------
|
||||
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
|
||||
|
@ -2335,43 +2463,6 @@ $as_echo "$ac_res" >&6; }
|
|||
|
||||
} # ac_fn_c_check_func
|
||||
|
||||
# ac_fn_cxx_try_cpp LINENO
|
||||
# ------------------------
|
||||
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
|
||||
ac_fn_cxx_try_cpp ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if { { ac_try="$ac_cpp conftest.$ac_ext"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
$as_echo "$ac_try_echo"; } >&5
|
||||
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
|
||||
ac_status=$?
|
||||
if test -s conftest.err; then
|
||||
grep -v '^ *+' conftest.err >conftest.er1
|
||||
cat conftest.er1 >&5
|
||||
mv -f conftest.er1 conftest.err
|
||||
fi
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; } > conftest.i && {
|
||||
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_retval=1
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
as_fn_set_status $ac_retval
|
||||
|
||||
} # ac_fn_cxx_try_cpp
|
||||
|
||||
# ac_fn_cxx_try_link LINENO
|
||||
# -------------------------
|
||||
# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||
|
@ -2418,97 +2509,6 @@ fi
|
|||
|
||||
} # ac_fn_cxx_try_link
|
||||
|
||||
# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
|
||||
# ---------------------------------------------------------
|
||||
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
||||
# the include files in INCLUDES and setting the cache variable VAR
|
||||
# accordingly.
|
||||
ac_fn_cxx_check_header_mongrel ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if eval \${$3+:} false; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
|
||||
$as_echo_n "checking $2 usability... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
|
||||
$as_echo "$ac_header_compiler" >&6; }
|
||||
|
||||
# Is the header present?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
|
||||
$as_echo_n "checking $2 presence... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
|
||||
$as_echo "$ac_header_preproc" >&6; }
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
|
||||
yes:no: )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
;;
|
||||
no:yes:* )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
|
||||
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
|
||||
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
|
||||
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
|
||||
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
( $as_echo "## ---------------------------------------- ##
|
||||
## Report this to stefano.casazza@gmail.com ##
|
||||
## ---------------------------------------- ##"
|
||||
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if eval \${$3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
eval "$3=\$ac_header_compiler"
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
fi
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_cxx_check_header_mongrel
|
||||
|
||||
# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
|
||||
# ---------------------------------------------
|
||||
# Tests whether TYPE exists after having included INCLUDES, setting cache
|
||||
|
@ -5886,6 +5886,9 @@ $as_echo "${T_MD}Build for Target <${target}> with Environment <${STAGING_DIR}>:
|
|||
if test "x$STAGING_DIR" != "x" ; then
|
||||
CROSS_ENVIRONMENT=$STAGING_DIR
|
||||
fi
|
||||
|
||||
$as_echo "#define CROSS_COMPILE 1" >>confdefs.h
|
||||
|
||||
else
|
||||
if false; then
|
||||
CROSS_COMPILING_TRUE=
|
||||
|
@ -7810,12 +7813,161 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok ($target_os)" >&5
|
||||
$as_echo "ok ($target_os)" >&6; }
|
||||
|
||||
ULIB_LIBS="$ULIB_LIBS -lexecinfo"
|
||||
CPPFLAGS="$CPPFLAGS -fpermissive -Wno-sign-compare"
|
||||
|
||||
if test "$target_os" = "netbsd"; then
|
||||
CPPFLAGS="$CPPFLAGS -D__UNIKERNEL__"
|
||||
## LDFLAGS="${LDFLAGS} -Wl,--no-as-needed -lrump -Wl,--no-as-needed -lrumpuser"
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
|
||||
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
|
||||
if test -z "$CXXCPP"; then
|
||||
if ${ac_cv_prog_CXXCPP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
# Double quotes because CXXCPP needs to be expanded
|
||||
for CXXCPP in "$CXX -E" "/lib/cpp"
|
||||
do
|
||||
ac_preproc_ok=false
|
||||
for ac_cxx_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
ac_cv_prog_CXXCPP=$CXXCPP
|
||||
|
||||
fi
|
||||
CXXCPP=$ac_cv_prog_CXXCPP
|
||||
else
|
||||
ac_cv_prog_CXXCPP=$CXXCPP
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
|
||||
$as_echo "$CXXCPP" >&6; }
|
||||
ac_preproc_ok=false
|
||||
for ac_cxx_preproc_warn_flag in '' yes
|
||||
do
|
||||
# Use a header file that comes with gcc, so configuring glibc
|
||||
# with a fresh cross-compiler works.
|
||||
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
# <limits.h> exists even on freestanding compilers.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
Syntax error
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
|
||||
else
|
||||
# Broken: fails on valid input.
|
||||
continue
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
# OK, works on sane cases. Now check whether nonexistent headers
|
||||
# can be detected and how.
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ac_nonexistent.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_cpp "$LINENO"; then :
|
||||
# Broken: success on invalid input.
|
||||
continue
|
||||
else
|
||||
# Passes both tests.
|
||||
ac_preproc_ok=:
|
||||
break
|
||||
fi
|
||||
rm -f conftest.err conftest.i conftest.$ac_ext
|
||||
|
||||
done
|
||||
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
|
||||
rm -f conftest.i conftest.err conftest.$ac_ext
|
||||
if $ac_preproc_ok; then :
|
||||
|
||||
else
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
for ac_header in rump/rump.h
|
||||
do :
|
||||
ac_fn_cxx_check_header_mongrel "$LINENO" "rump/rump.h" "ac_cv_header_rump_rump_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_rump_rump_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_RUMP_RUMP_H 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
as_fn_error $? "rump kernel required" "$LINENO" 5
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
else
|
||||
ULIB_LIBS="$ULIB_LIBS -lexecinfo"
|
||||
# Disable -ffunction-sections -fdata-sections and accompanying --gc-sections on netbsd because --gc-sections doesn't work with the netbsd-4 and netbsd-5 linker
|
||||
LDFLAGS="${LDFLAGS} -Wl,--no-gc-sections"
|
||||
fi
|
||||
|
@ -18973,7 +19125,7 @@ $as_echo "#define U_STATIC_ONLY 1" >>confdefs.h
|
|||
if test -z "$enable_stdcpp"; then
|
||||
enable_stdcpp="no"
|
||||
fi
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno; then
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno -a "$target_os" != "netbsd"; then
|
||||
ULIB_LIBS="$ULIB_LIBS -lgcc"
|
||||
fi
|
||||
else
|
||||
|
@ -19139,7 +19291,6 @@ $as_echo "" >&6; }
|
|||
$as_echo "${T_MD}Checking for headers:${T_ME}" >&6; }
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
|
||||
$as_echo_n "checking for ANSI C header files... " >&6; }
|
||||
if ${ac_cv_header_stdc+:} false; then :
|
||||
|
@ -23369,7 +23520,7 @@ if test "${enable_memory_pool+set}" = set; then :
|
|||
enableval=$enable_memory_pool;
|
||||
fi
|
||||
|
||||
if test -z "$enable_memory_pool"; then
|
||||
if test -z "$enable_memory_pool" -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
enable_memory_pool="yes"
|
||||
fi
|
||||
if test "$enable_memory_pool" = "yes"; then
|
||||
|
@ -23424,7 +23575,7 @@ if test "${enable_gcc_optimized+set}" = set; then :
|
|||
enableval=$enable_gcc_optimized;
|
||||
fi
|
||||
|
||||
if test -z "$enable_gcc_optimized"; then
|
||||
if test -z "$enable_gcc_optimized" -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
enable_gcc_optimized="yes"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_gcc_optimized}" >&5
|
||||
|
@ -23451,7 +23602,7 @@ if test "${enable_new_ldflags+set}" = set; then :
|
|||
enableval=$enable_new_ldflags;
|
||||
fi
|
||||
|
||||
if test -z "$enable_new_ldflags" -a test "x$OPERATINGSYSTEM" = xlinux; then
|
||||
if test -z "$enable_new_ldflags" -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
enable_new_ldflags="yes"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_new_ldflags}" >&5
|
||||
|
@ -28707,7 +28858,7 @@ CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti"
|
|||
|
||||
# If gcc compiler add values to *FLAGS...
|
||||
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno; then
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
|
||||
|
|
|
@ -131,6 +131,7 @@ if test "$cross_compiling" = "yes"; then
|
|||
if test "x$STAGING_DIR" != "x" ; then
|
||||
CROSS_ENVIRONMENT=$STAGING_DIR
|
||||
fi
|
||||
AC_DEFINE([CROSS_COMPILE],[1],[Define if we are cross compiling])
|
||||
else
|
||||
AM_CONDITIONAL(CROSS_COMPILING, false)
|
||||
PKG_CONFIG_PATH=`pkg-config --variable pc_path pkg-config`
|
||||
|
@ -272,12 +273,14 @@ case "$target_os" in
|
|||
*netbsd*)
|
||||
AC_MSG_RESULT([ok ($target_os)])
|
||||
|
||||
ULIB_LIBS="$ULIB_LIBS -lexecinfo"
|
||||
CPPFLAGS="$CPPFLAGS -fpermissive -Wno-sign-compare"
|
||||
|
||||
if test "$target_os" = "netbsd"; then
|
||||
CPPFLAGS="$CPPFLAGS -D__UNIKERNEL__"
|
||||
## LDFLAGS="${LDFLAGS} -Wl,--no-as-needed -lrump -Wl,--no-as-needed -lrumpuser"
|
||||
AC_CHECK_HEADERS([rump/rump.h],, AC_MSG_ERROR([rump kernel required]))
|
||||
else
|
||||
ULIB_LIBS="$ULIB_LIBS -lexecinfo"
|
||||
# Disable -ffunction-sections -fdata-sections and accompanying --gc-sections on netbsd because --gc-sections doesn't work with the netbsd-4 and netbsd-5 linker
|
||||
LDFLAGS="${LDFLAGS} -Wl,--no-gc-sections"
|
||||
fi
|
||||
|
@ -499,7 +502,7 @@ if test "$enable_static" = "yes" -a "$enable_shared" = "no"; then
|
|||
if test -z "$enable_stdcpp"; then
|
||||
enable_stdcpp="no"
|
||||
fi
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno; then
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno -a "$target_os" != "netbsd"; then
|
||||
ULIB_LIBS="$ULIB_LIBS -lgcc"
|
||||
fi
|
||||
else
|
||||
|
@ -2028,7 +2031,7 @@ CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti"
|
|||
|
||||
# If gcc compiler add values to *FLAGS...
|
||||
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno; then
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes" -a "x$GCC_IS_CLANG" = xno -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
|
||||
TWOCAN_CONF_MSG(Checking for gcc compiler flags)
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ userver {
|
|||
# ENABLE_INOTIFY enable automatic update of cached document root image with inotify
|
||||
# CACHE_FILE_MASK mask (DOS regexp) of pathfile that content be cached in memory (default: "*.css|*.js|*.*html|*.png|*.gif|*.jpg")
|
||||
# CACHE_AVOID_MASK mask (DOS regexp) of pathfile that presence NOT be cached in memory
|
||||
# NOCACHE_FILE_MASK mask (DOS regexp) of pathfile that content NOT be cached in memory
|
||||
# CACHE_FILE_STORE pathfile of memory cache stored on filesystem
|
||||
#
|
||||
# CGI_TIMEOUT timeout for cgi execution
|
||||
|
|
|
@ -70,12 +70,17 @@
|
|||
#endif
|
||||
|
||||
#if defined(DEBUG) || defined(U_TEST)
|
||||
# if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
|
||||
# define U_NULL_POINTER (const void*)0x0000ffff
|
||||
# else
|
||||
# define U_NULL_POINTER (const void*)0
|
||||
# endif
|
||||
# define U_INTERNAL_ASSERT(expr) { U_ASSERT_MACRO(expr,"ASSERTION FALSE","") }
|
||||
# define U_INTERNAL_ASSERT_MINOR(a,b) { U_ASSERT_MACRO((a)<(b),"NOT LESS","") }
|
||||
# define U_INTERNAL_ASSERT_MAJOR(a,b) { U_ASSERT_MACRO((a)>(b),"NOT GREATER","") }
|
||||
# define U_INTERNAL_ASSERT_EQUALS(a,b) { U_ASSERT_MACRO((a)==(b),"NOT EQUALS","") }
|
||||
# define U_INTERNAL_ASSERT_DIFFERS(a,b) { U_ASSERT_MACRO((a)!=(b),"NOT DIFFERENT","") }
|
||||
# define U_INTERNAL_ASSERT_POINTER(ptr) { U_ASSERT_MACRO((const void*)ptr>(const void*)0x0000ffff,"~NULL POINTER","") }
|
||||
# define U_INTERNAL_ASSERT_POINTER(ptr) { U_ASSERT_MACRO((const void*)ptr>U_NULL_POINTER,"~NULL POINTER","") }
|
||||
# define U_INTERNAL_ASSERT_RANGE(a,x,b) { U_ASSERT_MACRO((x)>=(a)&&(x)<=(b),"VALUE OUT OF RANGE","") }
|
||||
|
||||
# define U_INTERNAL_ASSERT_MSG(expr,info) \
|
||||
|
@ -89,7 +94,7 @@
|
|||
# define U_INTERNAL_ASSERT_DIFFERS_MSG(a,b,info) \
|
||||
{ U_ASSERT_MACRO((a)!=(b),"NOT DIFFERENT",info) }
|
||||
# define U_INTERNAL_ASSERT_POINTER_MSG(ptr,info) \
|
||||
{ U_ASSERT_MACRO((const void*)ptr>(const void*)0x0000ffff,"~NULL POINTER",info) }
|
||||
{ U_ASSERT_MACRO((const void*)ptr>U_NULL_POINTER,"~NULL POINTER",info) }
|
||||
# define U_INTERNAL_ASSERT_RANGE_MSG(a,x,b,info) \
|
||||
{ U_ASSERT_MACRO((x)>=(a)&&(x)<=(b),"VALUE OUT OF RANGE",info) }
|
||||
#else
|
||||
|
|
|
@ -137,9 +137,9 @@ static WiAuthDataStorage* data_rec;
|
|||
static URDBObjectHandler<UDataStorage*>* db_user;
|
||||
static URDBObjectHandler<UDataStorage*>* db_nodog;
|
||||
|
||||
#define IP_UNIFI "151.11.47.5"
|
||||
#define IP_UNIFI_TMP "159.213.248.230"
|
||||
#define IP_UNIFI "159.213.248.230"
|
||||
#define IP_CASCINE "159.213.248.232"
|
||||
#define IP_UNIFI_TMP "151.11.47.5"
|
||||
#define NAMED_PIPE "/tmp/wi_auth_db.op"
|
||||
#define FIRENZECARD_REDIR "http://wxfi.comune.fi.it/?ap=%v"
|
||||
#define LOGIN_VALIDATE_REDIR "http://www.google.com/login_validate?%v"
|
||||
|
@ -1427,6 +1427,20 @@ static void setAccessPointReference(const char* s, uint32_t n)
|
|||
{
|
||||
U_TRACE(5, "::setAccessPointReference(%.*S,%u)", n, s, n)
|
||||
|
||||
ap_ref->setBuffer(100U);
|
||||
|
||||
if (ap_label->empty()) (void) ap_label->assign(U_CONSTANT_TO_PARAM("ap"));
|
||||
|
||||
if (U_STREQ(s, n, IP_UNIFI) ||
|
||||
U_STREQ(s, n, IP_CASCINE) ||
|
||||
U_STREQ(s, n, IP_UNIFI_TMP))
|
||||
{
|
||||
if (ap_label->equal(U_CONSTANT_TO_PARAM("05"))) ap_ref->snprintf("Xcareggi", 0);
|
||||
else if (U_STREQ(s, n, IP_CASCINE)) ap_ref->snprintf("Xcascine", 0);
|
||||
else ap_ref->snprintf("Xunifi", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ex: ap@10.8.1.2 => X0256Rap
|
||||
|
||||
char* ptr;
|
||||
|
@ -1462,11 +1476,8 @@ static void setAccessPointReference(const char* s, uint32_t n)
|
|||
c = *(++s);
|
||||
}
|
||||
|
||||
if (ap_label->empty()) (void) ap_label->assign(U_CONSTANT_TO_PARAM("ap"));
|
||||
|
||||
ap_ref->setBuffer(100U);
|
||||
|
||||
ap_ref->snprintf("X%04dR%v", certid, ap_label->rep);
|
||||
}
|
||||
|
||||
U_INTERNAL_DUMP("ap_ref = %V", ap_ref->rep)
|
||||
}
|
||||
|
@ -1484,7 +1495,9 @@ static void usp_init_wi_auth()
|
|||
|
||||
#ifdef DEBUG
|
||||
if ((setAccessPointReference(U_CONSTANT_TO_PARAM("10.8.1.2")), ap_ref->equal(U_CONSTANT_TO_PARAM("X0256Rap"))) == false ||
|
||||
(setAccessPointReference(U_CONSTANT_TO_PARAM("10.10.100.115")), ap_ref->equal(U_CONSTANT_TO_PARAM("X25515Rap"))) == false)
|
||||
(setAccessPointReference(U_CONSTANT_TO_PARAM("10.10.100.115")), ap_ref->equal(U_CONSTANT_TO_PARAM("X25515Rap"))) == false ||
|
||||
(setAccessPointReference(U_CONSTANT_TO_PARAM(IP_UNIFI)), ap_ref->equal(U_CONSTANT_TO_PARAM("Xunifi"))) == false ||
|
||||
(setAccessPointReference(U_CONSTANT_TO_PARAM(IP_CASCINE)), ap_ref->equal(U_CONSTANT_TO_PARAM("Xcascine"))) == false)
|
||||
{
|
||||
U_ERROR("setAccessPointReference() failed");
|
||||
}
|
||||
|
@ -2859,38 +2872,13 @@ static void setAccessPointLocalization()
|
|||
U_INTERNAL_ASSERT_POINTER(url_banner_ap_path)
|
||||
U_INTERNAL_ASSERT_POINTER(url_banner_comune_path)
|
||||
|
||||
if (ap_address->equal(U_CONSTANT_TO_PARAM(IP_UNIFI)) ||
|
||||
ap_address->equal(U_CONSTANT_TO_PARAM(IP_UNIFI)))
|
||||
{
|
||||
if (ap_label->equal(U_CONSTANT_TO_PARAM("05"))) // careggi
|
||||
{
|
||||
ap_ref_ap->snprintf( "/Xcareggi", 0);
|
||||
ap_ref_comune->snprintf("/Xcareggi", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ap_ref_ap->snprintf( "/Xunifi", 0);
|
||||
ap_ref_comune->snprintf("/Xunifi", 0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (ap_address->equal(U_CONSTANT_TO_PARAM(IP_CASCINE)))
|
||||
{
|
||||
ap_ref_ap->snprintf( "/Xcascine", 0);
|
||||
ap_ref_comune->snprintf("/Xcascine", 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ap_ref_ap->setEmpty();
|
||||
ap_ref_comune->setEmpty();
|
||||
|
||||
if ((ap_address->empty() ||
|
||||
u_isIPv4Addr(U_STRING_TO_PARAM(*ap_address)) == false) ||
|
||||
(url_banner_ap_default == 0 &&
|
||||
url_banner_comune_default == 0))
|
||||
U_INTERNAL_DUMP("ap_address = %V", ap_address->rep)
|
||||
|
||||
if (ap_address->empty() ||
|
||||
u_isIPv4Addr(U_STRING_TO_PARAM(*ap_address)) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2898,6 +2886,7 @@ static void setAccessPointLocalization()
|
|||
char* ptr;
|
||||
uint32_t len;
|
||||
char buffer[4096];
|
||||
UHTTP::UFileCacheData* ptr_file_data;
|
||||
|
||||
setAccessPointReference(U_STRING_TO_PARAM(*ap_address));
|
||||
|
||||
|
@ -2910,11 +2899,10 @@ static void setAccessPointLocalization()
|
|||
|
||||
ptr = buffer + (len = u__snprintf(buffer, sizeof(buffer), "%v%v/%v/", virtual_name->rep, url_banner_ap->rep, ap_ref->rep));
|
||||
|
||||
if (UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%s", "full/banner.html")) ||
|
||||
UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%s", "mobile/banner.html")))
|
||||
{
|
||||
ap_ref_ap->snprintf("/%v", ap_ref->rep);
|
||||
}
|
||||
ptr_file_data = UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%.*s", U_CONSTANT_TO_TRACE(" full/banner.html")));
|
||||
if (ptr_file_data == 0) ptr_file_data = UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%.*s", U_CONSTANT_TO_TRACE("mobile/banner.html")));
|
||||
|
||||
if (ptr_file_data) ap_ref_ap->snprintf("/%v", ap_ref->rep);
|
||||
|
||||
/*
|
||||
banner.snprintf("%v/%v", url_banner_ap_path->rep, ap_ref->rep);
|
||||
|
@ -2942,11 +2930,10 @@ static void setAccessPointLocalization()
|
|||
|
||||
ptr = buffer + (len = u__snprintf(buffer, sizeof(buffer), "%v%v/%v/", virtual_name->rep, url_banner_comune->rep, ap_ref->rep));
|
||||
|
||||
if (UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%s", "full/banner.html")) ||
|
||||
UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%s", "mobile/banner.html")))
|
||||
{
|
||||
ap_ref_comune->snprintf("/%v", ap_ref->rep);
|
||||
}
|
||||
ptr_file_data = UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%.*s", U_CONSTANT_TO_TRACE(" full/banner.html")));
|
||||
if (ptr_file_data == 0) ptr_file_data = UHTTP::getFileInCache(buffer, len + u__snprintf(ptr, sizeof(buffer)-len, "%.*s", U_CONSTANT_TO_TRACE("mobile/banner.html")));
|
||||
|
||||
if (ptr_file_data) ap_ref_comune->snprintf("/%v", ap_ref->rep);
|
||||
|
||||
/*
|
||||
banner.snprintf("%v/%v", url_banner_comune_path->rep, ap_ref->rep);
|
||||
|
@ -4370,7 +4357,11 @@ static void GET_login() // MAIN PAGE
|
|||
|
||||
sz += request1.size();
|
||||
|
||||
if (url_banner_ap_default ||
|
||||
url_banner_comune_default)
|
||||
{
|
||||
setAccessPointLocalization();
|
||||
}
|
||||
|
||||
U_INTERNAL_DUMP("request1 = %V", request1.rep)
|
||||
|
||||
|
@ -4968,7 +4959,11 @@ error:
|
|||
bool ball = false,
|
||||
bfirenzecard = false;
|
||||
|
||||
if (user_rec->_auth_domain.find("firenzecard") != U_NOT_FOUND)
|
||||
if (user_rec->_auth_domain.find("firenzecard") == U_NOT_FOUND)
|
||||
{
|
||||
if (user_rec->_auth_domain.find("all") != U_NOT_FOUND) ball = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bfirenzecard = true;
|
||||
|
||||
|
@ -4978,10 +4973,6 @@ error:
|
|||
|
||||
redir->snprintf(FIRENZECARD_REDIR, ap_ref->rep);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (user_rec->_auth_domain.find("all") != U_NOT_FOUND) ball = true;
|
||||
}
|
||||
|
||||
// NB: we may be a different process from what it has updated so that we need to read the record...
|
||||
|
||||
|
|
|
@ -536,7 +536,11 @@ public:
|
|||
|
||||
fstat();
|
||||
|
||||
U_RETURN(mtime != st_mtime);
|
||||
U_INTERNAL_DUMP("mtime = %ld, st_mtime = %ld", (long)mtime, (long)st_mtime)
|
||||
|
||||
if (mtime != st_mtime) U_RETURN(true);
|
||||
|
||||
U_RETURN(false);
|
||||
}
|
||||
|
||||
static bool isBlocking(int _fd, int& flags) // actual state is blocking...?
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define if we are cross compiling */
|
||||
#undef CROSS_COMPILE
|
||||
|
||||
/* C++ Flags */
|
||||
#undef CXXFLAGS_VAR
|
||||
|
||||
|
@ -344,6 +347,9 @@
|
|||
/* Define to 1 if the system has the type `ptrdiff_t'. */
|
||||
#undef HAVE_PTRDIFF_T
|
||||
|
||||
/* Define to 1 if you have the <rump/rump.h> header file. */
|
||||
#undef HAVE_RUMP_RUMP_H
|
||||
|
||||
/* has sched_getaffinity */
|
||||
#undef HAVE_SCHED_GETAFFINITY
|
||||
|
||||
|
|
|
@ -117,7 +117,8 @@ protected:
|
|||
|
||||
static bool checkForDeadLock(UTimeVal& time); // NB: check if process has restarted and it had a lock active...
|
||||
|
||||
#if !defined(__MACOSX__) && !defined(__APPLE__) && defined(HAVE_SEM_GETVALUE)
|
||||
#if !defined(__MACOSX__) && !defined(__APPLE__) && defined(HAVE_SEM_GETVALUE) && \
|
||||
((!defined(LINUX) && !defined(__LINUX__) && !defined(__linux__)) || LINUX_VERSION_CODE > KERNEL_VERSION(2,6,7))
|
||||
int getValue() { int value = -1; (void) sem_getvalue(psem, &value); return value; }
|
||||
#else
|
||||
int getValue() { return -1; }
|
||||
|
|
|
@ -922,6 +922,7 @@ public:
|
|||
static UString* cache_file_mask;
|
||||
static UString* cache_avoid_mask;
|
||||
static UString* cache_file_store;
|
||||
static UString* nocache_file_mask;
|
||||
static UFileCacheData* file_data;
|
||||
static UHashMap<UFileCacheData*>* cache_file;
|
||||
static UFileCacheData* file_not_in_cache_data;
|
||||
|
@ -934,9 +935,9 @@ public:
|
|||
|
||||
U_INTERNAL_DUMP("file_data->array = %p", file_data->array)
|
||||
|
||||
bool result = (file_data->array != 0);
|
||||
if (file_data->array != 0) U_RETURN(true);
|
||||
|
||||
U_RETURN(result);
|
||||
U_RETURN(false);
|
||||
}
|
||||
|
||||
static bool isDataCompressFromCache()
|
||||
|
@ -946,12 +947,23 @@ public:
|
|||
U_INTERNAL_ASSERT_POINTER(file_data)
|
||||
U_INTERNAL_ASSERT_POINTER(file_data->array)
|
||||
|
||||
bool result = (file_data->array->size() > 2);
|
||||
if (file_data->array->size() > 2) U_RETURN(true);
|
||||
|
||||
U_RETURN(result);
|
||||
U_RETURN(false);
|
||||
}
|
||||
|
||||
static void checkFileForCache();
|
||||
static void checkFileForCache()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::checkFileForCache()")
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(pathname)
|
||||
|
||||
file->setPath(*pathname);
|
||||
|
||||
if (file->stat()) manageDataForCache(); // NB: file->stat() get also the size of the file...
|
||||
}
|
||||
|
||||
static void renewFileDataInCache();
|
||||
static void checkFileInCache(const char* path, uint32_t len);
|
||||
|
||||
static bool isFileInCache()
|
||||
|
@ -1013,7 +1025,7 @@ private:
|
|||
static void processRewriteRule() U_NO_EXPORT;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
static int inotify_wd;
|
||||
static char* inotify_name;
|
||||
static uint32_t inotify_len;
|
||||
|
@ -1022,8 +1034,10 @@ private:
|
|||
static UFileCacheData* inotify_file_data;
|
||||
|
||||
static void in_READ();
|
||||
static void initInotify();
|
||||
static void setInotifyPathname() U_NO_EXPORT;
|
||||
static bool getInotifyPathDirectory(UStringRep* key, void* value) U_NO_EXPORT;
|
||||
static bool checkForInotifyDirectory(UStringRep* key, void* value) U_NO_EXPORT;
|
||||
#endif
|
||||
|
||||
#ifdef U_STATIC_ONLY
|
||||
|
|
|
@ -6,7 +6,7 @@ AC_DEFUN([AC_COMPILATION_OPTIONS],[
|
|||
AC_MSG_CHECKING(if you want to enable use of memory pool)
|
||||
AC_ARG_ENABLE(memory-pool,
|
||||
[ --enable-memory-pool enable memory pool features [[default=yes]]])
|
||||
if test -z "$enable_memory_pool"; then
|
||||
if test -z "$enable_memory_pool" -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
enable_memory_pool="yes"
|
||||
fi
|
||||
if test "$enable_memory_pool" = "yes"; then
|
||||
|
@ -43,7 +43,7 @@ AC_DEFUN([AC_COMPILATION_OPTIONS],[
|
|||
AC_MSG_CHECKING(for compile with GCC optimizations flags enabled)
|
||||
AC_ARG_ENABLE(gcc-optimized,
|
||||
[ --enable-gcc-optimized compile with GCC optimizations flags enabled (-finline,-fstrict-aliasing,...) [[default=yes]]])
|
||||
if test -z "$enable_gcc_optimized"; then
|
||||
if test -z "$enable_gcc_optimized" -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
enable_gcc_optimized="yes"
|
||||
fi
|
||||
AC_MSG_RESULT([${enable_gcc_optimized}])
|
||||
|
@ -61,7 +61,7 @@ AC_DEFUN([AC_COMPILATION_OPTIONS],[
|
|||
AC_MSG_CHECKING(for use of the new linker flags)
|
||||
AC_ARG_ENABLE(new-ldflags,
|
||||
[ --enable-new-ldflags enable the new linker flags (enable-new-dtags,as-needed,...) [[default=yes]]])
|
||||
if test -z "$enable_new_ldflags" -a test "x$OPERATINGSYSTEM" = xlinux; then
|
||||
if test -z "$enable_new_ldflags" -a "x$OPERATINGSYSTEM" = xlinux; then
|
||||
enable_new_ldflags="yes"
|
||||
fi
|
||||
AC_MSG_RESULT([${enable_new_ldflags}])
|
||||
|
|
|
@ -35,6 +35,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef __UNIKERNEL__
|
||||
# include <rump/rump.h>
|
||||
# include <rump/rump_syscalls.h>
|
||||
|
@ -43,6 +44,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
|||
# define write(...) rump_sys_write(__VA_ARGS__)
|
||||
# define close(...) rump_sys_close(__VA_ARGS__)
|
||||
#endif
|
||||
*/
|
||||
|
||||
static void printInfo(void)
|
||||
{
|
||||
|
@ -449,3 +451,11 @@ void u_trace_initFork(void)
|
|||
|
||||
printInfo();
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef __UNIKERNEL__
|
||||
# undef open
|
||||
# undef write
|
||||
# undef close
|
||||
#endif
|
||||
*/
|
||||
|
|
|
@ -71,6 +71,7 @@ int UHttpPlugIn::handlerConfig(UFileConfig& cfg)
|
|||
// ENABLE_INOTIFY enable automatic update of document root image with inotify
|
||||
// CACHE_FILE_MASK mask (DOS regexp) of pathfile that content be cached in memory (default: "*.css|*.js|*.*html|*.png|*.gif|*.jpg")
|
||||
// CACHE_AVOID_MASK mask (DOS regexp) of pathfile that presence NOT be cached in memory
|
||||
// NOCACHE_FILE_MASK mask (DOS regexp) of pathfile that content NOT be cached in memory
|
||||
// CACHE_FILE_STORE pathfile of memory cache stored on filesystem
|
||||
//
|
||||
// CGI_TIMEOUT timeout for cgi execution
|
||||
|
@ -204,6 +205,17 @@ int UHttpPlugIn::handlerConfig(UFileConfig& cfg)
|
|||
UHTTP::cache_avoid_mask = U_NEW(UString(x));
|
||||
}
|
||||
|
||||
x = cfg.at(U_CONSTANT_TO_PARAM("NOCACHE_FILE_MASK"));
|
||||
|
||||
if (x)
|
||||
{
|
||||
U_INTERNAL_ASSERT_EQUALS(UHTTP::nocache_file_mask, 0)
|
||||
|
||||
if (x.findWhiteSpace() != U_NOT_FOUND) x = UStringExt::removeWhiteSpace(x);
|
||||
|
||||
UHTTP::nocache_file_mask = U_NEW(UString(x));
|
||||
}
|
||||
|
||||
# ifdef U_STDCPP_ENABLE
|
||||
x = cfg.at(U_CONSTANT_TO_PARAM("CACHE_FILE_STORE"));
|
||||
|
||||
|
@ -267,20 +279,28 @@ int UHttpPlugIn::handlerConfig(UFileConfig& cfg)
|
|||
|
||||
// INOTIFY
|
||||
|
||||
# if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
# if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
if (cfg.readBoolean(U_CONSTANT_TO_PARAM("ENABLE_INOTIFY")))
|
||||
{
|
||||
// NB: we ask to notify for change of file system (inotify)
|
||||
// in the thread approach this is very dangerous...
|
||||
UServer_Base::handler_inotify = this;
|
||||
|
||||
# if defined(ENABLE_THREAD) && defined(U_SERVER_THREAD_APPROACH_SUPPORT)
|
||||
if (UNotifier::pthread)
|
||||
# ifdef U_CLASSIC_SUPPORT
|
||||
if (UServer_Base::isClassic())
|
||||
{
|
||||
U_SRV_LOG("WARNING: Sorry, I can't enable inode based directory notification because PREFORK_CHILD == -1 (server thread approach)");
|
||||
UServer_Base::handler_inotify = 0;
|
||||
|
||||
U_SRV_LOG("WARNING: Sorry, I can't enable inode based directory notification because PREFORK_CHILD == 1 (server classic mode)");
|
||||
}
|
||||
else
|
||||
# endif
|
||||
UServer_Base::handler_inotify = this;
|
||||
# if defined(ENABLE_THREAD) && defined(U_SERVER_THREAD_APPROACH_SUPPORT)
|
||||
if (UNotifier::pthread) // NB: we ask to notify for change of file system (inotify), in the thread approach this is not safe so far...
|
||||
{
|
||||
UServer_Base::handler_inotify = 0;
|
||||
|
||||
U_SRV_LOG("WARNING: Sorry, I can't enable inode based directory notification because PREFORK_CHILD == -1 (server thread approach)");
|
||||
}
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
|
||||
|
@ -498,6 +518,10 @@ int UHttpPlugIn::handlerFork()
|
|||
{
|
||||
U_TRACE_NO_PARAM(0, "UHttpPlugIn::handlerFork()")
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
UHTTP::initInotify();
|
||||
#endif
|
||||
|
||||
if (UHTTP::bcallInitForAllUSP) UHTTP::cache_file->callForAllEntry(UHTTP::callAfterForkForAllUSP);
|
||||
|
||||
U_RETURN(U_PLUGIN_HANDLER_PROCESSED | U_PLUGIN_HANDLER_GO_ON);
|
||||
|
|
|
@ -265,10 +265,7 @@ public:
|
|||
{
|
||||
U_TRACE_NO_PARAM(0, "UTimeoutConnection::handlerTime()")
|
||||
|
||||
U_INTERNAL_DUMP("UNotifier::num_connection = %u UNotifier::min_connection = %u", UNotifier::num_connection, UNotifier::min_connection)
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(UServer_Base::ptr_shared_data)
|
||||
U_INTERNAL_ASSERT_MAJOR(UNotifier::num_connection, UNotifier::min_connection)
|
||||
|
||||
U_gettimeofday; // NB: optimization if it is enough a time resolution of one second...
|
||||
|
||||
|
@ -293,7 +290,9 @@ public:
|
|||
|
||||
UServer_Base::last_event = u_now->tv_sec;
|
||||
|
||||
UNotifier::callForAllEntryDynamic(UServer_Base::handlerTimeoutConnection);
|
||||
U_INTERNAL_DUMP("UNotifier::num_connection = %u UNotifier::min_connection = %u", UNotifier::num_connection, UNotifier::min_connection)
|
||||
|
||||
if (UNotifier::num_connection > UNotifier::min_connection) UNotifier::callForAllEntryDynamic(UServer_Base::handlerTimeoutConnection);
|
||||
|
||||
# ifdef U_LOG_ENABLE
|
||||
if (U_CNT_PARALLELIZATION)
|
||||
|
@ -618,7 +617,7 @@ public:
|
|||
|
||||
// Now update the sending rate on all the currently-sending connections, redistributing it evenly
|
||||
|
||||
U_INTERNAL_DUMP("UNotifier::num_connection = %d", UNotifier::num_connection)
|
||||
U_INTERNAL_DUMP("UNotifier::num_connection = %u UNotifier::min_connection = %u", UNotifier::num_connection, UNotifier::min_connection)
|
||||
|
||||
if (UNotifier::num_connection > UNotifier::min_connection) UNotifier::callForAllEntryDynamic(updateSendingRate);
|
||||
}
|
||||
|
@ -869,7 +868,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
# ifndef _MSWINDOWS_
|
||||
# if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
|
||||
class UTimeThread : public UThread {
|
||||
public:
|
||||
|
||||
|
@ -1051,7 +1050,7 @@ UServer_Base::~UServer_Base()
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifndef _MSWINDOWS_
|
||||
# if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
|
||||
if (u_pthread_time)
|
||||
{
|
||||
delete (UTimeThread*)u_pthread_time;
|
||||
|
@ -2254,7 +2253,7 @@ void UServer_Base::init()
|
|||
U_INTERNAL_ASSERT_POINTER(ptr_shared_data)
|
||||
U_INTERNAL_ASSERT_DIFFERS(ptr_shared_data, MAP_FAILED)
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
bool bpthread_time = (preforked_num_kids >= 4); // intuitive heuristic...
|
||||
#else
|
||||
bool bpthread_time = false;
|
||||
|
@ -2267,7 +2266,7 @@ void UServer_Base::init()
|
|||
#endif
|
||||
ULog::initDate();
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
if (bpthread_time)
|
||||
{
|
||||
U_INTERNAL_ASSERT_POINTER(ptr_shared_data)
|
||||
|
@ -2281,7 +2280,7 @@ void UServer_Base::init()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
// NB: we block SIGHUP and SIGTERM; the threads created will inherit a copy of the signal mask...
|
||||
# ifdef sigemptyset
|
||||
sigemptyset(&mask);
|
||||
|
@ -2302,7 +2301,7 @@ void UServer_Base::init()
|
|||
|
||||
flag_loop = true; // NB: UTimeThread loop depend on this setting...
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
if (bpthread_time)
|
||||
{
|
||||
U_INTERNAL_ASSERT_EQUALS(ULog::prwlock, 0)
|
||||
|
@ -2560,7 +2559,7 @@ RETSIGTYPE UServer_Base::handlerForSigHUP(int signo)
|
|||
|
||||
(void) U_SYSCALL(gettimeofday, "%p,%p", u_now, 0);
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
if (u_pthread_time) ((UTimeThread*)u_pthread_time)->suspend();
|
||||
|
||||
# if defined(USE_LIBSSL) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
|
||||
|
@ -2582,7 +2581,7 @@ RETSIGTYPE UServer_Base::handlerForSigHUP(int signo)
|
|||
UInterrupt::insert(SIGTERM, (sighandler_t)UServer_Base::handlerForSigTERM); // async signal
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
if (u_pthread_time) ((UTimeThread*)u_pthread_time)->resume();
|
||||
|
||||
# if defined(USE_LIBSSL) && !defined(OPENSSL_NO_OCSP) && defined(SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
|
||||
|
@ -2609,7 +2608,7 @@ RETSIGTYPE UServer_Base::handlerForSigTERM(int signo)
|
|||
|
||||
if (proc->parent())
|
||||
{
|
||||
# if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
# if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
if (u_pthread_time) ((UTimeThread*)u_pthread_time)->suspend();
|
||||
# endif
|
||||
|
||||
|
@ -3199,7 +3198,7 @@ void UServer_Base::runLoop(const char* user)
|
|||
|
||||
socket->reusePort(socket_flags);
|
||||
|
||||
#ifndef _MSWINDOWS
|
||||
#if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
|
||||
if (bipc == false)
|
||||
{
|
||||
U_ASSERT_EQUALS(socket->isUDP(), false)
|
||||
|
@ -3300,7 +3299,7 @@ void UServer_Base::runLoop(const char* user)
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
#if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
(void) U_SYSCALL(pthread_sigmask, "%d,%p,%p", SIG_UNBLOCK, &mask, 0);
|
||||
#endif
|
||||
|
||||
|
@ -3376,7 +3375,16 @@ void UServer_Base::run()
|
|||
* >1 - pool of process serialize plus monitoring process
|
||||
*/
|
||||
|
||||
if (monitoring_process)
|
||||
if (monitoring_process == false)
|
||||
{
|
||||
#ifdef U_SERVER_CAPTIVE_PORTAL
|
||||
no_monitoring_process:
|
||||
#endif
|
||||
if (pluginsHandlerFork() != U_PLUGIN_HANDLER_FINISHED) U_ERROR("Plugins stage fork failed");
|
||||
|
||||
runLoop(user);
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* Main loop for the parent process with the new preforked implementation.
|
||||
|
@ -3389,7 +3397,7 @@ void UServer_Base::run()
|
|||
bool baffinity = false;
|
||||
UTimeVal to_sleep(0L, 500L * 1000L);
|
||||
|
||||
# if !defined(U_SERVER_CAPTIVE_PORTAL) && defined(HAVE_SCHED_GETAFFINITY)
|
||||
# if defined(HAVE_SCHED_GETAFFINITY) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
if (preforked_num_kids <= u_get_num_cpu() &&
|
||||
u_num_cpu > 1)
|
||||
{
|
||||
|
@ -3440,7 +3448,7 @@ void UServer_Base::run()
|
|||
{
|
||||
U_INTERNAL_DUMP("child = %P UNotifier::num_connection = %d", UNotifier::num_connection)
|
||||
|
||||
# ifdef HAVE_LIBNUMA
|
||||
# if defined(HAVE_LIBNUMA) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
if (U_SYSCALL_NO_PARAM(numa_max_node))
|
||||
{
|
||||
struct bitmask* bmask = (struct bitmask*) U_SYSCALL(numa_bitmask_alloc, "%u", 16);
|
||||
|
@ -3467,8 +3475,7 @@ void UServer_Base::run()
|
|||
* UInterrupt::setHandlerForSignal(SIGCHLD, (sighandler_t)UServer_Base::handlerForSigCHLD);
|
||||
*/
|
||||
|
||||
// NB: we can't use UInterrupt::erase() because it restore the old action (UInterrupt::init)...
|
||||
UInterrupt::setHandlerForSignal(SIGHUP, (sighandler_t)SIG_IGN);
|
||||
UInterrupt::setHandlerForSignal(SIGHUP, (sighandler_t)SIG_IGN); // NB: we can't use UInterrupt::erase() because it restore the old action (UInterrupt::init)...
|
||||
|
||||
if (pluginsHandlerFork() != U_PLUGIN_HANDLER_FINISHED) U_ERROR("Plugins stage fork failed");
|
||||
|
||||
|
@ -3493,7 +3500,7 @@ void UServer_Base::run()
|
|||
|
||||
// wait for any children to exit, and then start some more
|
||||
|
||||
# if defined(ENABLE_THREAD) && !defined(_MSWINDOWS_)
|
||||
# if (defined(LINUX) || defined(__LINUX__) || defined(__linux__)) && defined(ENABLE_THREAD)
|
||||
(void) U_SYSCALL(pthread_sigmask, "%d,%p,%p", SIG_UNBLOCK, &mask, 0);
|
||||
# endif
|
||||
|
||||
|
@ -3539,15 +3546,6 @@ void UServer_Base::run()
|
|||
|
||||
U_INTERNAL_ASSERT(proc->parent())
|
||||
}
|
||||
else
|
||||
{
|
||||
# ifdef U_SERVER_CAPTIVE_PORTAL
|
||||
no_monitoring_process:
|
||||
if (pluginsHandlerFork() != U_PLUGIN_HANDLER_FINISHED) U_ERROR("Plugins stage fork failed");
|
||||
# endif
|
||||
|
||||
runLoop(user);
|
||||
}
|
||||
|
||||
if (pluginsHandlerStop() != U_PLUGIN_HANDLER_FINISHED) U_WARNING("Plugins stage stop failed");
|
||||
|
||||
|
|
|
@ -1183,6 +1183,7 @@ void UNotifier::removeBadFd()
|
|||
{
|
||||
U_TRACE_NO_PARAM(1, "UNotifier::removeBadFd()")
|
||||
|
||||
int nfd;
|
||||
bool bwrite;
|
||||
fd_set fdmask;
|
||||
fd_set* rmask;
|
||||
|
@ -1206,16 +1207,16 @@ void UNotifier::removeBadFd()
|
|||
|
||||
U_INTERNAL_DUMP("fdmask = %B", __FDS_BITS(&fdmask)[0])
|
||||
|
||||
nfd_ready = U_SYSCALL(select, "%d,%p,%p,%p,%p", fd+1, rmask, wmask, 0, &polling);
|
||||
nfd = U_SYSCALL(select, "%d,%p,%p,%p,%p", fd+1, rmask, wmask, 0, &polling);
|
||||
|
||||
U_INTERNAL_DUMP("fd = %d op_mask = %B ISSET(read) = %b ISSET(write) = %b", fd, handler_event->op_mask,
|
||||
(rmask ? FD_ISSET(fd, rmask) : false),
|
||||
(wmask ? FD_ISSET(fd, wmask) : false))
|
||||
|
||||
if (nfd_ready)
|
||||
if (nfd)
|
||||
{
|
||||
if ( nfd_ready == -1 &&
|
||||
(nfd_ready = (bread + bwrite)))
|
||||
if (nfd == -1 &&
|
||||
(bread || bwrite))
|
||||
{
|
||||
handlerDelete(handler_event);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ void UThread::yield()
|
|||
|
||||
#ifdef HAVE_PTHREAD_CANCEL
|
||||
U_SYSCALL_VOID_NO_PARAM(pthread_testcancel);
|
||||
#elif !defined(_MSWINDOWS_)
|
||||
#elif !defined(_MSWINDOWS_) && !defined(__UNIKERNEL__)
|
||||
sigset_t old = 0;
|
||||
|
||||
if (cancel != cancelInitial &&
|
||||
|
@ -143,7 +143,7 @@ void UThread::yield()
|
|||
(void) U_SYSCALL_NO_PARAM(pthread_yield);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_PTHREAD_CANCEL) && !defined(_MSWINDOWS_)
|
||||
#if !defined(HAVE_PTHREAD_CANCEL) && !defined(_MSWINDOWS_) && !defined(__UNIKERNEL__)
|
||||
if (old) (void) U_SYSCALL(pthread_sigmask, "%d,%p,%p", SIG_SETMASK, &old, 0);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ USemaphore::~USemaphore()
|
|||
{
|
||||
U_TRACE_UNREGISTER_OBJECT(0, USemaphore)
|
||||
|
||||
U_INTERNAL_ASSERT_DIFFERS(psem, 0)
|
||||
U_INTERNAL_ASSERT_POINTER(psem)
|
||||
|
||||
#if defined(__MACOSX__) || defined(__APPLE__)
|
||||
(void) U_SYSCALL(sem_close, "%p", psem);
|
||||
|
@ -111,7 +111,7 @@ void USemaphore::post()
|
|||
{
|
||||
U_TRACE_NO_PARAM(1, "USemaphore::post()")
|
||||
|
||||
U_INTERNAL_ASSERT_DIFFERS(psem, 0)
|
||||
U_INTERNAL_ASSERT_POINTER(psem)
|
||||
|
||||
U_INTERNAL_DUMP("value = %d", getValue())
|
||||
|
||||
|
@ -173,7 +173,7 @@ bool USemaphore::wait(time_t timeoutMS)
|
|||
{
|
||||
U_TRACE(1, "USemaphore::wait(%ld)", timeoutMS) // problem with sanitize address
|
||||
|
||||
U_INTERNAL_ASSERT_DIFFERS(psem, 0)
|
||||
U_INTERNAL_ASSERT_POINTER(psem)
|
||||
U_INTERNAL_ASSERT_MAJOR(timeoutMS, 0)
|
||||
|
||||
U_INTERNAL_DUMP("value = %d", getValue())
|
||||
|
@ -207,7 +207,7 @@ void USemaphore::lock()
|
|||
{
|
||||
U_TRACE_NO_PARAM(1, "USemaphore::lock()")
|
||||
|
||||
U_INTERNAL_ASSERT_DIFFERS(psem, 0)
|
||||
U_INTERNAL_ASSERT_POINTER(psem)
|
||||
|
||||
U_INTERNAL_DUMP("value = %d", getValue())
|
||||
|
||||
|
|
|
@ -58,11 +58,9 @@
|
|||
# ifdef HAVE_SYS_INOTIFY_H
|
||||
# undef HAVE_SYS_INOTIFY_H
|
||||
# endif
|
||||
# ifndef _MSWINDOWS_
|
||||
# include <ulib/replace/inotify-nosys.h>
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define U_FLV_HEAD "FLV\x1\x1\0\0\0\x9\0\0\0\x9"
|
||||
#define U_TIME_FOR_EXPIRE (u_now->tv_sec + (365 * U_ONE_DAY_IN_SECOND))
|
||||
|
@ -91,6 +89,7 @@ UString* UHTTP::mount_point;
|
|||
UString* UHTTP::fcgi_uri_mask;
|
||||
UString* UHTTP::scgi_uri_mask;
|
||||
UString* UHTTP::cache_file_mask;
|
||||
UString* UHTTP::nocache_file_mask;
|
||||
UString* UHTTP::cache_avoid_mask;
|
||||
UString* UHTTP::cache_file_store;
|
||||
UString* UHTTP::cgi_cookie_option;
|
||||
|
@ -333,23 +332,22 @@ UHTTP::UFileCacheData::~UFileCacheData()
|
|||
|
||||
if (array) delete array;
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
if (UServer_Base::handler_inotify)
|
||||
{
|
||||
U_INTERNAL_ASSERT_DIFFERS(UServer_Base::handler_inotify->fd,-1)
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
if (wd != -1 &&
|
||||
UServer_Base::handler_inotify &&
|
||||
UServer_Base::isChild() == false)
|
||||
{
|
||||
U_INTERNAL_ASSERT_POINTER(UServer_Base::handler_inotify)
|
||||
U_INTERNAL_ASSERT_DIFFERS(UServer_Base::handler_inotify->fd, -1)
|
||||
|
||||
(void) inotify_rm_watch(UServer_Base::handler_inotify->fd, wd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// INOTIFY FOR CACHE FILE SYSTEM
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
int UHTTP::inotify_wd;
|
||||
char* UHTTP::inotify_name;
|
||||
uint32_t UHTTP::inotify_len;
|
||||
|
@ -390,6 +388,68 @@ U_NO_EXPORT bool UHTTP::getInotifyPathDirectory(UStringRep* key, void* value)
|
|||
U_RETURN(true);
|
||||
}
|
||||
|
||||
U_NO_EXPORT bool UHTTP::checkForInotifyDirectory(UStringRep* key, void* value)
|
||||
{
|
||||
U_TRACE(0, "UHTTP::checkForInotifyDirectory(%V,%p)", key, value)
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(value)
|
||||
|
||||
UHTTP::UFileCacheData* cptr = (UHTTP::UFileCacheData*)value;
|
||||
|
||||
if (cptr->ptr == 0 &&
|
||||
cptr->link == false &&
|
||||
S_ISDIR(cptr->mode))
|
||||
{
|
||||
U_INTERNAL_ASSERT_EQUALS(cptr->array, 0)
|
||||
U_INTERNAL_ASSERT(key->isNullTerminated())
|
||||
|
||||
cptr->wd = U_SYSCALL(inotify_add_watch, "%d,%s,%u",
|
||||
UServer_Base::handler_inotify->fd,
|
||||
key->data(),
|
||||
IN_ONLYDIR | IN_CREATE | IN_DELETE | IN_MODIFY);
|
||||
}
|
||||
|
||||
U_RETURN(true);
|
||||
}
|
||||
|
||||
void UHTTP::initInotify()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::initInotify()")
|
||||
|
||||
if (UServer_Base::handler_inotify)
|
||||
{
|
||||
// INIT INOTIFY FOR DOCUMENT ROOT CACHE
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(cache_file)
|
||||
U_INTERNAL_ASSERT_EQUALS(UServer_Base::handler_inotify->fd, -1)
|
||||
|
||||
# ifdef HAVE_INOTIFY_INIT1
|
||||
UServer_Base::handler_inotify->fd = U_SYSCALL(inotify_init1, "%d", IN_NONBLOCK | IN_CLOEXEC);
|
||||
|
||||
if (UServer_Base::handler_inotify->fd != -1 || errno != ENOSYS) goto next;
|
||||
# endif
|
||||
|
||||
UServer_Base::handler_inotify->fd = U_SYSCALL_NO_PARAM(inotify_init);
|
||||
|
||||
(void) U_SYSCALL(fcntl, "%d,%d,%d", UServer_Base::handler_inotify->fd, F_SETFL, O_NONBLOCK | O_CLOEXEC);
|
||||
next:
|
||||
if (UServer_Base::handler_inotify->fd == -1)
|
||||
{
|
||||
UServer_Base::handler_inotify = 0;
|
||||
|
||||
U_SRV_LOG("WARNING: inode based directory notification failed");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
U_SRV_LOG("Inode based directory notification enabled");
|
||||
|
||||
inotify_pathname = U_NEW(UString(U_CAPACITY));
|
||||
|
||||
cache_file->callForAllEntry(checkForInotifyDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
#define IN_BUFLEN (1024 * (sizeof(struct inotify_event) + 16))
|
||||
|
||||
void UHTTP::in_READ()
|
||||
|
@ -477,6 +537,9 @@ void UHTTP::in_READ()
|
|||
|
||||
cache_file->callForAllEntry(getInotifyPathDirectory);
|
||||
next:
|
||||
if (*inotify_name != '.' ||
|
||||
memcmp(inotify_name + len - U_CONSTANT_SIZE(".swp"), U_CONSTANT_TO_PARAM(".swp"))) // NB: vi tmp...
|
||||
{
|
||||
if ((mask & IN_CREATE) != 0)
|
||||
{
|
||||
if (inotify_file_data == 0) checkFileForCache();
|
||||
|
@ -508,31 +571,14 @@ next:
|
|||
if (inotify_file_data->array) inotify_file_data->expire = 0; // NB: we delay the renew...
|
||||
else
|
||||
{
|
||||
int fd = inotify_file_data->fd;
|
||||
|
||||
if (file_data == 0)
|
||||
{
|
||||
file_data = cache_file->at(*inotify_pathname);
|
||||
|
||||
U_INTERNAL_ASSERT_EQUALS(file_data, inotify_file_data)
|
||||
|
||||
uint32_t sz = inotify_pathname->size();
|
||||
|
||||
pathname->setBuffer(sz);
|
||||
|
||||
pathname->snprintf("%v", inotify_pathname->rep);
|
||||
}
|
||||
|
||||
cache_file->eraseAfterFind();
|
||||
|
||||
checkFileForCache();
|
||||
|
||||
if (fd != -1 &&
|
||||
file->st_ino) // stat() ok...
|
||||
{
|
||||
UFile::close(fd);
|
||||
|
||||
if (file->open()) file_data->fd = file->fd;
|
||||
renewFileDataInCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -974,38 +1020,6 @@ void UHTTP::init()
|
|||
|
||||
(void) UServer_Base::senvironment->shrink();
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
if (UServer_Base::handler_inotify)
|
||||
{
|
||||
// INIT INOTIFY FOR DOCUMENT ROOT CACHE
|
||||
|
||||
# ifdef HAVE_INOTIFY_INIT1
|
||||
UServer_Base::handler_inotify->fd = U_SYSCALL(inotify_init1, "%d", IN_NONBLOCK | IN_CLOEXEC);
|
||||
|
||||
if (UServer_Base::handler_inotify->fd != -1 || errno != ENOSYS) goto next;
|
||||
# endif
|
||||
|
||||
UServer_Base::handler_inotify->fd = U_SYSCALL_NO_PARAM(inotify_init);
|
||||
|
||||
(void) U_SYSCALL(fcntl, "%d,%d,%d", UServer_Base::handler_inotify->fd, F_SETFL, O_NONBLOCK | O_CLOEXEC);
|
||||
next:
|
||||
if (UServer_Base::handler_inotify->fd != -1)
|
||||
{
|
||||
U_SRV_LOG("Inode based directory notification enabled");
|
||||
|
||||
inotify_pathname = U_NEW(UString(U_CAPACITY));
|
||||
}
|
||||
else
|
||||
{
|
||||
UServer_Base::handler_inotify = 0;
|
||||
|
||||
U_SRV_LOG("WARNING: inode based directory notification failed");
|
||||
}
|
||||
}
|
||||
#else
|
||||
UServer_Base::handler_inotify = 0;
|
||||
#endif
|
||||
|
||||
// CACHE DOCUMENT ROOT FILE SYSTEM
|
||||
|
||||
uint32_t n = 0, sz;
|
||||
|
@ -1219,7 +1233,7 @@ next:
|
|||
|
||||
U_INTERNAL_DUMP("cache size = %u", sz)
|
||||
|
||||
#ifndef _MSWINDOWS_
|
||||
#if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
|
||||
uint32_t rlim = (sz + UNotifier::max_connection + 100);
|
||||
|
||||
U_INTERNAL_DUMP("rlim = %u", rlim)
|
||||
|
@ -1304,19 +1318,6 @@ bool UHTTP::cache_file_check_memory()
|
|||
}
|
||||
#endif
|
||||
|
||||
void UHTTP::checkFileForCache()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::checkFileForCache()")
|
||||
|
||||
U_INTERNAL_ASSERT_POINTER(pathname)
|
||||
|
||||
file->setPath(*pathname);
|
||||
|
||||
// NB: file->stat() get also the size of the file...
|
||||
|
||||
if (file->stat()) manageDataForCache();
|
||||
}
|
||||
|
||||
#ifdef U_ALIAS
|
||||
void UHTTP::setGlobalAlias(const UString& _alias) // NB: automatic alias for all uri request without suffix...
|
||||
{
|
||||
|
@ -1343,6 +1344,18 @@ void UHTTP::dtor()
|
|||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::dtor()")
|
||||
|
||||
#if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
if (UServer_Base::handler_inotify && // inotify: Inode based directory notification...
|
||||
UServer_Base::handler_inotify->fd != -1)
|
||||
{
|
||||
(void) U_SYSCALL(close, "%d", UServer_Base::handler_inotify->fd);
|
||||
|
||||
delete inotify_pathname;
|
||||
|
||||
UServer_Base::handler_inotify = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (vservice) delete vservice;
|
||||
if (vmsg_error) delete vmsg_error;
|
||||
if (fcgi_uri_mask) delete fcgi_uri_mask;
|
||||
|
@ -1374,6 +1387,7 @@ void UHTTP::dtor()
|
|||
if (htpasswd) delete htpasswd;
|
||||
if (htdigest) delete htdigest;
|
||||
if (mount_point) delete mount_point;
|
||||
if (nocache_file_mask) delete nocache_file_mask;
|
||||
|
||||
# ifdef U_ALIAS
|
||||
delete alias;
|
||||
|
@ -1398,21 +1412,6 @@ void UHTTP::dtor()
|
|||
if (v8_javascript) delete v8_javascript;
|
||||
# endif
|
||||
|
||||
# if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
if (UServer_Base::handler_inotify)
|
||||
{
|
||||
delete inotify_pathname;
|
||||
|
||||
// inotify: Inode based directory notification...
|
||||
|
||||
U_INTERNAL_ASSERT_DIFFERS(UServer_Base::handler_inotify->fd,-1)
|
||||
|
||||
(void) U_SYSCALL(close, "%d", UServer_Base::handler_inotify->fd);
|
||||
|
||||
UServer_Base::handler_inotify = 0;
|
||||
}
|
||||
# endif
|
||||
|
||||
// CACHE DOCUMENT ROOT FILE SYSTEM
|
||||
|
||||
if (file_data != file_not_in_cache_data)
|
||||
|
@ -3922,7 +3921,7 @@ end: // NB: we check if we can shortcut the http request processing...
|
|||
|
||||
int UHTTP::processRequest()
|
||||
{
|
||||
U_TRACE_NO_PARAM(0, "UHTTP::processRequest()")
|
||||
U_TRACE_NO_PARAM(1, "UHTTP::processRequest()")
|
||||
|
||||
U_ASSERT(UClientImage_Base::isRequestNeedProcessing())
|
||||
|
||||
|
@ -4141,13 +4140,7 @@ check_file: // now we check the file...
|
|||
|
||||
errno = 0;
|
||||
|
||||
if (file->modified())
|
||||
{
|
||||
file_data->mode = file->st_mode;
|
||||
file_data->size = file->st_size;
|
||||
file_data->mtime = file->st_mtime;
|
||||
}
|
||||
else
|
||||
if (U_SYSCALL(fstat, "%d,%p", file->fd, (struct stat*)file) != 0)
|
||||
{
|
||||
U_INTERNAL_DUMP("errno = %d", errno)
|
||||
|
||||
|
@ -4155,9 +4148,15 @@ check_file: // now we check the file...
|
|||
file->open())
|
||||
{
|
||||
file_data->fd = file->fd;
|
||||
|
||||
if (U_SYSCALL(fstat, "%d,%p", file->fd, (struct stat*)file) != 0) goto error;
|
||||
}
|
||||
}
|
||||
|
||||
file_data->mode = file->st_mode;
|
||||
file_data->size = file->st_size;
|
||||
file_data->mtime = file->st_mtime;
|
||||
|
||||
U_INTERNAL_DUMP("file_data->fd = %d file_data->size = %u st_mode = %d st_size = %u st_mtime = %ld", file_data->fd, file_data->size, file->st_mode, file->st_size, file->st_mtime)
|
||||
|
||||
U_INTERNAL_ASSERT_EQUALS(file->st_size, file_data->size)
|
||||
|
@ -4169,7 +4168,7 @@ empty_file: // NB: now we check for empty file...
|
|||
if (file_data->size) processGetRequest();
|
||||
else
|
||||
{
|
||||
file->close();
|
||||
error: file->close();
|
||||
|
||||
file_data->fd = -1;
|
||||
|
||||
|
@ -7054,6 +7053,8 @@ U_NO_EXPORT bool UHTTP::checkIfUSPLink(UStringRep* key, void* value)
|
|||
|
||||
if (cptr->mime_index == U_usp)
|
||||
{
|
||||
U_INTERNAL_ASSERT_POINTER(cptr->ptr)
|
||||
|
||||
UServletPage* usp_page1 = (UServletPage*)cptr->ptr;
|
||||
UServletPage* usp_page2 = (UServletPage*)file_data->ptr;
|
||||
|
||||
|
@ -7193,20 +7194,10 @@ U_NO_EXPORT void UHTTP::manageDataForCache()
|
|||
{
|
||||
U_INTERNAL_ASSERT(S_ISDIR(file_data->mode))
|
||||
|
||||
# if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
if (UServer_Base::handler_inotify)
|
||||
{
|
||||
file_data->wd = U_SYSCALL(inotify_add_watch, "%d,%s,%u",
|
||||
UServer_Base::handler_inotify->fd,
|
||||
pathname->c_str(),
|
||||
IN_ONLYDIR | IN_CREATE | IN_DELETE | IN_MODIFY);
|
||||
}
|
||||
# endif
|
||||
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef _MSWINDOWS_
|
||||
#if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
|
||||
if (rpathname->empty() && // NB: check if we are called from here...
|
||||
(file->lstat(), file->slink()))
|
||||
{
|
||||
|
@ -7288,7 +7279,9 @@ U_NO_EXPORT void UHTTP::manageDataForCache()
|
|||
{
|
||||
U_SRV_LOG("WARNING: found empty file: %V", pathname->rep);
|
||||
}
|
||||
else if (file->open())
|
||||
else if ((nocache_file_mask == 0 ||
|
||||
UServices::dosMatchWithOR(file_name, U_STRING_TO_PARAM(*nocache_file_mask), 0) == false) &&
|
||||
file->open())
|
||||
{
|
||||
UString content = file->getContent(true, false, true);
|
||||
|
||||
|
@ -7530,6 +7523,42 @@ void UHTTP::checkFileInCache(const char* path, uint32_t len)
|
|||
}
|
||||
}
|
||||
|
||||
void UHTTP::renewFileDataInCache()
|
||||
{
|
||||
U_TRACE(0, "UHTTP::renewFileDataInCache()")
|
||||
|
||||
U_ASSERT_EQUALS(file_data, cache_file->elem())
|
||||
|
||||
// NB: we need to do this before call eraseAfterFind()...
|
||||
|
||||
int fd = file_data->fd;
|
||||
const UStringRep* key = cache_file->key();
|
||||
|
||||
if (fd != -1) UFile::close(fd);
|
||||
|
||||
U_INTERNAL_DUMP("file_data->fd = %d cache_file->key = %V", file_data->fd, key)
|
||||
|
||||
pathname->setBuffer(key->size());
|
||||
|
||||
pathname->snprintf("%v", key);
|
||||
|
||||
U_SRV_LOG("WARNING: renewFileDataInCache() called for file: %V - inotify %s enabled, expired=%b",
|
||||
pathname->rep, UServer_Base::handler_inotify ? "is" : "NOT", (u_now->tv_sec > file_data->expire));
|
||||
|
||||
cache_file->eraseAfterFind();
|
||||
|
||||
checkFileForCache();
|
||||
|
||||
if (fd != -1 &&
|
||||
file->st_ino && // stat() ok...
|
||||
file->open())
|
||||
{
|
||||
file_data->fd = file->fd;
|
||||
}
|
||||
|
||||
U_INTERNAL_DUMP("file_data->array = %p", file_data->array)
|
||||
}
|
||||
|
||||
UString UHTTP::getDataFromCache(int idx)
|
||||
{
|
||||
U_TRACE(0, "UHTTP::getDataFromCache(%d)", idx)
|
||||
|
@ -7539,38 +7568,10 @@ UString UHTTP::getDataFromCache(int idx)
|
|||
U_INTERNAL_DUMP("u_now->tv_sec = %#3D", u_now->tv_sec)
|
||||
U_INTERNAL_DUMP("file_data->expire = %#3D", file_data->expire)
|
||||
|
||||
if (u_now->tv_sec > file_data->expire)
|
||||
{
|
||||
// NB: we need to do this before call erase()...
|
||||
|
||||
int fd = file_data->fd;
|
||||
const UStringRep* key = cache_file->key();
|
||||
|
||||
U_INTERNAL_DUMP("file_data->fd = %d cache_file->key = %V", file_data->fd, key)
|
||||
|
||||
uint32_t sz = key->size();
|
||||
|
||||
pathname->setBuffer(sz);
|
||||
|
||||
pathname->snprintf("%.*s", sz, key->data());
|
||||
|
||||
cache_file->eraseAfterFind();
|
||||
|
||||
checkFileForCache();
|
||||
|
||||
if (fd != -1 &&
|
||||
file->st_ino) // stat() ok...
|
||||
{
|
||||
UFile::close(fd);
|
||||
|
||||
if (file->open()) file_data->fd = file->fd;
|
||||
}
|
||||
|
||||
U_INTERNAL_DUMP("file_data->array = %p", file_data->array)
|
||||
}
|
||||
|
||||
UString result;
|
||||
|
||||
if (u_now->tv_sec > file_data->expire) renewFileDataInCache();
|
||||
|
||||
if (file_data->array)
|
||||
{
|
||||
U_INTERNAL_ASSERT_MINOR(idx, 4)
|
||||
|
@ -7796,7 +7797,7 @@ nocontent:
|
|||
}
|
||||
# endif
|
||||
|
||||
# if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT)
|
||||
# if defined(HAVE_SYS_INOTIFY_H) && defined(U_HTTP_INOTIFY_SUPPORT) && !defined(U_SERVER_CAPTIVE_PORTAL)
|
||||
bool bstat = false;
|
||||
|
||||
if (db_not_found)
|
||||
|
|
|
@ -68,30 +68,30 @@ export ORM_DRIVER ORM_OPTION UMEMPOOL
|
|||
#Running 15s test @ http://localhost:8080/json
|
||||
# 4 threads and 256 connections
|
||||
# Thread Stats Avg Stdev Max +/- Stdev
|
||||
# Latency 1.20ms 682.33us 12.52ms 64.81%
|
||||
# Req/Sec 37.41k 14.81k 71.00k 55.06%
|
||||
# Latency 454.29us 279.11us 21.29ms 95.78%
|
||||
# Req/Sec 74.50k 9.20k 134.33k 82.76%
|
||||
# Latency Distribution
|
||||
# 50% 1.10ms
|
||||
# 75% 1.67ms
|
||||
# 90% 2.15ms
|
||||
# 99% 2.80ms
|
||||
# 2109926 requests in 15.00s, 330.00MB read
|
||||
#Requests/sec: 140658.66
|
||||
#Transfer/sec: 22.00MB
|
||||
# 50% 441.00us
|
||||
# 75% 561.00us
|
||||
# 90% 649.00us
|
||||
# 99% 0.90ms
|
||||
# 4203920 requests in 15.00s, 657.50MB read
|
||||
#Requests/sec: 280264.58
|
||||
#Transfer/sec: 43.83MB
|
||||
#
|
||||
#Running 15s test @ http://laptop:8080/json
|
||||
# 4 threads and 256 connections
|
||||
# Thread Stats Avg Stdev Max +/- Stdev
|
||||
# Latency 18.39ms 3.77ms 233.91ms 91.22%
|
||||
# Req/Sec 3.47k 386.95 4.81k 79.18%
|
||||
# Latency 18.95ms 24.43ms 239.50ms 98.69%
|
||||
# Req/Sec 3.37k 647.94 5.19k 65.72%
|
||||
# Latency Distribution
|
||||
# 50% 18.67ms
|
||||
# 75% 19.96ms
|
||||
# 90% 21.26ms
|
||||
# 99% 23.31ms
|
||||
# 205436 requests in 15.00s, 32.13MB read
|
||||
# Requests/sec: 13695.12
|
||||
# Transfer/sec: 2.14MB
|
||||
# 50% 16.50ms
|
||||
# 75% 17.92ms
|
||||
# 90% 19.30ms
|
||||
# 99% 225.25ms
|
||||
# 199539 requests in 15.00s, 31.21MB read
|
||||
#Requests/sec: 13299.02
|
||||
#Transfer/sec: 2.08MB
|
||||
# ----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# DB
|
||||
# ----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -3,7 +3,7 @@ userver {
|
|||
PORT 8080
|
||||
PREFORK_CHILD 4
|
||||
TCP_LINGER_SET 0
|
||||
LISTEN_BACKLOG 16384
|
||||
LISTEN_BACKLOG 256
|
||||
DOCUMENT_ROOT benchmark/FrameworkBenchmarks/ULib/www
|
||||
PID_FILE benchmark/FrameworkBenchmarks/ULib/userver_tcp.pid
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ rm -f db/session.ssl* /tmp/ssl_session.txt /tmp/byterange* /tmp/*.memusage.* \
|
|||
trace.*userver_*.[0-9]* object.*userver_*.[0-9]* stack.*userver_*.[0-9]* mempool.*userver_*.[0-9]* \
|
||||
$DOC_ROOT/trace.*userver_*.[0-9]* $DOC_ROOT/object.*userver_*.[0-9]* $DOC_ROOT/stack.*userver_*.[0-9]* $DOC_ROOT/mempool.*userver_*.[0-9]*
|
||||
|
||||
#UTRACE="0 100M -1"
|
||||
#UTRACE="0 100M 0"
|
||||
#UTRACE_SIGNAL="0 50M 0"
|
||||
#UOBJDUMP="0 10M 100"
|
||||
#USIMERR="error.sim"
|
||||
|
|
|
@ -16,7 +16,7 @@ rm -f $DOC_ROOT/web_server_multiclient.log* \
|
|||
trace.*userver_*.[0-9]* object.*userver_*.[0-9]* stack.*userver_*.[0-9]* mempool.*userver_*.[0-9]* \
|
||||
$DOC_ROOT/trace.*userver_*.[0-9]* $DOC_ROOT/object.*userver_*.[0-9]* $DOC_ROOT/stack.*userver_*.[0-9]* $DOC_ROOT/mempool.*userver_*.[0-9]*
|
||||
|
||||
#UTRACE="5 100M 0"
|
||||
#UTRACE="0 100M 0"
|
||||
#UTRACE_SIGNAL="0 100M -1"
|
||||
#UOBJDUMP="0 10M 100"
|
||||
#USIMERR="error.sim"
|
||||
|
|
|
@ -104,7 +104,7 @@ done
|
|||
|
||||
rm -rf uploads
|
||||
mkdir -p uploads
|
||||
$CHOWN apache: uploads
|
||||
$CHOWN nobody: uploads 2>/dev/null
|
||||
chmod 777 uploads
|
||||
|
||||
TIMEOUT 10 $CURL -s -F 'file=@vuoto.txt' -F "name=prova" -k https://localhost:4443/cgi-bin/uploader.sh >>out/web_server_ssl.out 2>>err/web_server_ssl.err
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
(function(w, d) {
|
||||
if (!Date.now) {
|
||||
Date.now = function() { return new Date().getTime(); }
|
||||
}
|
||||
var wimoveFetchUrl = this.wimoveFetchUrl = function(url) {
|
||||
var request = false;
|
||||
if (window.XMLHttpRequest) {
|
||||
|
@ -60,8 +63,8 @@ var wimoveBuildBanner = this.wimoveBuildBanner = function(baseUrl) {
|
|||
var wimoveGetBanner = this.wimoveGetBanner = function(baseUrl,ap) {
|
||||
var bannerUrls = new Array();
|
||||
|
||||
if (ap) bannerUrls.push(baseUrl + ap + (isMobile() ? '/mobile' : '/full') + '/banner.html');
|
||||
bannerUrls.push(baseUrl + '/default' + (isMobile() ? '/mobile' : '/full') + '/banner.html');
|
||||
if (ap) bannerUrls.push(baseUrl + ap + (isMobile() ? '/mobile' : '/full') + '/banner.html?ts=' + (Date.now() / 1000 | 0));
|
||||
bannerUrls.push(baseUrl + '/default' + (isMobile() ? '/mobile' : '/full') + '/banner.html?ts=' + (Date.now() / 1000 | 0));
|
||||
|
||||
var banner;
|
||||
for (var idx in bannerUrls) {
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
#distance {
|
||||
width:1px;
|
||||
height:60%;
|
||||
background-color:#fc6;
|
||||
margin-bottom:-13.75em;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#container {
|
||||
letter-spacing:1px;
|
||||
margin:0 auto;
|
||||
position:relative;
|
||||
text-align:left;
|
||||
width:35.000em;
|
||||
clear:left;
|
||||
overflow:hidden;
|
||||
}
|
||||
#containerBig {
|
||||
letter-spacing:1px;
|
||||
margin:0 auto;
|
||||
margin-top:3em;
|
||||
position:relative;
|
||||
text-align:left;
|
||||
width:60%;
|
||||
clear:left;
|
||||
overflow:hidden;
|
||||
}
|
||||
#container #wrapperAuto {
|
||||
height:auto;
|
||||
}
|
||||
#loginbox {
|
||||
display:block;
|
||||
width:17.000em;
|
||||
float:right;
|
||||
}
|
||||
#loginbox div#pageWrap {
|
||||
padding-left:20%;
|
||||
padding-right:20%;
|
||||
}
|
||||
#creditsbox {
|
||||
background-image:url('images/logo_t.service_NoSfondo.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:50% 20%;
|
||||
display:block;
|
||||
width:9.900em;
|
||||
height:23.5em;
|
||||
float:left;
|
||||
text-shadow:2px 2px 2px rgba(0, 0, 0, .25);
|
||||
color:#FF0000;
|
||||
text-align:center;
|
||||
}
|
||||
#creditsbox a {
|
||||
display:block;
|
||||
padding-top:16em;
|
||||
}
|
||||
div#topBanner {
|
||||
position:absolute;
|
||||
display:block;
|
||||
width:auto;
|
||||
height:auto;
|
||||
top:20px;
|
||||
right:0;
|
||||
left:0;
|
||||
text-align:center;
|
||||
}
|
||||
div#bottomBanner {
|
||||
position:absolute;
|
||||
display:block;
|
||||
width:auto;
|
||||
height:100px;
|
||||
right:0;
|
||||
left:0;
|
||||
bottom:20px;
|
||||
text-align:center;
|
||||
}
|
||||
div#rightBanner {
|
||||
position:absolute;
|
||||
display:block;
|
||||
width:300px;
|
||||
height:auto;
|
||||
top:20px;
|
||||
bottom:20px;
|
||||
right:20px;
|
||||
margin-top:auto;
|
||||
margin-bottom:auto;
|
||||
}
|
||||
div#leftBanner {
|
||||
position:absolute;
|
||||
display:block;
|
||||
width:300px;
|
||||
height:auto;
|
||||
top:20px;
|
||||
bottom:20px;
|
||||
left:20px;
|
||||
margin-top:auto;
|
||||
margin-bottom:auto;
|
||||
}
|
||||
div.banner300x250 {
|
||||
display:block;
|
||||
width:300px;
|
||||
height:250px;
|
||||
right:0;
|
||||
left:0;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
position:relative;
|
||||
padding-top:5px;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
div.banner300x600 {
|
||||
display:block;
|
||||
width:300px;
|
||||
height:600px;
|
||||
right:0;
|
||||
left:0;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
position:relative;
|
||||
}
|
||||
div.banner468x60 {
|
||||
display:block;
|
||||
width:468px;
|
||||
height:60px;
|
||||
right:0;
|
||||
left:0;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
position:relative;
|
||||
}
|
||||
div.banner728x90 {
|
||||
display:block;
|
||||
width:728px;
|
||||
height:90px;
|
||||
right:0;
|
||||
left:0;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
position:relative;
|
||||
}
|
|
@ -1,323 +0,0 @@
|
|||
--Do not remove this if you are using--
|
||||
Original Author: Remiz Rahnas
|
||||
Original Author URL: http://www.htmlremix.com
|
||||
Published date: 2008/09/24
|
||||
|
||||
Changes by Nick Fetchak:
|
||||
- IE8 standards mode compatibility
|
||||
- VML elements now positioned behind original box rather than inside of it - should be less prone to breakage
|
||||
- Added partial support for 'box-shadow' style
|
||||
- Checks for VML support before doing anything
|
||||
- Updates VML element size and position via timer and also via window resize event
|
||||
- lots of other small things
|
||||
Published date : 2010/03/14
|
||||
http://fetchak.com/ie-css3
|
||||
|
||||
Thanks to TheBrightLines.com (http://www.thebrightlines.com/2009/12/03/using-ies-filter-in-a-cross-browser-way) for enlightening me about the DropShadow filter
|
||||
|
||||
<public:attach event="ondocumentready" onevent="ondocumentready('v08vnSVo78t4JfjH')" />
|
||||
<script type="text/javascript">
|
||||
|
||||
timer_length = 200; // Milliseconds
|
||||
border_opacity = false; // Use opacity on borders of rounded-corner elements? Note: This causes antialiasing issues
|
||||
|
||||
|
||||
// supportsVml() borrowed from http://stackoverflow.com/questions/654112/how-do-you-detect-support-for-vml-or-svg-in-a-browser
|
||||
function supportsVml() {
|
||||
if (typeof supportsVml.supported == "undefined") {
|
||||
var a = document.body.appendChild(document.createElement('div'));
|
||||
a.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
|
||||
var b = a.firstChild;
|
||||
b.style.behavior = "url(#default#VML)";
|
||||
supportsVml.supported = b ? typeof b.adj == "object": true;
|
||||
a.parentNode.removeChild(a);
|
||||
}
|
||||
return supportsVml.supported
|
||||
}
|
||||
|
||||
|
||||
// findPos() borrowed from http://www.quirksmode.org/js/findpos.html
|
||||
function findPos(obj) {
|
||||
var curleft = curtop = 0;
|
||||
|
||||
if (obj.offsetParent) {
|
||||
do {
|
||||
curleft += obj.offsetLeft;
|
||||
curtop += obj.offsetTop;
|
||||
} while (obj = obj.offsetParent);
|
||||
}
|
||||
|
||||
return({
|
||||
'x': curleft,
|
||||
'y': curtop
|
||||
});
|
||||
}
|
||||
|
||||
function createBoxShadow(element, vml_parent) {
|
||||
var style = element.currentStyle['iecss3-box-shadow'] || element.currentStyle['-moz-box-shadow'] || element.currentStyle['-webkit-box-shadow'] || element.currentStyle['box-shadow'] || '';
|
||||
var match = style.match(/^(\d+)px (\d+)px (\d+)px/);
|
||||
if (!match) { return(false); }
|
||||
|
||||
|
||||
var shadow = document.createElement('v:roundrect');
|
||||
shadow.userAttrs = {
|
||||
'x': parseInt(RegExp.$1 || 0),
|
||||
'y': parseInt(RegExp.$2 || 0),
|
||||
'radius': parseInt(RegExp.$3 || 0) / 2
|
||||
};
|
||||
shadow.position_offset = {
|
||||
'y': (0 - vml_parent.pos_ieCSS3.y - shadow.userAttrs.radius + shadow.userAttrs.y),
|
||||
'x': (0 - vml_parent.pos_ieCSS3.x - shadow.userAttrs.radius + shadow.userAttrs.x)
|
||||
};
|
||||
shadow.size_offset = {
|
||||
'width': 0,
|
||||
'height': 0
|
||||
};
|
||||
shadow.arcsize = element.arcSize +'px';
|
||||
shadow.style.display = 'block';
|
||||
shadow.style.position = 'absolute';
|
||||
shadow.style.top = (element.pos_ieCSS3.y + shadow.position_offset.y) +'px';
|
||||
shadow.style.left = (element.pos_ieCSS3.x + shadow.position_offset.x) +'px';
|
||||
shadow.style.width = element.offsetWidth +'px';
|
||||
shadow.style.height = element.offsetHeight +'px';
|
||||
shadow.style.antialias = true;
|
||||
shadow.className = 'vml_box_shadow';
|
||||
shadow.style.zIndex = element.zIndex - 1;
|
||||
shadow.style.filter = 'progid:DXImageTransform.Microsoft.Blur(pixelRadius='+ shadow.userAttrs.radius +',makeShadow=true,shadowOpacity='+ element.opacity +')';
|
||||
|
||||
element.parentNode.appendChild(shadow);
|
||||
//element.parentNode.insertBefore(shadow, element.element);
|
||||
|
||||
// For window resizing
|
||||
element.vml.push(shadow);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
function createBorderRect(element, vml_parent) {
|
||||
if (isNaN(element.borderRadius)) { return(false); }
|
||||
|
||||
element.style.background = 'transparent';
|
||||
element.style.borderColor = 'transparent';
|
||||
|
||||
var rect = document.createElement('v:roundrect');
|
||||
rect.position_offset = {
|
||||
'y': (0.5 * element.strokeWeight) - vml_parent.pos_ieCSS3.y,
|
||||
'x': (0.5 * element.strokeWeight) - vml_parent.pos_ieCSS3.x
|
||||
};
|
||||
rect.size_offset = {
|
||||
'width': 0 - element.strokeWeight,
|
||||
'height': 0 - element.strokeWeight
|
||||
};
|
||||
rect.arcsize = element.arcSize +'px';
|
||||
rect.strokeColor = element.strokeColor;
|
||||
rect.strokeWeight = element.strokeWeight +'px';
|
||||
rect.stroked = element.stroked;
|
||||
rect.className = 'vml_border_radius';
|
||||
rect.style.display = 'block';
|
||||
rect.style.position = 'absolute';
|
||||
rect.style.top = (element.pos_ieCSS3.y + rect.position_offset.y) +'px';
|
||||
rect.style.left = (element.pos_ieCSS3.x + rect.position_offset.x) +'px';
|
||||
rect.style.width = (element.offsetWidth + rect.size_offset.width) +'px';
|
||||
rect.style.height = (element.offsetHeight + rect.size_offset.height) +'px';
|
||||
rect.style.antialias = true;
|
||||
rect.style.zIndex = element.zIndex - 1;
|
||||
|
||||
if (border_opacity && (element.opacity < 1)) {
|
||||
rect.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(Opacity='+ parseFloat(element.opacity * 100) +')';
|
||||
}
|
||||
|
||||
var fill = document.createElement('v:fill');
|
||||
fill.color = element.fillColor;
|
||||
fill.src = element.fillSrc;
|
||||
fill.className = 'vml_border_radius_fill';
|
||||
fill.type = 'tile';
|
||||
fill.opacity = element.opacity;
|
||||
|
||||
// Hack: IE6 doesn't support transparent borders, use padding to offset original element
|
||||
isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
|
||||
if (isIE6 && (element.strokeWeight > 0)) {
|
||||
element.style.borderStyle = 'none';
|
||||
element.style.paddingTop = parseInt(element.currentStyle.paddingTop || 0) + element.strokeWeight;
|
||||
element.style.paddingBottom = parseInt(element.currentStyle.paddingBottom || 0) + element.strokeWeight;
|
||||
}
|
||||
|
||||
rect.appendChild(fill);
|
||||
element.parentNode.appendChild(rect);
|
||||
//element.parentNode.insertBefore(rect, element.element);
|
||||
|
||||
// For window resizing
|
||||
element.vml.push(rect);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
function createTextShadow(element, vml_parent) {
|
||||
if (!element.textShadow) { return(false); }
|
||||
|
||||
var match = element.textShadow.match(/^(\d+)px (\d+)px (\d+)px (#?\w+)/);
|
||||
if (!match) { return(false); }
|
||||
|
||||
|
||||
//var shadow = document.createElement('span');
|
||||
var shadow = element.cloneNode(true);
|
||||
var radius = parseInt(RegExp.$3 || 0);
|
||||
shadow.userAttrs = {
|
||||
'x': parseInt(RegExp.$1 || 0) - (radius),
|
||||
'y': parseInt(RegExp.$2 || 0) - (radius),
|
||||
'radius': radius / 2,
|
||||
'color': (RegExp.$4 || '#000')
|
||||
};
|
||||
shadow.position_offset = {
|
||||
'y': (0 - vml_parent.pos_ieCSS3.y + shadow.userAttrs.y),
|
||||
'x': (0 - vml_parent.pos_ieCSS3.x + shadow.userAttrs.x)
|
||||
};
|
||||
shadow.size_offset = {
|
||||
'width': 0,
|
||||
'height': 0
|
||||
};
|
||||
shadow.style.color = shadow.userAttrs.color;
|
||||
shadow.style.position = 'absolute';
|
||||
shadow.style.top = (element.pos_ieCSS3.y + shadow.position_offset.y) +'px';
|
||||
shadow.style.left = (element.pos_ieCSS3.x + shadow.position_offset.x) +'px';
|
||||
shadow.style.antialias = true;
|
||||
shadow.style.behavior = null;
|
||||
shadow.className = 'ieCSS3_text_shadow';
|
||||
shadow.innerHTML = element.innerHTML;
|
||||
// For some reason it only looks right with opacity at 75%
|
||||
shadow.style.filter = '\
|
||||
progid:DXImageTransform.Microsoft.Alpha(Opacity=75)\
|
||||
progid:DXImageTransform.Microsoft.Blur(pixelRadius='+ shadow.userAttrs.radius +',makeShadow=false,shadowOpacity=100)\
|
||||
';
|
||||
|
||||
var clone = element.cloneNode(true);
|
||||
clone.position_offset = {
|
||||
'y': (0 - vml_parent.pos_ieCSS3.y),
|
||||
'x': (0 - vml_parent.pos_ieCSS3.x)
|
||||
};
|
||||
clone.size_offset = {
|
||||
'width': 0,
|
||||
'height': 0
|
||||
};
|
||||
clone.style.behavior = null;
|
||||
clone.style.position = 'absolute';
|
||||
clone.style.top = (element.pos_ieCSS3.y + clone.position_offset.y) +'px';
|
||||
clone.style.left = (element.pos_ieCSS3.x + clone.position_offset.x) +'px';
|
||||
clone.className = 'ieCSS3_text_shadow';
|
||||
|
||||
|
||||
element.parentNode.appendChild(shadow);
|
||||
element.parentNode.appendChild(clone);
|
||||
|
||||
element.style.visibility = 'hidden';
|
||||
|
||||
// For window resizing
|
||||
element.vml.push(clone);
|
||||
element.vml.push(shadow);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
function ondocumentready(classID) {
|
||||
if (!supportsVml()) { return(false); }
|
||||
|
||||
if (this.className.match(classID)) { return(false); }
|
||||
this.className = this.className.concat(' ', classID);
|
||||
|
||||
// Add a namespace for VML (IE8 requires it)
|
||||
if (!document.namespaces.v) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); }
|
||||
|
||||
// Check to see if we've run once before on this page
|
||||
if (typeof(window.ieCSS3) == 'undefined') {
|
||||
// Create global ieCSS3 object
|
||||
window.ieCSS3 = {
|
||||
'vmlified_elements': new Array(),
|
||||
'update_timer': setInterval(updatePositionAndSize, timer_length)
|
||||
};
|
||||
|
||||
if (typeof(window.onresize) == 'function') { window.ieCSS3.previous_onresize = window.onresize; }
|
||||
|
||||
// Attach window resize event
|
||||
window.onresize = updatePositionAndSize;
|
||||
}
|
||||
|
||||
|
||||
// These attrs are for the script and have no meaning to the browser:
|
||||
this.borderRadius = parseInt(this.currentStyle['iecss3-border-radius'] ||
|
||||
this.currentStyle['-moz-border-radius'] ||
|
||||
this.currentStyle['-webkit-border-radius'] ||
|
||||
this.currentStyle['border-radius'] ||
|
||||
this.currentStyle['-khtml-border-radius']);
|
||||
this.arcSize = Math.min(this.borderRadius / Math.min(this.offsetWidth, this.offsetHeight), 1);
|
||||
this.fillColor = this.currentStyle.backgroundColor;
|
||||
this.fillSrc = this.currentStyle.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
|
||||
this.strokeColor = this.currentStyle.borderColor;
|
||||
this.strokeWeight = parseInt(this.currentStyle.borderWidth);
|
||||
this.stroked = 'true';
|
||||
if (isNaN(this.strokeWeight) || (this.strokeWeight == 0)) {
|
||||
this.strokeWeight = 0;
|
||||
this.strokeColor = fillColor;
|
||||
this.stroked = 'false';
|
||||
}
|
||||
this.opacity = parseFloat(this.currentStyle.opacity || 1);
|
||||
this.textShadow = this.currentStyle['text-shadow'];
|
||||
|
||||
this.element.vml = new Array();
|
||||
this.zIndex = parseInt(this.currentStyle.zIndex);
|
||||
if (isNaN(this.zIndex)) { this.zIndex = 0; }
|
||||
|
||||
// Find which element provides position:relative for the target element (default to BODY)
|
||||
vml_parent = this;
|
||||
var limit = 100, i = 0;
|
||||
do {
|
||||
vml_parent = vml_parent.parentElement;
|
||||
i++;
|
||||
if (i >= limit) { return(false); }
|
||||
} while ((typeof(vml_parent) != 'undefined') && (vml_parent.currentStyle.position != 'relative') && (vml_parent.tagName != 'BODY'));
|
||||
|
||||
vml_parent.pos_ieCSS3 = findPos(vml_parent);
|
||||
this.pos_ieCSS3 = findPos(this);
|
||||
|
||||
var rv1 = createBoxShadow(this, vml_parent);
|
||||
var rv2 = createBorderRect(this, vml_parent);
|
||||
var rv3 = createTextShadow(this, vml_parent);
|
||||
if (rv1 || rv2 || rv3) { window.ieCSS3.vmlified_elements.push(this.element); }
|
||||
|
||||
if (typeof(vml_parent.document.ieCSS3_stylesheet) == 'undefined') {
|
||||
vml_parent.document.ieCSS3_stylesheet = vml_parent.document.createStyleSheet();
|
||||
vml_parent.document.ieCSS3_stylesheet.addRule("v\\:roundrect", "behavior: url(#default#VML)");
|
||||
vml_parent.document.ieCSS3_stylesheet.addRule("v\\:fill", "behavior: url(#default#VML)");
|
||||
// Compatibility with IE7.js
|
||||
vml_parent.document.ieCSS3_stylesheet.ie7 = true;
|
||||
}
|
||||
}
|
||||
|
||||
function updatePositionAndSize() {
|
||||
if (typeof(window.ieCSS3.vmlified_elements) != 'object') { return(false); }
|
||||
|
||||
for (var i in window.ieCSS3.vmlified_elements) {
|
||||
var el = window.ieCSS3.vmlified_elements[i];
|
||||
|
||||
if (typeof(el.vml) != 'object') { continue; }
|
||||
|
||||
for (var z in el.vml) {
|
||||
//var parent_pos = findPos(el.vml[z].parentNode);
|
||||
var new_pos = findPos(el);
|
||||
new_pos.x = (new_pos.x + el.vml[z].position_offset.x) + 'px';
|
||||
new_pos.y = (new_pos.y + el.vml[z].position_offset.y) + 'px';
|
||||
if (el.vml[z].style.left != new_pos.x) { el.vml[z].style.left = new_pos.x; }
|
||||
if (el.vml[z].style.top != new_pos.y) { el.vml[z].style.top = new_pos.y; }
|
||||
|
||||
var new_size = {
|
||||
'width': parseInt(el.offsetWidth + el.vml[z].size_offset.width),
|
||||
'height': parseInt(el.offsetHeight + el.vml[z].size_offset.height)
|
||||
}
|
||||
if (el.vml[z].offsetWidth != new_size.width) { el.vml[z].style.width = new_size.width +'px'; }
|
||||
if (el.vml[z].offsetHeight != new_size.height) { el.vml[z].style.height = new_size.height +'px'; }
|
||||
}
|
||||
}
|
||||
|
||||
if (event && (event.type == 'resize') && typeof(window.ieCSS3.previous_onresize) == 'function') { window.ieCSS3.previous_onresize(); }
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height:100%;
|
||||
}
|
||||
|
||||
body {
|
||||
color:#630;
|
||||
font:100.01%/1.0 helvetica,arial,sans-serif;
|
||||
text-align:center;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
div#container {
|
||||
z-index: 100;
|
||||
}
|
||||
div#container div#wrapper {
|
||||
border:0px solid transparent;
|
||||
}
|
||||
span#title {
|
||||
font:120.01%/2.0 helvetica,arial,sans-serif;
|
||||
display:block;
|
||||
color:#FFFFF1;
|
||||
font-weight:bold;
|
||||
padding-bottom:5px;
|
||||
padding-top:5px;
|
||||
border-bottom:1em solid #6698CD;
|
||||
text-decoration:none;
|
||||
text-align:center;
|
||||
text-shadow:2px 2px 2px rgba(0, 0, 0, .25);
|
||||
}
|
||||
span#hint {
|
||||
display:block;
|
||||
color: #FFFFF1;
|
||||
font-weight: bold;
|
||||
margin-left: 2px;
|
||||
margin-top: 2px;
|
||||
padding: 10px 2px 4px;
|
||||
text-shadow:2px 2px 2px rgba(0, 0, 0, .25);
|
||||
}
|
||||
label {
|
||||
display:block;
|
||||
color: #FFFFF1;
|
||||
font-weight: bold;
|
||||
margin-left: 2px;
|
||||
margin-top: 2px;
|
||||
padding: 10px 2px 4px;
|
||||
text-align: justify;
|
||||
text-decoration: none;
|
||||
text-shadow:2px 2px 2px rgba(0, 0, 0, .25);
|
||||
}
|
||||
span#uid,span#pass {
|
||||
display:block;
|
||||
}
|
||||
span#uid input,span#pass input {
|
||||
margin-left: 20px;
|
||||
margin-right: 2px;
|
||||
margin-top: 5px;
|
||||
padding-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
width: 170px;
|
||||
}
|
||||
input[type=text],input[type=password]{
|
||||
font-size: 1em;
|
||||
}
|
||||
span#submit {
|
||||
display:block;
|
||||
text-align: center;
|
||||
margin-bottom: 6px;
|
||||
margin-top: 6px;
|
||||
padding:4px;
|
||||
}
|
||||
span#submit input {
|
||||
padding:4px;
|
||||
padding-left:18px;
|
||||
padding-right:18px;
|
||||
}
|
||||
#creditsbox {
|
||||
background-color:#FFFFFF;
|
||||
border-right:0.1em solid #6698CD;
|
||||
}
|
||||
#creditsbox a {
|
||||
padding: 10px 10px 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-shadow:2px 2px 2px rgba(0, 0, 0, .25);
|
||||
color:#FF0000;
|
||||
}
|
||||
#menubox {
|
||||
padding:0.5em;
|
||||
background-color:transparent;
|
||||
}
|
||||
#menubox #menulogo {
|
||||
text-align:center;
|
||||
height:8em;
|
||||
padding:0;
|
||||
}
|
||||
#menubox #menulogo img {
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
height:100%;
|
||||
}
|
||||
#menubox #menufirst {
|
||||
display:block;
|
||||
margin:3%;
|
||||
height:6em;
|
||||
margin-top:5%;
|
||||
text-align:right;
|
||||
padding-right:12%;
|
||||
}
|
||||
#menubox #menusecond {
|
||||
display:block;
|
||||
margin:3%;
|
||||
height:6em;
|
||||
text-align:right;
|
||||
padding-right:12%;
|
||||
}
|
||||
#menubox #menucard {
|
||||
display:block;
|
||||
padding-top:3%;
|
||||
margin:3%;
|
||||
height:6em;
|
||||
text-align:center;
|
||||
padding-left:10%;
|
||||
padding-right:10%;
|
||||
}
|
||||
#menubox #menucard #bottomcard {
|
||||
display:block;
|
||||
position:relative;
|
||||
width:100%;
|
||||
}
|
||||
#menubox #menucard #bottomcard strong {
|
||||
display:inline-block;
|
||||
position:absolute;
|
||||
text-decoration:underline;
|
||||
font-size:1em;
|
||||
width: 68%;
|
||||
top: 40%;
|
||||
right:32%;
|
||||
text-align:right;
|
||||
height: auto;
|
||||
}
|
||||
#menubox #menucard #bottomcard strong:hover {
|
||||
cursor:pointer;
|
||||
}
|
||||
#menubox #menucard #bottomcard img {
|
||||
display:inline-block;
|
||||
position:absolute;
|
||||
width:75%;
|
||||
height: auto;
|
||||
top:0%;
|
||||
left: 12%;
|
||||
}
|
||||
#menubox #menureserved {
|
||||
display:block;
|
||||
margin:3%;
|
||||
height:4.5em;
|
||||
padding:0px;
|
||||
}
|
||||
#menubox #menureserved #bottomreserved {
|
||||
display:block;
|
||||
margin:0px;
|
||||
position:relative;
|
||||
height:100%;
|
||||
width:100%;
|
||||
}
|
||||
#menubox #menureserved #bottomreserved img {
|
||||
display:inline-block;
|
||||
position:absolute;
|
||||
width:auto;
|
||||
height:100%;
|
||||
top:0;
|
||||
left:35%;
|
||||
}
|
||||
#menubox button {
|
||||
display:inline-block;
|
||||
border: 0px solid transparent;
|
||||
background-color: transparent;
|
||||
width:40%;
|
||||
height:100%;
|
||||
}
|
||||
#menubox #toprightbox {
|
||||
width:95%;
|
||||
}
|
||||
#menubox #bottomleftbox {
|
||||
width:42%;
|
||||
}
|
||||
#menubox #bottomrightbox {
|
||||
width:56%;
|
||||
}
|
||||
#menubox button img {
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
display:inline-block;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
#menubox button img:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
#menubox #topleftbox {
|
||||
margin-right:-3%;
|
||||
}
|
||||
#menubox #bottomleftbox {
|
||||
margin-right:-4.5%;
|
||||
}
|
||||
#registerbox #menulogo {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding:0;
|
||||
margin-bottom:2em;
|
||||
}
|
||||
#registerbox #menulogo img {
|
||||
width:100%;
|
||||
}
|
||||
#loginbox #inside {
|
||||
width:auto;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
#loginbox #menulogo {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding:0;
|
||||
margin-bottom:2em;
|
||||
}
|
||||
#loginbox #inside input[type=text], #loginbox #inside input[type=password] {
|
||||
width:100%;
|
||||
}
|
||||
#loginbox #inside #left-sidebar {
|
||||
text-align:center;
|
||||
}
|
||||
#loginbox #menulogo img {
|
||||
width:100%;
|
||||
}
|
||||
td.racss_label {
|
||||
text-align:left;
|
||||
}
|
||||
#disclamer {
|
||||
text-align:center;
|
||||
margin-top:2em;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#container {
|
||||
margin-top:2em;
|
||||
}
|
||||
#containerBig {
|
||||
margin:1em;
|
||||
}
|
||||
#wrapper {
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width: 15.0em;
|
||||
}
|
||||
#menubox #menulogo {
|
||||
height:3.5em;
|
||||
}
|
||||
#menubox #menufirst {
|
||||
height:2.5em;
|
||||
}
|
||||
#menubox #menusecond {
|
||||
height:2.5em;
|
||||
}
|
||||
#menubox #menureserved {
|
||||
height:1.875em;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
function doOnLoad(URL, redirurl) {
|
||||
|
||||
popup = window.open(URL, 'logout_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=600');
|
||||
|
||||
if (redirurl) { self.location = redirurl; }
|
||||
}
|
||||
|
||||
function CloseItOnClick() { window.close(); }
|
||||
function CloseItAfterSomeTime() { setTimeout("window.close();", 5 * 1000); }
|
|
@ -1,44 +0,0 @@
|
|||
(function(w, d) {
|
||||
|
||||
var deviceIphone = "iphone";
|
||||
var deviceIpod = "ipod";
|
||||
var deviceIpad = "ipad";
|
||||
var deviceS60 = "series60";
|
||||
var deviceSymbian = "symbian";
|
||||
var engineWebKit = "webkit";
|
||||
var deviceAndroid = "android";
|
||||
var deviceWinMob = "windows ce";
|
||||
var deviceWinPho = "windows phone";
|
||||
var deviceBB = "blackberry";
|
||||
var devicePalm = "palm";
|
||||
var deviceKindle = "kindle";
|
||||
var deviceOperaM = "opera mini";
|
||||
|
||||
var uagent = navigator.userAgent.toLowerCase();
|
||||
|
||||
var isIphone = this.isIphone = function(){ return uagent.search(deviceIphone) > -1; };
|
||||
var isIpod = this.isIpod = function(){ return uagent.search(deviceIpod) > -1; };
|
||||
var isIpad = this.isIpad = function(){ return uagent.search(deviceIpad) > -1; };
|
||||
var isIphoneOrIpod = this.isIphoneOrIpod = function(){ return isIphone() || isIpod(); };
|
||||
var isS60OssBrowser = this.isS60OssBrowser = function(){ return (uagent.search(engineWebKit) > -1) && (uagent.search(deviceS60) > -1 || uagent.search(deviceSymbian) > -1); };
|
||||
var isAndroid = this.isAndroid = function(){ return uagent.search(deviceAndroid) > -1; };
|
||||
var isAndroidWebKit = this.isAndroidWebKit = function(){ return isAndroid() && isWebkit(); };
|
||||
var isWindowsMobile = this.isWindowsMobile = function(){ return uagent.search(deviceWinMob) > -1; };
|
||||
var isWindowsPhone = this.isWindowsPhone = function(){ return uagent.search(deviceWinPho) > -1; };
|
||||
var isBlackBerry = this.isBlackBerry = function(){ return uagent.search(deviceBB) > -1; };
|
||||
var isPalmOS = this.isPalmOS = function(){ return uagent.search(devicePalm) > -1; };
|
||||
var isKindle = this.isKindle = function(){ return uagent.search(deviceKindle) > -1; };
|
||||
var isOperaMini = this.isOperaMini = function(){ return uagent.search(deviceOperaM) > -1; };
|
||||
|
||||
var isMobile = this.isMobile = function() {
|
||||
return isIphoneOrIpod() || isS60OssBrowser() || isAndroid() || isWindowsMobile() || isWindowsPhone() || isBlackBerry() || isPalmOS() || isOperaMini();
|
||||
};
|
||||
|
||||
var loadCss = this.loadCss = function(full,mobile) {
|
||||
var css = d.createElement('link');
|
||||
css.rel = 'stylesheet';
|
||||
css.href = isMobile()?mobile:full;
|
||||
(d.head || d.getElementsByTagName('head')[0]).appendChild(css);
|
||||
};
|
||||
|
||||
})(this, this.document);
|
|
@ -1,76 +0,0 @@
|
|||
(function(w, d) {
|
||||
var wimoveFetchUrl = this.wimoveFetchUrl = function(url) {
|
||||
var request = false;
|
||||
if (window.XMLHttpRequest) {
|
||||
request = new XMLHttpRequest;
|
||||
} else if (window.ActiveXObject) {
|
||||
request = new ActiveXObject("Microsoft.XMLHttp");
|
||||
}
|
||||
if (request) {
|
||||
request.open("GET", url, false);
|
||||
request.send();
|
||||
if (request.status == 200) { return request.responseText; }
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
var wimoveGetQueryVar = this.wimoveGetQueryVar = function(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i=0;i<vars.length;i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return unescape(pair[1]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var wimoveBuildBanner = this.wimoveBuildBanner = function(baseUrl) {
|
||||
var bannerUrls = new Array();
|
||||
var ap=wimoveGetQueryVar("ap");
|
||||
var gateway=wimoveGetQueryVar("gateway");
|
||||
|
||||
if (ap)
|
||||
ap=ap.replace(/@.*$/,'');
|
||||
else
|
||||
ap='ap';
|
||||
|
||||
if (gateway) {
|
||||
gateway=gateway.replace(/:.*$/,'');
|
||||
ip=gateway.match(/[0-9]+/g);
|
||||
certid = ''+(parseInt(ip[2]) * 254 + parseInt(ip[3]))+'';
|
||||
for (var i = certid.length; i < 4; i++) certid = '0'+certid;
|
||||
bannerUrls.push(baseUrl + '/X' + certid + 'R' + ap + (isMobile() ? '/mobile' : '/full') + '/banner.html');
|
||||
}
|
||||
bannerUrls.push(baseUrl + '/default' + (isMobile() ? '/mobile' : '/full') + '/banner.html');
|
||||
|
||||
var banner;
|
||||
for (var idx in bannerUrls) {
|
||||
banner = wimoveFetchUrl(bannerUrls[idx]);
|
||||
if (banner !== false)
|
||||
break;
|
||||
}
|
||||
if (banner !== false) {
|
||||
document.write(banner);
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
var wimoveGetBanner = this.wimoveGetBanner = function(baseUrl,ap) {
|
||||
var bannerUrls = new Array();
|
||||
|
||||
if (ap) bannerUrls.push(baseUrl + ap + (isMobile() ? '/mobile' : '/full') + '/banner.html');
|
||||
bannerUrls.push(baseUrl + '/default' + (isMobile() ? '/mobile' : '/full') + '/banner.html');
|
||||
|
||||
var banner;
|
||||
for (var idx in bannerUrls) {
|
||||
banner = wimoveFetchUrl(bannerUrls[idx]);
|
||||
if (banner !== false)
|
||||
break;
|
||||
}
|
||||
if (banner !== false) {
|
||||
document.write(banner);
|
||||
}
|
||||
};
|
||||
})(this, this.document);
|
Loading…
Reference in New Issue
Block a user