Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Switch all users (except ia64) of custom machine/an...
details: https://anonhg.NetBSD.org/src/rev/7a931bfb3fe2
branches: trunk
changeset: 456400:7a931bfb3fe2
user: kamil <kamil%NetBSD.org@localhost>
date: Tue May 07 03:49:25 2019 +0000
description:
Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h
Deduplicate the code among ports and poll definitions of types
directly from a compiler.
This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.
Proposed and discussed on a mailing list (twice).
Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
diffstat:
sys/arch/alpha/include/ansi.h | 63 +-----------------------------
sys/arch/amd64/include/ansi.h | 71 +---------------------------------
sys/arch/amiga/include/ansi.h | 7 +--
sys/arch/arm/include/ansi.h | 80 +--------------------------------------
sys/arch/atari/include/ansi.h | 7 +--
sys/arch/dreamcast/include/ansi.h | 6 +--
sys/arch/evbsh3/include/ansi.h | 6 +--
sys/arch/hp300/include/ansi.h | 3 +-
sys/arch/hpcsh/include/ansi.h | 6 +--
sys/arch/hppa/include/ansi.h | 64 +------------------------------
sys/arch/i386/include/ansi.h | 72 +----------------------------------
sys/arch/landisk/include/ansi.h | 7 +--
sys/arch/luna68k/include/ansi.h | 3 +-
sys/arch/m68k/include/ansi.h | 62 +-----------------------------
sys/arch/mips/include/ansi.h | 68 +--------------------------------
sys/arch/mvme68k/include/ansi.h | 3 +-
sys/arch/news68k/include/ansi.h | 3 +-
sys/arch/powerpc/include/ansi.h | 68 +--------------------------------
sys/arch/sh3/include/ansi.h | 61 +----------------------------
sys/arch/sparc/include/ansi.h | 62 +-----------------------------
sys/arch/sparc64/include/ansi.h | 62 +-----------------------------
sys/arch/usermode/include/ansi.h | 61 +----------------------------
sys/arch/vax/include/ansi.h | 65 +------------------------------
sys/arch/x68k/include/ansi.h | 3 +-
24 files changed, 37 insertions(+), 876 deletions(-)
diffs (truncated from 1044 to 300 lines):
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/alpha/include/ansi.h
--- a/sys/arch/alpha/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/alpha/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,62 +1,3 @@
-/* $NetBSD: ansi.h,v 1.25 2015/06/17 14:02:47 martin Exp $ */
+/* $NetBSD: ansi.h,v 1.26 2019/05/07 03:49:25 kamil Exp $ */
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. 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.
- * 3. 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.
- *
- * @(#)ansi.h 8.2 (Berkeley) 1/4/94
- */
-
-#ifndef _ANSI_H_
-#define _ANSI_H_
-
-#include <sys/cdefs.h>
-
-#include <machine/int_types.h>
-
-/*
- * Types which are fundamental to the implementation and may appear in
- * more than one standard header are defined here. Standard headers
- * then use:
- * #ifdef _BSD_SIZE_T_
- * typedef _BSD_SIZE_T_ size_t;
- * #undef _BSD_SIZE_T_
- * #endif
- */
-#define _BSD_CLOCK_T_ unsigned int /* clock() */
-#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */
-#define _BSD_SIZE_T_ unsigned long /* sizeof() */
-#define _BSD_SSIZE_T_ long /* byte count or error */
-#define _BSD_TIME_T_ __int64_t /* time() */
-#define _BSD_CLOCKID_T_ int /* clockid_t */
-#define _BSD_TIMER_T_ int /* timer_t */
-#define _BSD_SUSECONDS_T_ int /* suseconds_t */
-#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#define _BSD_WINT_T_ int /* wint_t */
-
-#endif /* _ANSI_H_ */
+#include <sys/common_ansi.h>
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/amd64/include/ansi.h
--- a/sys/arch/amd64/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/amd64/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,70 +1,3 @@
-/* $NetBSD: ansi.h,v 1.10 2011/07/17 20:54:36 joerg Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. 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.
- * 3. 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.
- *
- * @(#)ansi.h 8.2 (Berkeley) 1/4/94
- */
+/* $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $ */
-#ifndef _X86_64_ANSI_H_
-#define _X86_64_ANSI_H_
-
-#ifdef __x86_64__
-
-#include <sys/cdefs.h>
-
-#include <machine/int_types.h>
-
-/*
- * Types which are fundamental to the implementation and may appear in
- * more than one standard header are defined here. Standard headers
- * then use:
- * #ifdef _BSD_SIZE_T_
- * typedef _BSD_SIZE_T_ size_t;
- * #undef _BSD_SIZE_T_
- * #endif
- */
-#define _BSD_CLOCK_T_ unsigned int /* clock() */
-#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */
-#define _BSD_SIZE_T_ unsigned long /* sizeof() */
-#define _BSD_SSIZE_T_ long /* byte count or error */
-#define _BSD_TIME_T_ __int64_t /* time() */
-#define _BSD_CLOCKID_T_ int /* clockid_t */
-#define _BSD_TIMER_T_ int /* timer_t */
-#define _BSD_SUSECONDS_T_ int /* suseconds_t */
-#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#define _BSD_WINT_T_ int /* wint_t */
-
-#else /* !__x86_64__ */
-
-#include <i386/ansi.h>
-
-#endif /* __x86_64__ */
-
-#endif /* _X86_64_ANSI_H_ */
+#include <sys/common_ansi.h>
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/amiga/include/ansi.h
--- a/sys/arch/amiga/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/amiga/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,8 +1,3 @@
-/* $NetBSD: ansi.h,v 1.8 1994/10/26 02:05:55 cgd Exp $ */
-
-#ifndef _MACHINE_ANSI_H_
-#define _MACHINE_ANSI_H_
+/* $NetBSD: ansi.h,v 1.9 2019/05/07 03:49:26 kamil Exp $ */
#include <m68k/ansi.h>
-
-#endif
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/arm/include/ansi.h
--- a/sys/arch/arm/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/arm/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,79 +1,3 @@
-/* $NetBSD: ansi.h,v 1.17 2014/02/24 16:57:57 christos Exp $ */
-
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. 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.
- * 3. 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: @(#)ansi.h 8.2 (Berkeley) 1/4/94
- */
-
-#ifndef _ARM_ANSI_H_
-#define _ARM_ANSI_H_
-
-#include <sys/cdefs.h>
-
-#include <machine/int_types.h>
+/* $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $ */
-/*
- * Types which are fundamental to the implementation and may appear in
- * more than one standard header are defined here. Standard headers
- * then use:
- * #ifdef _BSD_SIZE_T_
- * typedef _BSD_SIZE_T_ size_t;
- * #undef _BSD_SIZE_T_
- * #endif
- */
-#define _BSD_CLOCK_T_ unsigned int /* clock() */
-#ifdef __PTRDIFF_TYPE__
-#define _BSD_PTRDIFF_T_ __PTRDIFF_TYPE__ /* ptr1 - ptr2 */
-#define _BSD_SSIZE_T_ __PTRDIFF_TYPE__ /* byte count or error */
-#else
-#define _BSD_PTRDIFF_T_ long int /* ptr1 - ptr2 */
-#define _BSD_SSIZE_T_ long int /* byte count or error */
-#endif
-#ifdef __SIZE_TYPE__
-#define _BSD_SIZE_T_ __SIZE_TYPE__ /* sizeof() */
-#else
-#define _BSD_SIZE_T_ unsigned long int /* sizeof() */
-#endif
-#define _BSD_TIME_T_ __int64_t /* time() */
-#define _BSD_CLOCKID_T_ int /* clockid_t */
-#define _BSD_TIMER_T_ int /* timer_t */
-#define _BSD_SUSECONDS_T_ int /* suseconds_t */
-#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
-#ifdef __WCHAR_TYPE__
-#define _BSD_WCHAR_T_ __WCHAR_TYPE__ /* wchar_t */
-#else
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#endif
-#ifdef __WINT_TYPE__
-#define _BSD_WINT_T_ __WINT_TYPE__ /* wint_t */
-#else
-#define _BSD_WINT_T_ int /* wint_t */
-#endif
-
-#endif /* _ARM_ANSI_H_ */
+#include <sys/common_ansi.h>
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/atari/include/ansi.h
--- a/sys/arch/atari/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/atari/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,8 +1,3 @@
-/* $NetBSD: ansi.h,v 1.1.1.1 1995/03/26 07:12:09 leo Exp $ */
-
-#ifndef _MACHINE_ANSI_H_
-#define _MACHINE_ANSI_H_
+/* $NetBSD: ansi.h,v 1.2 2019/05/07 03:49:26 kamil Exp $ */
#include <m68k/ansi.h>
-
-#endif
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/dreamcast/include/ansi.h
--- a/sys/arch/dreamcast/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/dreamcast/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,7 +1,3 @@
-/* $NetBSD: ansi.h,v 1.1 2000/12/11 18:19:13 marcus Exp $ */
-#ifndef _DREAMCAST_ANSI_H_
-#define _DREAMCAST_ANSI_H_
+/* $NetBSD: ansi.h,v 1.2 2019/05/07 03:49:26 kamil Exp $ */
#include <sh3/ansi.h>
-
-#endif /* _DREAMCAST_ANSI_H_ */
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/evbsh3/include/ansi.h
--- a/sys/arch/evbsh3/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/evbsh3/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,7 +1,3 @@
-/* $NetBSD: ansi.h,v 1.1 1999/09/13 10:30:27 itojun Exp $ */
-#ifndef _EVBSH3_ANSI_H_
-#define _EVBSH3_ANSI_H_
+/* $NetBSD: ansi.h,v 1.2 2019/05/07 03:49:26 kamil Exp $ */
#include <sh3/ansi.h>
-
-#endif /* _EVBSH3_ANSI_H_ */
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/hp300/include/ansi.h
--- a/sys/arch/hp300/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/hp300/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,4 +1,3 @@
-/* $NetBSD: ansi.h,v 1.4 1994/10/26 07:26:16 cgd Exp $ */
+/* $NetBSD: ansi.h,v 1.5 2019/05/07 03:49:26 kamil Exp $ */
-/* Just use the common m68k definition */
#include <m68k/ansi.h>
diff -r 2015803dad4b -r 7a931bfb3fe2 sys/arch/hpcsh/include/ansi.h
--- a/sys/arch/hpcsh/include/ansi.h Tue May 07 02:05:17 2019 +0000
+++ b/sys/arch/hpcsh/include/ansi.h Tue May 07 03:49:25 2019 +0000
@@ -1,7 +1,3 @@
-/* $NetBSD: ansi.h,v 1.2 2001/01/28 03:31:30 uch Exp $ */
-#ifndef _HPCSH_ANSI_H_
-#define _HPCSH_ANSI_H_
+/* $NetBSD: ansi.h,v 1.3 2019/05/07 03:49:26 kamil Exp $ */
#include <sh3/ansi.h>
-
-#endif /* _HPCSH_ANSI_H_ */
Home |
Main Index |
Thread Index |
Old Index