Module Name:    src
Committed By:   jmcneill
Date:           Sat Sep  3 14:23:50 UTC 2011

Modified Files:
        src/sys/arch/usermode/include: asm.h bswap.h byte_swap.h disklabel.h
            elf_machdep.h endian.h endian_machdep.h int_const.h int_fmtio.h
            int_limits.h int_mwgwtypes.h int_types.h limits.h
            netbsd32_machdep.h param.h ptrace.h wchar_limits.h
Added Files:
        src/sys/arch/usermode/include: Makefile.headers genheaders.sh

Log Message:
Instead of doing #include </usr/include/machine/..>, use the headers
that ship with the kernel sources as #include "../../$host/include/$hdr",
and auto-generate these ugly headers with a script.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/usermode/include/Makefile.headers \
    src/sys/arch/usermode/include/genheaders.sh
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/usermode/include/asm.h \
    src/sys/arch/usermode/include/bswap.h \
    src/sys/arch/usermode/include/byte_swap.h \
    src/sys/arch/usermode/include/elf_machdep.h \
    src/sys/arch/usermode/include/endian.h \
    src/sys/arch/usermode/include/endian_machdep.h \
    src/sys/arch/usermode/include/int_const.h \
    src/sys/arch/usermode/include/int_fmtio.h \
    src/sys/arch/usermode/include/int_limits.h \
    src/sys/arch/usermode/include/int_mwgwtypes.h \
    src/sys/arch/usermode/include/int_types.h \
    src/sys/arch/usermode/include/limits.h \
    src/sys/arch/usermode/include/netbsd32_machdep.h \
    src/sys/arch/usermode/include/param.h \
    src/sys/arch/usermode/include/wchar_limits.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/include/disklabel.h \
    src/sys/arch/usermode/include/ptrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/include/asm.h
diff -u src/sys/arch/usermode/include/asm.h:1.2 src/sys/arch/usermode/include/asm.h:1.3
--- src/sys/arch/usermode/include/asm.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/asm.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: asm.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: asm.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_ASM_H
+#define _USERMODE_ASM_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_ASM_H
-#define _ARCH_USERMODE_INCLUDE_ASM_H
+#if defined(__i386__)
+#include "../../i386/include/asm.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/asm.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/asm.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_ASM_H */
+#endif
Index: src/sys/arch/usermode/include/bswap.h
diff -u src/sys/arch/usermode/include/bswap.h:1.2 src/sys/arch/usermode/include/bswap.h:1.3
--- src/sys/arch/usermode/include/bswap.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/bswap.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: bswap.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: bswap.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_BSWAP_H
+#define _USERMODE_BSWAP_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_BSWAP_H
-#define _ARCH_USERMODE_INCLUDE_BSWAP_H
+#if defined(__i386__)
+#include "../../i386/include/bswap.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/bswap.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/bswap.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_BSWAP_H */
+#endif
Index: src/sys/arch/usermode/include/byte_swap.h
diff -u src/sys/arch/usermode/include/byte_swap.h:1.2 src/sys/arch/usermode/include/byte_swap.h:1.3
--- src/sys/arch/usermode/include/byte_swap.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/byte_swap.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: byte_swap.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: byte_swap.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_BYTE_SWAP_H
+#define _USERMODE_BYTE_SWAP_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_BYTE_SWAP_H
-#define _ARCH_USERMODE_INCLUDE_BYTE_SWAP_H
+#if defined(__i386__)
+#include "../../i386/include/byte_swap.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/byte_swap.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/byte_swap.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_BYTE_SWAP_H */
+#endif
Index: src/sys/arch/usermode/include/elf_machdep.h
diff -u src/sys/arch/usermode/include/elf_machdep.h:1.2 src/sys/arch/usermode/include/elf_machdep.h:1.3
--- src/sys/arch/usermode/include/elf_machdep.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/elf_machdep.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: elf_machdep.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: elf_machdep.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_ELF_MACHDEP_H
+#define _USERMODE_ELF_MACHDEP_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_ELF_MACHDEP_H
-#define _ARCH_USERMODE_INCLUDE_ELF_MACHDEP_H
+#if defined(__i386__)
+#include "../../i386/include/elf_machdep.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/elf_machdep.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/elf_machdep.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_ELF_MACHDEP_H */
+#endif
Index: src/sys/arch/usermode/include/endian.h
diff -u src/sys/arch/usermode/include/endian.h:1.2 src/sys/arch/usermode/include/endian.h:1.3
--- src/sys/arch/usermode/include/endian.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/endian.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: endian.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: endian.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_ENDIAN_H
+#define _USERMODE_ENDIAN_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_ENDIAN_H
-#define _ARCH_USERMODE_INCLUDE_ENDIAN_H
+#if defined(__i386__)
+#include "../../i386/include/endian.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/endian.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/endian.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_ENDIAN_H */
+#endif
Index: src/sys/arch/usermode/include/endian_machdep.h
diff -u src/sys/arch/usermode/include/endian_machdep.h:1.2 src/sys/arch/usermode/include/endian_machdep.h:1.3
--- src/sys/arch/usermode/include/endian_machdep.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/endian_machdep.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: endian_machdep.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: endian_machdep.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_ENDIAN_MACHDEP_H
+#define _USERMODE_ENDIAN_MACHDEP_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_ENDIAN_MACHDEP_H
-#define _ARCH_USERMODE_INCLUDE_ENDIAN_MACHDEP_H
+#if defined(__i386__)
+#include "../../i386/include/endian_machdep.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/endian_machdep.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/endian_machdep.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_ENDIAN_MACHDEP_H */
+#endif
Index: src/sys/arch/usermode/include/int_const.h
diff -u src/sys/arch/usermode/include/int_const.h:1.2 src/sys/arch/usermode/include/int_const.h:1.3
--- src/sys/arch/usermode/include/int_const.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/int_const.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: int_const.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: int_const.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_INT_CONST_H
+#define _USERMODE_INT_CONST_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_INT_CONST_H
-#define _ARCH_USERMODE_INCLUDE_INT_CONST_H
+#if defined(__i386__)
+#include "../../i386/include/int_const.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/int_const.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/int_const.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_INT_CONST_H */
+#endif
Index: src/sys/arch/usermode/include/int_fmtio.h
diff -u src/sys/arch/usermode/include/int_fmtio.h:1.2 src/sys/arch/usermode/include/int_fmtio.h:1.3
--- src/sys/arch/usermode/include/int_fmtio.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/int_fmtio.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: int_fmtio.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: int_fmtio.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_INT_FMTIO_H
+#define _USERMODE_INT_FMTIO_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_INT_FMTIO_H
-#define _ARCH_USERMODE_INCLUDE_INT_FMTIO_H
+#if defined(__i386__)
+#include "../../i386/include/int_fmtio.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/int_fmtio.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/int_fmtio.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_INT_FMTIO_H */
+#endif
Index: src/sys/arch/usermode/include/int_limits.h
diff -u src/sys/arch/usermode/include/int_limits.h:1.2 src/sys/arch/usermode/include/int_limits.h:1.3
--- src/sys/arch/usermode/include/int_limits.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/int_limits.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: int_limits.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: int_limits.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_INT_LIMITS_H
+#define _USERMODE_INT_LIMITS_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_INT_LIMITS_H
-#define _ARCH_USERMODE_INCLUDE_INT_LIMITS_H
+#if defined(__i386__)
+#include "../../i386/include/int_limits.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/int_limits.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/int_limits.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_INT_LIMITS_H */
+#endif
Index: src/sys/arch/usermode/include/int_mwgwtypes.h
diff -u src/sys/arch/usermode/include/int_mwgwtypes.h:1.2 src/sys/arch/usermode/include/int_mwgwtypes.h:1.3
--- src/sys/arch/usermode/include/int_mwgwtypes.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/int_mwgwtypes.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: int_mwgwtypes.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: int_mwgwtypes.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_INT_MWGWTYPES_H
+#define _USERMODE_INT_MWGWTYPES_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_INT_MWGWTYPES_H
-#define _ARCH_USERMODE_INCLUDE_INT_MWGWTYPES_H
+#if defined(__i386__)
+#include "../../i386/include/int_mwgwtypes.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/int_mwgwtypes.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/int_mwgwtypes.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_INT_MWGWTYPES_H */
+#endif
Index: src/sys/arch/usermode/include/int_types.h
diff -u src/sys/arch/usermode/include/int_types.h:1.2 src/sys/arch/usermode/include/int_types.h:1.3
--- src/sys/arch/usermode/include/int_types.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/int_types.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: int_types.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: int_types.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_INT_TYPES_H
+#define _USERMODE_INT_TYPES_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_INT_TYPES_H
-#define _ARCH_USERMODE_INCLUDE_INT_TYPES_H
+#if defined(__i386__)
+#include "../../i386/include/int_types.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/int_types.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/int_types.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_INT_TYPES_H */
+#endif
Index: src/sys/arch/usermode/include/limits.h
diff -u src/sys/arch/usermode/include/limits.h:1.2 src/sys/arch/usermode/include/limits.h:1.3
--- src/sys/arch/usermode/include/limits.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/limits.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: limits.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: limits.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_LIMITS_H
+#define _USERMODE_LIMITS_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_LIMITS_H
-#define _ARCH_USERMODE_INCLUDE_LIMITS_H
+#if defined(__i386__)
+#include "../../i386/include/limits.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/limits.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/limits.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_LIMITS_H */
+#endif
Index: src/sys/arch/usermode/include/netbsd32_machdep.h
diff -u src/sys/arch/usermode/include/netbsd32_machdep.h:1.2 src/sys/arch/usermode/include/netbsd32_machdep.h:1.3
--- src/sys/arch/usermode/include/netbsd32_machdep.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/netbsd32_machdep.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: netbsd32_machdep.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: netbsd32_machdep.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_NETBSD32_MACHDEP_H
+#define _USERMODE_NETBSD32_MACHDEP_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_NETBSD32_MACHDEP_H
-#define _ARCH_USERMODE_INCLUDE_NETBSD32_MACHDEP_H
+#if defined(__i386__)
+#include "../../i386/include/netbsd32_machdep.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/netbsd32_machdep.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/netbsd32_machdep.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_NETBSD32_MACHDEP_H */
+#endif
Index: src/sys/arch/usermode/include/param.h
diff -u src/sys/arch/usermode/include/param.h:1.2 src/sys/arch/usermode/include/param.h:1.3
--- src/sys/arch/usermode/include/param.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/param.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: param.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: param.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_PARAM_H
+#define _USERMODE_PARAM_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_PARAM_H
-#define _ARCH_USERMODE_INCLUDE_PARAM_H
+#if defined(__i386__)
+#include "../../i386/include/param.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/param.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/param.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_PARAM_H */
+#endif
Index: src/sys/arch/usermode/include/wchar_limits.h
diff -u src/sys/arch/usermode/include/wchar_limits.h:1.2 src/sys/arch/usermode/include/wchar_limits.h:1.3
--- src/sys/arch/usermode/include/wchar_limits.h:1.2	Wed Oct 21 16:06:59 2009
+++ src/sys/arch/usermode/include/wchar_limits.h	Sat Sep  3 14:23:50 2011
@@ -1,34 +1,18 @@
-/* $NetBSD: wchar_limits.h,v 1.2 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: wchar_limits.h,v 1.3 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_WCHAR_LIMITS_H
+#define _USERMODE_WCHAR_LIMITS_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_WCHAR_LIMITS_H
-#define _ARCH_USERMODE_INCLUDE_WCHAR_LIMITS_H
+#if defined(__i386__)
+#include "../../i386/include/wchar_limits.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/wchar_limits.h"
+#else
+#error port me
+#endif
 
-#include </usr/include/machine/wchar_limits.h>
-
-#endif /* !_ARCH_USERMODE_INCLUDE_WCHAR_LIMITS_H */
+#endif

Index: src/sys/arch/usermode/include/disklabel.h
diff -u src/sys/arch/usermode/include/disklabel.h:1.4 src/sys/arch/usermode/include/disklabel.h:1.5
--- src/sys/arch/usermode/include/disklabel.h:1.4	Wed Aug 31 12:56:13 2011
+++ src/sys/arch/usermode/include/disklabel.h	Sat Sep  3 14:23:50 2011
@@ -1,41 +1,21 @@
-/* $NetBSD: disklabel.h,v 1.4 2011/08/31 12:56:13 jmcneill Exp $ */
+/* $NetBSD: disklabel.h,v 1.5 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_DISKLABEL_H
+#define _USERMODE_DISKLABEL_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_DISKLABEL_H
-#define _ARCH_USERMODE_INCLUDE_DISKLABEL_H
-
-#include </usr/include/machine/disklabel.h>
+#if defined(__i386__)
+#include "../../i386/include/disklabel.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/disklabel.h"
+#else
+#error port me
+#endif
 #undef DISKUNIT
 #undef DISKPART
 #undef DISKMINOR
 
-#ifndef LABELUSESMBR
-#define LABELUSESMBR 1
 #endif
-
-#endif /* !_ARCH_USERMODE_INCLUDE_DISKLABEL_H */
Index: src/sys/arch/usermode/include/ptrace.h
diff -u src/sys/arch/usermode/include/ptrace.h:1.4 src/sys/arch/usermode/include/ptrace.h:1.5
--- src/sys/arch/usermode/include/ptrace.h:1.4	Wed Aug 24 10:59:10 2011
+++ src/sys/arch/usermode/include/ptrace.h	Sat Sep  3 14:23:50 2011
@@ -1,36 +1,20 @@
-/* $NetBSD: ptrace.h,v 1.4 2011/08/24 10:59:10 jmcneill Exp $ */
+/* $NetBSD: ptrace.h,v 1.5 2011/09/03 14:23:50 jmcneill Exp $ */
 
-/*-
- * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+ * Automatically generated by genheaders.sh on Sat Sep  3 10:13:14 EDT 2011
+ * Do not modify directly!
  */
+#ifndef _USERMODE_PTRACE_H
+#define _USERMODE_PTRACE_H
 
-#ifndef _ARCH_USERMODE_INCLUDE_PTRACE_H
-#define _ARCH_USERMODE_INCLUDE_PTRACE_H
-
-#include </usr/include/machine/ptrace.h>
+#if defined(__i386__)
+#include "../../i386/include/ptrace.h"
+#elif defined(__x86_64__)
+#include "../../amd64/include/ptrace.h"
+#else
+#error port me
+#endif
 #undef __HAVE_PTRACE_MACHDEP
 #undef __HAVE_PROCFS_MACHDEP
 
-#endif /* !_ARCH_USERMODE_INCLUDE_PTRACE_H */
+#endif

Added files:

Index: src/sys/arch/usermode/include/Makefile.headers
diff -u /dev/null src/sys/arch/usermode/include/Makefile.headers:1.1
--- /dev/null	Sat Sep  3 14:23:50 2011
+++ src/sys/arch/usermode/include/Makefile.headers	Sat Sep  3 14:23:49 2011
@@ -0,0 +1,4 @@
+# $NetBSD: Makefile.headers,v 1.1 2011/09/03 14:23:49 jmcneill Exp $
+
+headers:
+	sh genheaders.sh
Index: src/sys/arch/usermode/include/genheaders.sh
diff -u /dev/null src/sys/arch/usermode/include/genheaders.sh:1.1
--- /dev/null	Sat Sep  3 14:23:50 2011
+++ src/sys/arch/usermode/include/genheaders.sh	Sat Sep  3 14:23:50 2011
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Public domain
+#
+
+HDRS="asm.h"
+HDRS="$HDRS bswap.h"
+HDRS="$HDRS byte_swap.h"
+HDRS="$HDRS disklabel.h"
+HDRS="$HDRS elf_machdep.h"
+HDRS="$HDRS endian.h"
+HDRS="$HDRS endian_machdep.h"
+HDRS="$HDRS int_const.h"
+HDRS="$HDRS int_fmtio.h"
+HDRS="$HDRS int_limits.h"
+HDRS="$HDRS int_mwgwtypes.h"
+HDRS="$HDRS int_types.h"
+HDRS="$HDRS limits.h"
+HDRS="$HDRS netbsd32_machdep.h"
+HDRS="$HDRS param.h"
+HDRS="$HDRS ptrace.h"
+HDRS="$HDRS wchar_limits.h"
+
+for hdr in ${HDRS}; do
+	G="_USERMODE_$(echo ${hdr} | sed 's/\./_/g' | tr [a-z] [A-Z])"
+
+	cat > ${hdr} << EOF
+/* \$NetBSD\$ */
+
+/*
+ * Automatically generated by $0 on $(date)
+ * Do not modify directly!
+ */
+#ifndef $G
+#define $G
+
+#if defined(__i386__)
+#include "../../i386/include/${hdr}"
+#elif defined(__x86_64__)
+#include "../../amd64/include/${hdr}"
+#else
+#error port me
+#endif
+EOF
+
+	# header specific quirks
+	if [ "$hdr" = "disklabel.h" ]; then
+		echo "#undef DISKUNIT" >> ${hdr}
+		echo "#undef DISKPART" >> ${hdr}
+		echo "#undef DISKMINOR" >> ${hdr}
+	elif [ "$hdr" = "ptrace.h" ]; then
+		echo "#undef __HAVE_PTRACE_MACHDEP" >> ${hdr}
+		echo "#undef __HAVE_PROCFS_MACHDEP" >> ${hdr}
+	fi
+
+	echo >>${hdr}
+	echo "#endif" >> ${hdr}
+done

Reply via email to