gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamm Maguire <camm@transcendence.maguirefamily.org>2025年04月18日 20:11:17 -0400
committerCamm Maguire <camm@transcendence.maguirefamily.org>2025年04月18日 20:11:17 -0400
commit8a2548c1107c0b33bc523ef94fca7666e4b6b9a2 (patch)
tree2b8ed1f8109529adf564986c94e934d9f6c2d054
parent0b3792ea4f5ef09a00c43acd9c08c21693cc9eaf (diff)
downloadgcl-8a2548c1107c0b33bc523ef94fca7666e4b6b9a2.tar.gz
support old dis-asm.h
Diffstat
-rwxr-xr-xgcl/configure 128
-rw-r--r--gcl/configure.ac 1
-rw-r--r--gcl/h/gclincl.h.in 3
-rw-r--r--gcl/o/main.c 8
4 files changed, 80 insertions, 60 deletions
diff --git a/gcl/configure b/gcl/configure
index b7c7c64f1..563f86631 100755
--- a/gcl/configure
+++ b/gcl/configure
@@ -2189,65 +2189,6 @@ printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_check_decl
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- as_lineno=${as_lineno-"1ドル"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 2ドル" >&5
-printf %s "checking for 2ドル... " >&6; }
-if eval test \${3ドル+y}
-then :
- printf %s "(cached) " >&6
-else case e in #(
- e) eval "3ドル=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-4ドル
-int
-main (void)
-{
-if (sizeof (2ドル))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-4ドル
-int
-main (void)
-{
-if (sizeof ((2ドル)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
-else case e in #(
- e) eval "3ドル=yes" ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
-esac
-fi
-eval ac_res=\$3ドル
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_type
ac_configure_args_raw=
for ac_arg
do
@@ -11353,6 +11294,75 @@ if test "x$ac_cv_header_dis_asm_h" = xyes
then :
printf "%s\n" "#define HAVE_DIS_ASM_H 1" >>confdefs.h
MLIBS=$LIBS
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"1ドル"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 2ドル" >&5
+printf %s "checking for 2ドル... " >&6; }
+if eval test \${3ドル+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) eval "3ドル=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+4ドル
+int
+main (void)
+{
+if (sizeof (2ドル))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+4ドル
+int
+main (void)
+{
+if (sizeof ((2ドル)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else case e in #(
+ e) eval "3ドル=yes" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+eval ac_res=\$3ドル
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+ac_fn_c_check_type "$LINENO" "fprintf_styled_ftype" "ac_cv_type_fprintf_styled_ftype" "#include <dis-asm.h>
+"
+if test "x$ac_cv_type_fprintf_styled_ftype" = xyes
+then :
+
+printf "%s\n" "#define HAVE_FPRINTF_STYLED_FTYPE 1" >>confdefs.h
+
+
+fi
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for init_disassemble_info in -lopcodes" >&5
printf %s "checking for init_disassemble_info in -lopcodes... " >&6; }
if test ${ac_cv_lib_opcodes_init_disassemble_info+y}
diff --git a/gcl/configure.ac b/gcl/configure.ac
index 3755c12d8..4af1f1cee 100644
--- a/gcl/configure.ac
+++ b/gcl/configure.ac
@@ -1746,6 +1746,7 @@ AC_CHECK_FUNCS(feenableexcept)
AC_CHECK_HEADERS(dis-asm.h,
MLIBS=$LIBS
+ AC_CHECK_TYPES([fprintf_styled_ftype],[],[],[#include <dis-asm.h>])
AC_CHECK_LIB(opcodes,init_disassemble_info)
AC_CHECK_LIB(dl,dlopen,#opcodes changes too quickly to link directly
AC_CHECK_FUNCS(print_insn_i386,LIBS="$MLIBS -ldl")))
diff --git a/gcl/h/gclincl.h.in b/gcl/h/gclincl.h.in
index 43431c8cb..b2ce398af 100644
--- a/gcl/h/gclincl.h.in
+++ b/gcl/h/gclincl.h.in
@@ -72,6 +72,9 @@
/* Define to 1 if you have the <float.h> header file. */
#undef HAVE_FLOAT_H
+/* Define to 1 if the system has the type 'fprintf_styled_ftype'. */
+#undef HAVE_FPRINTF_STYLED_FTYPE
+
/* Define to 1 if you have the 'getcwd' function. */
#undef HAVE_GETCWD
diff --git a/gcl/o/main.c b/gcl/o/main.c
index d709388a8..2bf1750eb 100644
--- a/gcl/o/main.c
+++ b/gcl/o/main.c
@@ -1459,6 +1459,7 @@ my_fprintf(void *v,const char *f,...) {
return r;
}
+#ifdef HAVE_FPRINTF_STYLED_FTYPE
static int
my_fprintf_styled(void *v,enum disassembler_style,const char *f,...) {
va_list va;
@@ -1468,6 +1469,7 @@ my_fprintf_styled(void *v,enum disassembler_style,const char *f,...) {
va_end(va);
return r;
}
+#endif
static int
my_read(bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, struct disassemble_info *dinfo) {
@@ -1495,7 +1497,11 @@ DEFUN("DISASSEMBLE-INSTRUCTION",object,fSdisassemble_instruction,SI,1,1,NONE,OI,
if ((v=dlopen("libopcodes.so",RTLD_NOW))) {
if ((s=dlsym(v,"init_disassemble_info"))) {
- s(&i, stdout,(fprintf_ftype) my_fprintf,my_fprintf_styled);
+ s(&i, stdout,(fprintf_ftype)my_fprintf
+#ifdef HAVE_FPRINTF_STYLED_FTYPE
+ ,my_fprintf_styled
+#endif
+ );
i.read_memory_func=my_read;
i.print_address_func=my_pa;
#if defined(OUTPUT_MACH)
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月01日 11:12:51 +0000

AltStyle によって変換されたページ (->オリジナル) /