XER support

diff --git a/skeletons/asn_system.h b/skeletons/asn_system.h
new file mode 100644
index 0000000..ee64a0c
--- /dev/null
+++ b/skeletons/asn_system.h
@@ -0,0 +1,65 @@
+/*-
+ * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Redistribution and modifications are permitted subject to BSD license.
+ */
+/*
+ * Miscellaneous system-dependent types.
+ */
+#ifndef	_ASN_SYSTEM_H_
+#define	_ASN_SYSTEM_H_
+
+#ifdef	HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>	/* For snprintf(3) */
+#include <stdlib.h>	/* For *alloc(3) */
+#include <string.h>	/* For memcpy(3) */
+#include <sys/types.h>	/* For size_t */
+#include <stdarg.h>	/* For va_start */
+#include <stddef.h>	/* for offsetof and ptrdiff_t */
+
+#include <inttypes.h>	/* C99 specifies this file */
+
+#if	defined(sun)
+#include <ieeefp.h>	/* for finite(3) */
+#endif
+
+/*
+ * 1. Earlier FreeBSD version didn't have <stdint.h>,
+ * but <inttypes.h> was present.
+ * 2. Sun Solaris requires <alloca.h> for alloca(3),
+ * but does not have <stdint.h>.
+ */
+#if	(!defined(__FreeBSD__) || !defined(_SYS_INTSYSTEM_H_))
+#if	defined(sun)
+#include <alloca.h>	/* For alloca(3) */
+#else
+#include <stdint.h>	/* SUSv2+ and C99 specify this file, for uintXX_t */
+#endif
+#endif
+
+#ifdef	WIN32
+#define	 snprintf	_snprintf
+#define	 vsnprintf	_vsnprintf
+#define	alloca(size)	_alloca(size)
+#endif	/* WIN32 */
+
+#ifndef	__GNUC__
+#define	__attribute__(ignore)
+#endif
+
+#ifndef	offsetof	/* If not defined by <stddef.h> */
+#define	offsetof(s, m)	((ptrdiff_t)&(((s *)0)->m) - (ptrdiff_t)((s *)0))
+#endif	/* offsetof */
+
+#ifndef	MIN		/* Suitable for comparing primitive types (integers) */
+#if defined(__GNUC__)
+#define	MIN(a,b)	({ __typeof a _a = a; __typeof b _b = b;	\
+	((_a)<(_b)?(_a):(_b)); })
+#else	/* !__GNUC__ */
+#define	MIN(a,b)	((a)<(b)?(a):(b))	/* Unsafe variant */
+#endif /* __GNUC__ */
+#endif	/* MIN */
+
+#endif	/* _ASN_SYSTEM_H_ */