aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/asn_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'skeletons/asn_system.h')
-rw-r--r--skeletons/asn_system.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/skeletons/asn_system.h b/skeletons/asn_system.h
index b1e0212e..51af1dfb 100644
--- a/skeletons/asn_system.h
+++ b/skeletons/asn_system.h
@@ -1,5 +1,6 @@
/*-
- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2004, 2007 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
@@ -103,6 +104,11 @@ typedef unsigned int uint32_t;
#endif
#endif
+/* Figure out if thread safety is requested */
+#if !defined(ASN_THREAD_SAFE) && (defined(THREAD_SAFE) || define(_REENTRANT))
+#define ASN_THREAD_SAFE
+#endif /* Thread safety */
+
#ifndef offsetof /* If not defined by <stddef.h> */
#define offsetof(s, m) ((ptrdiff_t)&(((s *)0)->m) - (ptrdiff_t)((s *)0))
#endif /* offsetof */