diff --git a/skeletons/asn_internal.h b/skeletons/asn_internal.h index 55e4e2b3b2cde7000b9a2d980682027cd00501dc..1de4ba9285dc7f917549386aa2b1ebb6f3ca6804 100644 --- a/skeletons/asn_internal.h +++ b/skeletons/asn_internal.h @@ -40,7 +40,7 @@ int get_asn1c_environment_version(void); /* Run-time version */ #define ASN_DEBUG_INDENT_ADD(i) do{}while(0) #else /* !ASN_THREAD_SAFE */ int asn_debug_indent; -#define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += increment; } while(0) +#define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += i; } while(0) #endif /* ASN_THREAD_SAFE */ #define ASN_DEBUG(fmt, args...) do { \ int adi = asn_debug_indent; \ diff --git a/skeletons/per_opentype.c b/skeletons/per_opentype.c index 03a31d2d4afbef838298a83a7c52e4456d2131dd..a750fe80a79c17204dcbb65fc2893a93121605e2 100644 --- a/skeletons/per_opentype.c +++ b/skeletons/per_opentype.c @@ -7,6 +7,16 @@ #include <constr_TYPE.h> #include <per_opentype.h> +/* Thread safety requires sacrifice in output indentation. */ +#ifndef ASN_DEBUG_INDENT_ADD +#ifdef ASN_THREAD_SAFE +#define ASN_DEBUG_INDENT_ADD(i) do{}while(0) +#else /* !ASN_THREAD_SAFE */ +int asn_debug_indent; +#define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += i; } while(0) +#endif /* ASN_THREAD_SAFE */ +#endif /* ASN_DEBUG_INDENT_ADD */ + typedef struct uper_ugot_key { asn_per_data_t oldpd; /* Old per data source */ size_t unclaimed;