diff --git a/acconfig.h b/acconfig.h index b84f44104..f5e56c87f 100644 --- a/acconfig.h +++ b/acconfig.h @@ -130,5 +130,8 @@ /* Define this if you have _mkdir */ #undef HAVE__mkdir +/* Define this if you want progs typechecking */ +#undef TYPECHECK_PROGS + @BOTTOM@ #endif // __config_h_ diff --git a/configure.in b/configure.in index 73aa5b407..ecf7349a6 100644 --- a/configure.in +++ b/configure.in @@ -1152,6 +1152,12 @@ AC_ARG_ENABLE(optimize, optimize=yes ) +AC_ARG_ENABLE(typecheck-progs, + [ --disable-typecheck-progs disable type checking on progs field access]) +if test "x$enable_typecheck_progs" != xno; then + AC_DEFINE(TYPECHECK_PROGS) +fi + AC_ARG_WITH(amd, [ --with-amd Optimize for AMD processors instead of Intel], HAVE_AMD="yes", diff --git a/nq/include/sv_progs.h b/nq/include/sv_progs.h index d1f3cd0c7..bd3f0f2a9 100644 --- a/nq/include/sv_progs.h +++ b/nq/include/sv_progs.h @@ -182,7 +182,7 @@ typedef struct extern sv_fields_t sv_fields; -#if 1 +#if TYPECHECK_PROGS #define SVFIELD(e,f,t) E_var (e, PR_AccessField (&sv_pr_state, #f, ev_##t, __FILE__, __LINE__), t) #else #define SVFIELD(e,f,t) E_var (e, sv_fields.f, t) diff --git a/qw/include/sv_progs.h b/qw/include/sv_progs.h index f5349a1ec..c58c1656f 100644 --- a/qw/include/sv_progs.h +++ b/qw/include/sv_progs.h @@ -157,7 +157,7 @@ typedef struct extern sv_fields_t sv_fields; -#if 1 +#if TYPECHECK_PROGS #define SVFIELD(e,f,t) E_var (e, PR_AccessField (&sv_pr_state, #f, ev_##t, __FILE__, __LINE__), t) #else #define SVFIELD(e,f,t) E_var (e, sv_fields.f, t)