Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating an
architecture specific include file containing the _ALIGN* stuff which <sys/socket.h> needs.
This commit is contained in:
parent
57cf46fea3
commit
a254d1f16d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196994
53
sys/amd64/include/_align.h
Normal file
53
sys/amd64/include/_align.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*-
|
||||
* Copyright (c) 2002 David E. O'Brien. All rights reserved.
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* the Systems Programming Group of the University of Utah Computer
|
||||
* Science Department and Ralph Campbell.
|
||||
*
|
||||
* 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* @(#)param.h 8.1 (Berkeley) 6/10/93
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _AMD64_INCLUDE__ALIGN_H_
|
||||
#define _AMD64_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is u_long and
|
||||
* must be cast to any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES (sizeof(long) - 1)
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
||||
|
||||
#endif /* !_AMD64_INCLUDE__ALIGN_H_ */
|
@ -39,26 +39,16 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _AMD64_INCLUDE_PARAM_H_
|
||||
#define _AMD64_INCLUDE_PARAM_H_
|
||||
|
||||
#include <machine/_align.h>
|
||||
|
||||
/*
|
||||
* Machine dependent constants for AMD64.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is u_long and
|
||||
* must be cast to any desired pointer type.
|
||||
*/
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES (sizeof(long) - 1)
|
||||
#endif
|
||||
#ifndef _ALIGN
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
|
||||
#define __HAVE_ACPI
|
||||
#define __PCI_REROUTE_INTERRUPT
|
||||
@ -150,5 +140,4 @@
|
||||
|
||||
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
|
||||
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_AMD64_INCLUDE_PARAM_H_ */
|
||||
|
52
sys/arm/include/_align.h
Normal file
52
sys/arm/include/_align.h
Normal file
@ -0,0 +1,52 @@
|
||||
/*-
|
||||
* Copyright (c) 2001 David E. O'Brien
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INCLUDE__ALIGN_H_
|
||||
#define _ARM_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES (sizeof(int) - 1)
|
||||
#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
|
||||
#endif /* !_ARM_INCLUDE__ALIGN_H_ */
|
@ -38,32 +38,20 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _ARM_INCLUDE_PARAM_H_
|
||||
#define _ARM_INCLUDE_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for StrongARM
|
||||
*/
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES (sizeof(int) - 1)
|
||||
#endif
|
||||
#ifndef _ALIGN
|
||||
#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
#endif
|
||||
#include <machine/_align.h>
|
||||
|
||||
#define STACKALIGNBYTES (8 - 1)
|
||||
#define STACKALIGN(p) ((u_int)(p) & ~STACKALIGNBYTES)
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
|
||||
#define __PCI_REROUTE_INTERRUPT
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "arm"
|
||||
#endif
|
||||
@ -136,5 +124,4 @@
|
||||
|
||||
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_ARM_INCLUDE_PARAM_H_ */
|
||||
|
47
sys/i386/include/_align.h
Normal file
47
sys/i386/include/_align.h
Normal file
@ -0,0 +1,47 @@
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* 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.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _I386_INCLUDE__ALIGN_H_
|
||||
#define _I386_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES (sizeof(int) - 1)
|
||||
#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
|
||||
#endif /* !_I386_INCLUDE__ALIGN_H_ */
|
@ -33,6 +33,11 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <machine/_align.h>
|
||||
|
||||
#ifndef _I386_INCLUDE_PARAM_H_
|
||||
#define _I386_INCLUDE_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for Intel 386.
|
||||
*/
|
||||
@ -49,14 +54,10 @@
|
||||
#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
|
||||
#define __HAVE_ACPI
|
||||
#define __PCI_REROUTE_INTERRUPT
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "i386"
|
||||
#endif
|
||||
@ -149,5 +150,4 @@
|
||||
|
||||
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_I386_INCLUDE_PARAM_H_ */
|
||||
|
53
sys/ia64/include/_align.h
Normal file
53
sys/ia64/include/_align.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* $FreeBSD$ */
|
||||
/* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* the Systems Programming Group of the University of Utah Computer
|
||||
* Science Department and Ralph Campbell.
|
||||
*
|
||||
* 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.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: Utah $Hdr: machparam.h 1.11 89/08/14$
|
||||
*
|
||||
* @(#)param.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#ifndef _IA64_INCLUDE__ALIGN_H_
|
||||
#define _IA64_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value for all
|
||||
* data types (int, long, ...). The result is u_long and must be cast to
|
||||
* any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES 15
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
||||
|
||||
#endif /* !_IA64_INCLUDE__ALIGN_H_ */
|
@ -39,29 +39,18 @@
|
||||
* @(#)param.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#ifndef _IA64_INCLUDE_PARAM_H_
|
||||
#define _IA64_INCLUDE_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for the IA64.
|
||||
*/
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value for all
|
||||
* data types (int, long, ...). The result is u_long and must be cast to
|
||||
* any desired pointer type.
|
||||
*/
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES 15
|
||||
#endif
|
||||
#ifndef _ALIGN
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
#include <machine/_align.h>
|
||||
|
||||
#define __HAVE_ACPI
|
||||
#define __PCI_REROUTE_INTERRUPT
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "ia64"
|
||||
#endif
|
||||
@ -119,5 +108,4 @@
|
||||
|
||||
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_IA64_INCLUDE_PARAM_H_ */
|
||||
|
53
sys/mips/include/_align.h
Normal file
53
sys/mips/include/_align.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* $OpenBSD: param.h,v 1.11 1998/08/30 22:05:35 millert Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* the Systems Programming Group of the University of Utah Computer
|
||||
* Science Department and Ralph Campbell.
|
||||
*
|
||||
* 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.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: Utah Hdr: machparam.h 1.11 89/08/14
|
||||
* from: @(#)param.h 8.1 (Berkeley) 6/10/93
|
||||
* JNPR: param.h,v 1.6.2.1 2007/09/10 07:49:36 girish
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _MIPS_INCLUDE__ALIGN_H_
|
||||
#define _MIPS_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value for all
|
||||
* data types (int, long, ...). The result is u_int and must be cast to
|
||||
* any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES 7
|
||||
#define _ALIGN(p) (((u_int)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
||||
|
||||
#endif /* !_MIPS_INCLUDE__ALIGN_H_ */
|
@ -39,8 +39,10 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
#ifndef _MIPS_INCLUDE_PARAM_H_
|
||||
#define _MIPS_INCLUDE_PARAM_H_
|
||||
|
||||
#include <machine/_align.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifdef _KERNEL
|
||||
@ -82,8 +84,6 @@
|
||||
* data types (int, long, ...). The result is u_int and must be cast to
|
||||
* any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES 7
|
||||
#define _ALIGN(p) (((u_int)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
||||
|
||||
#define ALIGNBYTES _ALIGNBYTES
|
||||
#define ALIGN(p) _ALIGN(p)
|
||||
@ -167,4 +167,4 @@
|
||||
#define DELAY(n) { register int N = (n); while (--N > 0); }
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_MIPS_INCLUDE_PARAM_H_ */
|
||||
|
29
sys/pc98/include/_align.h
Normal file
29
sys/pc98/include/_align.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*-
|
||||
* Copyright (c) 2005 TAKAHASHI Yoshihiro.
|
||||
* 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 AUTHOR 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 AUTHOR 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.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <i386/_align.h>
|
52
sys/powerpc/include/_align.h
Normal file
52
sys/powerpc/include/_align.h
Normal file
@ -0,0 +1,52 @@
|
||||
/*-
|
||||
* Copyright (c) 2001 David E. O'Brien
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _POWERPC_INCLUDE__ALIGN_H_
|
||||
#define _POWERPC_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES (sizeof(int) - 1)
|
||||
#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
|
||||
#endif /* !_POWERPC_INCLUDE__ALIGN_H_ */
|
@ -38,30 +38,18 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _POWERPC_INCLUDE_PARAM_H_
|
||||
#define _POWERPC_INCLUDE_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for PowerPC (32-bit only currently)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES (sizeof(int) - 1)
|
||||
#endif
|
||||
#ifndef _ALIGN
|
||||
#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
#include <machine/_align.h>
|
||||
|
||||
/* Needed to display interrupts on OFW PCI */
|
||||
#define __PCI_REROUTE_INTERRUPT
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "powerpc"
|
||||
#endif
|
||||
@ -120,5 +108,4 @@
|
||||
|
||||
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_POWERPC_INCLUDE_PARAM_H_ */
|
||||
|
44
sys/sparc64/include/_align.h
Normal file
44
sys/sparc64/include/_align.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* 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 REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SPARC64_INCLUDE__ALIGN_H_
|
||||
#define _SPARC64_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES 0xf
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
|
||||
#endif /* !_SPARC64_INCLUDE__ALIGN_H_ */
|
@ -30,29 +30,17 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SPARC64_INCLUDE_PARAM_H_
|
||||
#define _SPARC64_INCLUDE_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for sparc64.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES 0xf
|
||||
#endif
|
||||
#ifndef _ALIGN
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
#include <machine/_align.h>
|
||||
|
||||
#define __PCI_BAR_ZERO_VALID
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "sparc64"
|
||||
#endif
|
||||
@ -150,5 +138,4 @@
|
||||
|
||||
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_SPARC64_INCLUDE_PARAM_H_ */
|
||||
|
44
sys/sun4v/include/_align.h
Normal file
44
sys/sun4v/include/_align.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* 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 REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SUN4V_INCLUDE__ALIGN_H_
|
||||
#define _SUN4V_INCLUDE__ALIGN_H_
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#define _ALIGNBYTES 0xf
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
|
||||
#endif /* !_SUN4V_INCLUDE__ALIGN_H_ */
|
@ -30,26 +30,14 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SUN4V_INCLUDE_PARAM_H_
|
||||
#define _SUN4V_INCLUDE_PARAM_H_
|
||||
|
||||
/*
|
||||
* Machine dependent constants for sparc64.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Round p (pointer or byte index) up to a correctly-aligned value
|
||||
* for all data types (int, long, ...). The result is unsigned int
|
||||
* and must be cast to any desired pointer type.
|
||||
*/
|
||||
#ifndef _ALIGNBYTES
|
||||
#define _ALIGNBYTES 0xf
|
||||
#endif
|
||||
#ifndef _ALIGN
|
||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
#define _MACHINE_PARAM_H_
|
||||
#include <machine/_align.h>
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "sun4v"
|
||||
@ -147,7 +135,4 @@
|
||||
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
|
||||
#endif /* LOCORE */
|
||||
|
||||
|
||||
|
||||
#endif /* !_MACHINE_PARAM_H_ */
|
||||
#endif /* !_NO_NAMESPACE_POLLUTION */
|
||||
#endif /* !_SUN4V_INCLUDE_PARAM_H_ */
|
||||
|
@ -112,8 +112,6 @@
|
||||
#include <sys/limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NO_NAMESPACE_POLLUTION
|
||||
|
||||
#ifndef DEV_BSHIFT
|
||||
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
|
||||
#endif
|
||||
@ -182,8 +180,6 @@
|
||||
((off_t)(db) << DEV_BSHIFT)
|
||||
#endif
|
||||
|
||||
#endif /* _NO_NAMESPACE_POLLUTION */
|
||||
|
||||
#define PRIMASK 0x0ff
|
||||
#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
|
||||
#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */
|
||||
|
@ -36,9 +36,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/_types.h>
|
||||
#include <sys/_iovec.h>
|
||||
#define _NO_NAMESPACE_POLLUTION
|
||||
#include <machine/param.h>
|
||||
#undef _NO_NAMESPACE_POLLUTION
|
||||
#include <machine/_align.h>
|
||||
|
||||
/*
|
||||
* Definitions related to sockets: types, address families, options.
|
||||
|
Loading…
Reference in New Issue
Block a user