xref: /netbsd-src/external/cddl/osnet/lib/libdtrace/make-errno-d.awk (revision d783b29581ce5b152ee063ef0c2a62fa0d8fe15e)
1BEGIN {
2	print "/*	$NetBSD: make-errno-d.awk,v 1.1 2020/03/08 22:11:48 mgorny Exp $	*/"
3	print ""
4	print "/*"
5	print " * This file is autogenerated.  Please call:"
6	print " *   awk make-errno-d.awk < ../../../../../sys/sys/errno.h"
7	print " * to get new data."
8	print " */"
9	print ""
10	print "/*"
11	print " * CDDL HEADER START"
12	print " *"
13	print " * The contents of this file are subject to the terms of the"
14	print " * Common Development and Distribution License, Version 1.0 only"
15	print " * (the \"License\").  You may not use this file except in compliance"
16	print " * with the License."
17	print " *"
18	print " * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE"
19	print " * or http://www.opensolaris.org/os/licensing."
20	print " * See the License for the specific language governing permissions"
21	print " * and limitations under the License."
22	print " *"
23	print " * When distributing Covered Code, include this CDDL HEADER in each"
24	print " * file and include the License file at usr/src/OPENSOLARIS.LICENSE."
25	print " * If applicable, add the following below this CDDL HEADER, with the"
26	print " * fields enclosed by brackets \"[]\" replaced with your own identifying"
27	print " * information: Portions Copyright [yyyy] [name of copyright owner]"
28	print " *"
29	print " * CDDL HEADER END"
30	print " *"
31	print " * Portions Copyright 2006-2008 John Birrell jb@freebsd.org"
32	print " *"
33	print " * $FreeBSD: head/cddl/lib/libdtrace/errno.d 179189 2008-05-22 04:26:42Z jb $"
34	print " */"
35	print "/*"
36	print " * Copyright 2004 Sun Microsystems, Inc.  All rights reserved."
37	print " * Use is subject to license terms."
38	print " */"
39	print ""
40}
41
42/^#define\s*E/ {
43	print "inline int " $2 " = " $3 ";"
44	print "#pragma D binding \"1.0\" " $2
45}
46