mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-24 10:32:32 +00:00
- improved timing of periodic threads
This commit is contained in:
parent
f79edf9e90
commit
ce02e4fc56
@ -6,6 +6,7 @@ V0.8 (snapshot) -
|
||||
[Jürgen Lachmann]
|
||||
- AmigaOS/Unix/extfs_*.cpp: .finf helper file now stores complete
|
||||
FInfo/FXInfo, replaced get/set_finder_*() functions by get/set_finfo()
|
||||
- Unix: improved timing of periodic threads
|
||||
- include/macos_util.h: defines FOURCC() macro to make MacOS-like
|
||||
four-character-codes, replaced most instances of multi-character
|
||||
constants in the sources by this macro to avoid compiler warnings
|
||||
|
44
BasiliskII/src/Unix/aclocal.m4
vendored
44
BasiliskII/src/Unix/aclocal.m4
vendored
@ -1,7 +1,19 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# Configure paths for GTK+
|
||||
# Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GTK,
|
||||
@ -15,6 +27,15 @@ AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||
, enable_gtktest=yes)
|
||||
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gthread)
|
||||
gtk_config_args="$gtk_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
@ -47,7 +68,7 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||
dnl checks the results of gtk-config to some extent
|
||||
@ -56,15 +77,19 @@ dnl
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
@ -85,6 +110,17 @@ main ()
|
||||
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
@ -169,7 +205,6 @@ main ()
|
||||
rm -f conf.gtktest
|
||||
])
|
||||
|
||||
|
||||
# Configure paths for ESD
|
||||
# Manish Singh 98-9-30
|
||||
# stolen back from Frank Belew
|
||||
@ -334,3 +369,4 @@ int main ()
|
||||
AC_SUBST(ESD_LIBS)
|
||||
rm -f conf.esdtest
|
||||
])
|
||||
|
||||
|
@ -73,9 +73,6 @@
|
||||
/* Define if you have the clock_gettime function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define if you have the nanosleep function. */
|
||||
#undef HAVE_NANOSLEEP
|
||||
|
||||
/* Define if you have the pthread_cancel function. */
|
||||
#undef HAVE_PTHREAD_CANCEL
|
||||
|
||||
|
192
BasiliskII/src/Unix/configure
vendored
192
BasiliskII/src/Unix/configure
vendored
@ -2681,6 +2681,15 @@ else
|
||||
fi
|
||||
|
||||
|
||||
for module in .
|
||||
do
|
||||
case "$module" in
|
||||
gthread)
|
||||
gtk_config_args="$gtk_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
@ -2697,7 +2706,7 @@ fi
|
||||
# Extract the first word of "gtk-config", so it can be a program name with args.
|
||||
set dummy gtk-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:2701: checking for $ac_word" >&5
|
||||
echo "configure:2710: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2732,7 +2741,7 @@ fi
|
||||
|
||||
min_gtk_version=1.2.0
|
||||
echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
|
||||
echo "configure:2736: checking for GTK - version >= $min_gtk_version" >&5
|
||||
echo "configure:2745: checking for GTK - version >= $min_gtk_version" >&5
|
||||
no_gtk=""
|
||||
if test "$GTK_CONFIG" = "no" ; then
|
||||
no_gtk=yes
|
||||
@ -2749,26 +2758,30 @@ echo "configure:2736: checking for GTK - version >= $min_gtk_version" >&5
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
rm -f conf.gtktest
|
||||
if test "$cross_compiling" = yes; then
|
||||
echo $ac_n "cross compiling; assumed OK... $ac_c"
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2759 "configure"
|
||||
#line 2768 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
@ -2789,6 +2802,17 @@ main ()
|
||||
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
@ -2818,7 +2842,7 @@ main ()
|
||||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:2822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
@ -2861,7 +2885,7 @@ EOF
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2865 "configure"
|
||||
#line 2889 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@ -2871,7 +2895,7 @@ int main() {
|
||||
return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||
@ -2956,7 +2980,7 @@ fi
|
||||
# Extract the first word of "esd-config", so it can be a program name with args.
|
||||
set dummy esd-config; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:2960: checking for $ac_word" >&5
|
||||
echo "configure:2984: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -2991,7 +3015,7 @@ fi
|
||||
|
||||
min_esd_version=0.2.8
|
||||
echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6
|
||||
echo "configure:2995: checking for ESD - version >= $min_esd_version" >&5
|
||||
echo "configure:3019: checking for ESD - version >= $min_esd_version" >&5
|
||||
no_esd=""
|
||||
if test "$ESD_CONFIG" = "no" ; then
|
||||
no_esd=yes
|
||||
@ -3015,7 +3039,7 @@ echo "configure:2995: checking for ESD - version >= $min_esd_version" >&5
|
||||
echo $ac_n "cross compiling; assumed OK... $ac_c"
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3019 "configure"
|
||||
#line 3043 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -3073,7 +3097,7 @@ int main ()
|
||||
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
@ -3115,7 +3139,7 @@ EOF
|
||||
CFLAGS="$CFLAGS $ESD_CFLAGS"
|
||||
LIBS="$LIBS $ESD_LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3119 "configure"
|
||||
#line 3143 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -3125,7 +3149,7 @@ int main() {
|
||||
return 0;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding ESD or finding the wrong"
|
||||
@ -3164,12 +3188,12 @@ rm -f conftest*
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:3168: checking for ANSI C header files" >&5
|
||||
echo "configure:3192: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3173 "configure"
|
||||
#line 3197 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@ -3177,7 +3201,7 @@ else
|
||||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -3194,7 +3218,7 @@ rm -f conftest*
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3198 "configure"
|
||||
#line 3222 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
@ -3212,7 +3236,7 @@ fi
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3216 "configure"
|
||||
#line 3240 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
@ -3233,7 +3257,7 @@ if test "$cross_compiling" = yes; then
|
||||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3237 "configure"
|
||||
#line 3261 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
@ -3244,7 +3268,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
||||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
@ -3271,17 +3295,17 @@ for ac_hdr in unistd.h fcntl.h sys/time.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:3275: checking for $ac_hdr" >&5
|
||||
echo "configure:3299: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3280 "configure"
|
||||
#line 3304 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -3309,14 +3333,14 @@ done
|
||||
|
||||
|
||||
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
||||
echo "configure:3313: checking whether byte ordering is bigendian" >&5
|
||||
echo "configure:3337: checking whether byte ordering is bigendian" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_cv_c_bigendian=unknown
|
||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3320 "configure"
|
||||
#line 3344 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -3327,11 +3351,11 @@ int main() {
|
||||
#endif
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3335 "configure"
|
||||
#line 3359 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -3342,7 +3366,7 @@ int main() {
|
||||
#endif
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_bigendian=yes
|
||||
else
|
||||
@ -3362,7 +3386,7 @@ if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3366 "configure"
|
||||
#line 3390 "configure"
|
||||
#include "confdefs.h"
|
||||
main () {
|
||||
/* Are we little or big endian? From Harbison&Steele. */
|
||||
@ -3375,7 +3399,7 @@ main () {
|
||||
exit (u.c[sizeof (long) - 1] == 1);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_c_bigendian=no
|
||||
else
|
||||
@ -3399,12 +3423,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:3403: checking for working const" >&5
|
||||
echo "configure:3427: checking for working const" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3408 "configure"
|
||||
#line 3432 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@ -3453,7 +3477,7 @@ ccp = (char const *const *) p;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
@ -3474,21 +3498,21 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for inline""... $ac_c" 1>&6
|
||||
echo "configure:3478: checking for inline" >&5
|
||||
echo "configure:3502: checking for inline" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_cv_c_inline=no
|
||||
for ac_kw in inline __inline__ __inline; do
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3485 "configure"
|
||||
#line 3509 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
} $ac_kw foo() {
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_inline=$ac_kw; break
|
||||
else
|
||||
@ -3514,7 +3538,7 @@ EOF
|
||||
esac
|
||||
|
||||
echo $ac_n "checking size of short""... $ac_c" 1>&6
|
||||
echo "configure:3518: checking size of short" >&5
|
||||
echo "configure:3542: checking size of short" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3522,7 +3546,7 @@ else
|
||||
ac_cv_sizeof_short=2
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3526 "configure"
|
||||
#line 3550 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
@ -3533,7 +3557,7 @@ main()
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_short=`cat conftestval`
|
||||
else
|
||||
@ -3553,7 +3577,7 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking size of int""... $ac_c" 1>&6
|
||||
echo "configure:3557: checking size of int" >&5
|
||||
echo "configure:3581: checking size of int" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3561,7 +3585,7 @@ else
|
||||
ac_cv_sizeof_int=4
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3565 "configure"
|
||||
#line 3589 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
@ -3572,7 +3596,7 @@ main()
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_int=`cat conftestval`
|
||||
else
|
||||
@ -3592,7 +3616,7 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking size of long""... $ac_c" 1>&6
|
||||
echo "configure:3596: checking size of long" >&5
|
||||
echo "configure:3620: checking size of long" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3600,7 +3624,7 @@ else
|
||||
ac_cv_sizeof_long=4
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3604 "configure"
|
||||
#line 3628 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
@ -3611,7 +3635,7 @@ main()
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_long=`cat conftestval`
|
||||
else
|
||||
@ -3631,7 +3655,7 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking size of long long""... $ac_c" 1>&6
|
||||
echo "configure:3635: checking size of long long" >&5
|
||||
echo "configure:3659: checking size of long long" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3639,7 +3663,7 @@ else
|
||||
ac_cv_sizeof_long_long=8
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3643 "configure"
|
||||
#line 3667 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
@ -3650,7 +3674,7 @@ main()
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_long_long=`cat conftestval`
|
||||
else
|
||||
@ -3670,12 +3694,12 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking for off_t""... $ac_c" 1>&6
|
||||
echo "configure:3674: checking for off_t" >&5
|
||||
echo "configure:3698: checking for off_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3679 "configure"
|
||||
#line 3703 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
@ -3703,12 +3727,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for loff_t""... $ac_c" 1>&6
|
||||
echo "configure:3707: checking for loff_t" >&5
|
||||
echo "configure:3731: checking for loff_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3712 "configure"
|
||||
#line 3736 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
@ -3736,12 +3760,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:3740: checking for size_t" >&5
|
||||
echo "configure:3764: checking for size_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3745 "configure"
|
||||
#line 3769 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
@ -3769,12 +3793,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
||||
echo "configure:3773: checking whether time.h and sys/time.h may both be included" >&5
|
||||
echo "configure:3797: checking whether time.h and sys/time.h may both be included" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3778 "configure"
|
||||
#line 3802 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
@ -3783,7 +3807,7 @@ int main() {
|
||||
struct tm *tp;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_header_time=yes
|
||||
else
|
||||
@ -3804,12 +3828,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
|
||||
echo "configure:3808: checking whether struct tm is in sys/time.h or time.h" >&5
|
||||
echo "configure:3832: checking whether struct tm is in sys/time.h or time.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3813 "configure"
|
||||
#line 3837 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
@ -3817,7 +3841,7 @@ int main() {
|
||||
struct tm *tp; tp->tm_sec;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_struct_tm=time.h
|
||||
else
|
||||
@ -3841,12 +3865,12 @@ fi
|
||||
for ac_func in strdup cfmakeraw
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3845: checking for $ac_func" >&5
|
||||
echo "configure:3869: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3850 "configure"
|
||||
#line 3874 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -3869,7 +3893,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -3893,15 +3917,15 @@ else
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in nanosleep clock_gettime timer_create
|
||||
for ac_func in clock_gettime timer_create
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3900: checking for $ac_func" >&5
|
||||
echo "configure:3924: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3905 "configure"
|
||||
#line 3929 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -3924,7 +3948,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -3966,7 +3990,7 @@ if MACHINE=`uname -s 2>/dev/null`; then
|
||||
AUDIOSRC=audio_oss_esd.cpp
|
||||
DEFINES="$DEFINES -DBSD_COMP"
|
||||
echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6
|
||||
echo "configure:3970: checking for cam_open_btl in -lcam" >&5
|
||||
echo "configure:3994: checking for cam_open_btl in -lcam" >&5
|
||||
ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -3974,7 +3998,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcam $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3978 "configure"
|
||||
#line 4002 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -3985,7 +4009,7 @@ int main() {
|
||||
cam_open_btl()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -4011,17 +4035,17 @@ fi
|
||||
else
|
||||
ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6
|
||||
echo "configure:4015: checking for /sys/cam/cam.h" >&5
|
||||
echo "configure:4039: checking for /sys/cam/cam.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4020 "configure"
|
||||
#line 4044 "configure"
|
||||
#include "confdefs.h"
|
||||
#include </sys/cam/cam.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -4056,7 +4080,7 @@ fi
|
||||
FreeBSD*)
|
||||
DEFINES="$DEFINES -DBSD_COMP"
|
||||
echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6
|
||||
echo "configure:4060: checking for scsi_open in -lscsi" >&5
|
||||
echo "configure:4084: checking for scsi_open in -lscsi" >&5
|
||||
ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -4064,7 +4088,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lscsi $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4068 "configure"
|
||||
#line 4092 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -4075,7 +4099,7 @@ int main() {
|
||||
scsi_open()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -4101,17 +4125,17 @@ fi
|
||||
else
|
||||
ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6
|
||||
echo "configure:4105: checking for scsi.h sys/scsiio.h" >&5
|
||||
echo "configure:4129: checking for scsi.h sys/scsiio.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4110 "configure"
|
||||
#line 4134 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <scsi.h sys/scsiio.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -4164,7 +4188,7 @@ SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRA
|
||||
|
||||
HAVE_GAS=no
|
||||
echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6
|
||||
echo "configure:4168: checking for GAS .p2align feature" >&5
|
||||
echo "configure:4192: checking for GAS .p2align feature" >&5
|
||||
cat >conftest.S << EOF
|
||||
.text
|
||||
.p2align 5
|
||||
@ -4174,9 +4198,9 @@ echo "$ac_t""$HAVE_GAS" 1>&6
|
||||
|
||||
HAVE_GCC27=no
|
||||
echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6
|
||||
echo "configure:4178: checking for GCC 2.7 or higher" >&5
|
||||
echo "configure:4202: checking for GCC 2.7 or higher" >&5
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4180 "configure"
|
||||
#line 4204 "configure"
|
||||
#include "confdefs.h"
|
||||
#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
|
||||
yes
|
||||
@ -4215,7 +4239,7 @@ elif [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xye
|
||||
case "$MACHINE" in
|
||||
SunOS*)
|
||||
echo $ac_n "checking SPARC CPU architecture""... $ac_c" 1>&6
|
||||
echo "configure:4219: checking SPARC CPU architecture" >&5
|
||||
echo "configure:4243: checking SPARC CPU architecture" >&5
|
||||
SPARC_TYPE=`Solaris/which_sparc`
|
||||
echo "$ac_t""$SPARC_TYPE" 1>&6
|
||||
case "$SPARC_TYPE" in
|
||||
|
@ -180,7 +180,7 @@ AC_STRUCT_TM
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(strdup cfmakeraw)
|
||||
AC_CHECK_FUNCS(nanosleep clock_gettime timer_create)
|
||||
AC_CHECK_FUNCS(clock_gettime timer_create)
|
||||
|
||||
dnl Select system-dependant source files.
|
||||
SERIALSRC=serial_unix.cpp
|
||||
|
@ -687,14 +687,8 @@ static void xpram_watchdog(void)
|
||||
static void *xpram_func(void *arg)
|
||||
{
|
||||
while (!xpram_thread_cancel) {
|
||||
for (int i=0; i<60 && !xpram_thread_cancel; i++) {
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
struct timespec req = {1, 0};
|
||||
nanosleep(&req, NULL);
|
||||
#else
|
||||
usleep(1000000);
|
||||
#endif
|
||||
}
|
||||
for (int i=0; i<60 && !xpram_thread_cancel; i++)
|
||||
Delay_usec(1000000);
|
||||
xpram_watchdog();
|
||||
}
|
||||
return NULL;
|
||||
@ -746,24 +740,77 @@ static void one_tick(...)
|
||||
#ifdef HAVE_PTHREADS
|
||||
static void *tick_func(void *arg)
|
||||
{
|
||||
uint64 next = GetTicks_usec();
|
||||
while (!tick_thread_cancel) {
|
||||
|
||||
// Wait
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
struct timespec req = {0, 16625000};
|
||||
nanosleep(&req, NULL);
|
||||
#else
|
||||
usleep(16625);
|
||||
#endif
|
||||
|
||||
// Action
|
||||
one_tick();
|
||||
next += 16625;
|
||||
int64 delay = next - GetTicks_usec();
|
||||
if (delay > 0)
|
||||
Delay_usec(delay);
|
||||
else if (delay < -16625)
|
||||
next = GetTicks_usec();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Get current value of microsecond timer
|
||||
*/
|
||||
|
||||
uint64 GetTicks_usec(void)
|
||||
{
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_REALTIME, &t);
|
||||
return (uint64)t.tv_sec * 1000000 + t.tv_nsec / 1000;
|
||||
#else
|
||||
struct timeval t;
|
||||
gettimeofday(&t, NULL);
|
||||
return (uint64)t.tv_sec * 1000000 + t.tv_usec;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Delay by specified number of microseconds (<1 second)
|
||||
* (adapted from SDL_Delay() source)
|
||||
*/
|
||||
|
||||
void Delay_usec(uint32 usec)
|
||||
{
|
||||
int was_error;
|
||||
#ifndef __linux__ // Non-Linux implementations need to calculate time left
|
||||
uint64 then, now, elapsed;
|
||||
#endif
|
||||
struct timeval tv;
|
||||
|
||||
// Set the timeout interval - Linux only needs to do this once
|
||||
#ifdef __linux__
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = usec;
|
||||
#else
|
||||
then = GetTicks_usec();
|
||||
#endif
|
||||
do {
|
||||
errno = 0;
|
||||
#ifndef __linux__
|
||||
/* Calculate the time interval left (in case of interrupt) */
|
||||
now = GetTicks_usec();
|
||||
elapsed = now - then;
|
||||
then = now;
|
||||
if (elapsed >= usec)
|
||||
break;
|
||||
usec -= elapsed;
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = usec;
|
||||
#endif
|
||||
was_error = select(0, NULL, NULL, NULL, &tv);
|
||||
} while (was_error && (errno == EINTR));
|
||||
}
|
||||
|
||||
|
||||
#if !EMULATED_68K
|
||||
/*
|
||||
* Virtual 68k interrupt handler
|
||||
|
@ -148,6 +148,10 @@ typedef uae_u32 uaecptr;
|
||||
# define CPU_CAN_ACCESS_UNALIGNED
|
||||
#endif
|
||||
|
||||
/* Timing functions */
|
||||
extern uint64 GetTicks_usec(void);
|
||||
extern void Delay_usec(uint32 usec);
|
||||
|
||||
/* UAE CPU defines */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
|
||||
|
@ -1458,8 +1458,7 @@ static void update_display_static(void)
|
||||
x1 = i << 3;
|
||||
break;
|
||||
}
|
||||
p++;
|
||||
p2++;
|
||||
p++; p2++;
|
||||
}
|
||||
}
|
||||
x2 = x1;
|
||||
@ -1469,8 +1468,7 @@ static void update_display_static(void)
|
||||
p += bytes_per_row;
|
||||
p2 += bytes_per_row;
|
||||
for (i=(VideoMonitor.x>>3); i>(x2>>3); i--) {
|
||||
p--;
|
||||
p2--;
|
||||
p--; p2--;
|
||||
if (*p != *p2) {
|
||||
x2 = i << 3;
|
||||
break;
|
||||
@ -1492,13 +1490,12 @@ static void update_display_static(void)
|
||||
for (j=y1; j<=y2; j++) {
|
||||
p = &the_buffer[j * bytes_per_row];
|
||||
p2 = &the_buffer_copy[j * bytes_per_row];
|
||||
for (i=0; i<x1; i++) {
|
||||
if (memcmp(p, p2, bytes_per_pixel)) {
|
||||
x1 = i;
|
||||
for (i=0; i<x1*bytes_per_pixel; i++) {
|
||||
if (*p != *p2) {
|
||||
x1 = i / bytes_per_pixel;
|
||||
break;
|
||||
}
|
||||
p += bytes_per_pixel;
|
||||
p2 += bytes_per_pixel;
|
||||
p++; p2++;
|
||||
}
|
||||
}
|
||||
x2 = x1;
|
||||
@ -1507,11 +1504,11 @@ static void update_display_static(void)
|
||||
p2 = &the_buffer_copy[j * bytes_per_row];
|
||||
p += bytes_per_row;
|
||||
p2 += bytes_per_row;
|
||||
for (i=VideoMonitor.x; i>x2; i--) {
|
||||
p -= bytes_per_pixel;
|
||||
p2 -= bytes_per_pixel;
|
||||
if (memcmp(p, p2, bytes_per_pixel)) {
|
||||
x2 = i;
|
||||
for (i=VideoMonitor.x*bytes_per_pixel; i>x2*bytes_per_pixel; i--) {
|
||||
p--;
|
||||
p2--;
|
||||
if (*p != *p2) {
|
||||
x2 = i / bytes_per_pixel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1601,15 +1598,21 @@ void VideoRefresh(void)
|
||||
#ifdef HAVE_PTHREADS
|
||||
static void *redraw_func(void *arg)
|
||||
{
|
||||
uint64 start = GetTicks_usec();
|
||||
int64 ticks = 0;
|
||||
uint64 next = GetTicks_usec();
|
||||
while (!redraw_thread_cancel) {
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
struct timespec req = {0, 16666667};
|
||||
nanosleep(&req, NULL);
|
||||
#else
|
||||
usleep(16667);
|
||||
#endif
|
||||
VideoRefresh();
|
||||
next += 16667;
|
||||
int64 delay = next - GetTicks_usec();
|
||||
if (delay > 0)
|
||||
Delay_usec(delay);
|
||||
else if (delay < -16667)
|
||||
next = GetTicks_usec();
|
||||
ticks++;
|
||||
}
|
||||
uint64 end = GetTicks_usec();
|
||||
printf("%Ld ticks in %Ld usec = %Ld ticks/sec\n", ticks, end - start, (end - start) / ticks);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user